1 /*------------------------------------------------------------------------------
2 * Copyright (C) 2003-2006 Ben van Klinken and the CLucene Team
3 *
4 * Distributable under the terms of either the Apache License (Version 2.0) or
5 * the GNU Lesser General Public License, as specified in the COPYING file.
6 ------------------------------------------------------------------------------*/
7 #ifndef lucene_define_std
8 #define lucene_define_std
9 //define a standard list of defines.
10 //These defines represents a fairly complete compiler.
11 //Of course it is preferable to use the autoconf generated
12 //list, but then not all systems can do this :)
13 
14 //we support long files - 64 bit file functions
15 #define _LARGE_FILES
16 
17 //support namespaces
18 #define _CL_HAVE_NAMESPACES
19 
20 //support try/catch blocks
21 #define _CL_HAVE_FUNCTION_TRY_BLOCKS
22 
23 //the normal headers
24 #define _CL_STDC_HEADERS
25 #define _CL_HAVE_STDARG_H
26 #define _CL_HAVE_ALGORITHM
27 #define _CL_HAVE_FUNCTIONAL
28 #define _CL_HAVE_MATH_H
29 #define _CL_HAVE_STL
30 #define _CL_HAVE_HASH_MAP
31 #define _CL_HAVE_HASH_SET
32 #define _CL_HAVE_MAP
33 #define _CL_HAVE_SET
34 #define _CL_HAVE_LIST
35 #define _CL_HAVE_VECTOR
36 #define _CL_HAVE_STDEXCEPT
37 #define _CL_HAVE_ERRNO_H
38 #define _CL_HAVE_SYS_STAT_H
39 #define _CL_HAVE_FCNTL_H
40 
41 //character & std tchar support
42 #define _CL_HAVE_TCHAR_H
43 #ifdef _UCS2
44 	#define _CL_HAVE_WCTYPE_H
45 
46 	#define _CL_HAVE_WCSCPY
47 	#define _CL_HAVE_WCSNCPY
48 	#define _CL_HAVE_WCSCAT
49 	#define _CL_HAVE_WCSCHR
50 	#define _CL_HAVE_WCSSTR
51 	#define _CL_HAVE_WCSLEN
52 	#define _CL_HAVE_WCSCMP
53 	#define _CL_HAVE_WCSNCMP
54 	#define _CL_HAVE_WCSCSPN
55 #else
56 	#define _CL_HAVE_CTYPE_H
57 #endif
58 
59 //already have the normal structures
60 #define _CL_HAVE_FLOAT_T
61 #define _CL_HAVE_INTPTR_T
62 
63 //system dependant:
64 #define _CL_HAVE_STRING_H //could be HAVE_STRINGS_H && HAVE_STRCHR
65 #define _CL_HAVE_SYS_TIMEB_H
66 #define _CL_HAVE_TIME_H
67 
68 #if defined (_WIN32) || defined (__WIN32) || defined (WIN32) || defined (__WIN32__)
69     #define _CL_HAVE_IO_H
70     #define _CL_HAVE_DIRECT_H
71     #define _CL_HAVE_WINDOWS_H
72 #else
73     #define _CL_HAVE_UNISTD_H
74 #endif
75 #ifdef UNDER_CE
76 #undef _CL_HAVE_SYS_TIMEB_H
77 #endif
78 
79 ////////////////////////////////////////////////
80 //now for individual functions. some compilers
81 //miss these, so must individually define what
82 //we have
83 ////////////////////////////////////////////////
84 
85 //string functions
86 #define _CL_HAVE_STRLWR
87 #define _CL_HAVE_WCSLWR
88 #define _CL_HAVE_WCSCASECMP
89 #define _CL_HAVE_STRCASECMP
90 
91 //formatting functions
92 #define _CL_HAVE_SNWPRINTF
93 #define _CL_HAVE_VSNWPRINTF
94 #define _CL_HAVE_WPRINTF
95 #define _CL_HAVE_SNPRINTF
96 #define _CL_HAVE_PRINTF
97 
98 
99 //conversion functions
100 #define _CL_HAVE_STRTOLL
101 #define _CL_HAVE_WCSTOLL
102 #define _CL_HAVE_WCSTOD
103 #define _CL_HAVE_LLTOA
104 #define _CL_HAVE_LLTOW
105 #define _CL_HAVE_INTPTR_T
106 
107 //these ones are not standard (msvc)
108 //so you will probably need to undefine
109 //if you are not using msvc
110 #define _CL_HAVE_FILELENGTH
111 
112 
113 #endif
114