1 #ifndef _SRC_CLUCENE_INTERNAL_CLUCENE_CONFIG_H
2 #define _SRC_CLUCENE_INTERNAL_CLUCENE_CONFIG_H 1
4 /* src/shared/CLucene/_clucene-config.h.
5 * Normally generated automatically at end of cmake,
6 * but here in LibreOffice this actually is a copy of
7 * clucene/configs/_clucene-config-generic.h.
8 * These are internal definitions, and this file does not need to be distributed
11 /* CMake will look for these functions: */
12 /* #undef _CL_HAVE_FUNCTION__VSNWPRINTF */
13 /* #undef _CL_HAVE_FUNCTION__SNWPRINTF */
14 #define _CL_HAVE_FUNCTION_WCSCASECMP
15 #define _CL_HAVE_FUNCTION_WCSCAT 1
16 #define _CL_HAVE_FUNCTION_WCSCHR 1
17 #define _CL_HAVE_FUNCTION_WCSCMP 1
18 #define _CL_HAVE_FUNCTION_WCSCPY 1
19 #define _CL_HAVE_FUNCTION_WCSCSPN 1
20 /* #undef _CL_HAVE_FUNCTION_WCSICMP */
21 #define _CL_HAVE_FUNCTION_WCSLEN 1
22 #define _CL_HAVE_FUNCTION_WCSNCMP 1
23 #define _CL_HAVE_FUNCTION_WCSNCPY 1
24 #define _CL_HAVE_FUNCTION_WCSSTR 1
25 #define _CL_HAVE_FUNCTION_WCSTOD 1
26 /* #undef _CL_HAVE_FUNCTION_WCSDUP 1 */
27 #define _CL_HAVE_FUNCTION_WCSTOLL 1
28 /* #undef _CL_HAVE_FUNCTION_WCSUPR */
29 #define _CL_HAVE_FUNCTION_GETTIMEOFDAY 1
30 /* #undef _CL_HAVE_FUNCTION_MAPVIEWOFFILE */
32 /* #undef _CL_HAVE_FUNCTION_LLTOA */
33 /* #undef _CL_HAVE_FUNCTION_LLTOW */
34 #define _CL_HAVE_FUNCTION_PRINTF 1
35 #define _CL_HAVE_FUNCTION_SNPRINTF 1
36 #define _CL_HAVE_FUNCTION_MMAP 1
37 /* #undef _CL_HAVE_FUNCTION_STRLWR */
38 #define _CL_HAVE_FUNCTION_STRTOLL 1
39 /* #undef _CL_HAVE_FUNCTION_STRUPR */
40 /* #undef _CL_HAVE_FUNCTION_GETPAGESIZE */
41 #define _CL_HAVE_FUNCTION_USLEEP 1
42 /* #undef _CL_HAVE_FUNCTION_SLEEP */
44 #define CL_MAX_PATH 4096
45 //this is the max filename... for now its just the same,
46 //but this could change, so we use a different name
47 #define CL_MAX_NAME CL_MAX_PATH
48 //this used to be CL_MAX_NAME * 32, but as Alex Hudson points out, this could come to be 128kb.
49 //the above logic for CL_MAX_NAME should be correct enough to handle all file names
50 #define CL_MAX_DIR CL_MAX_PATH
54 #define _S_IREAD S_IREAD
55 #define _S_IWRITE S_IWRITE
58 #define _ILONG(x) x ## L
59 #define _ILONGLONG(x) x ## LL
62 #define cl_stat_t stat
63 #define fileSize CL_NS(util)::Misc::filelength
64 #define fileSeek lseek
65 #define fileTell(fhandle) fileSeek(fhandle, 0, SEEK_CUR)
66 #define fileHandleStat fstat
67 #define _realpath realpath
68 #define _rename rename
73 #define _snprintf snprintf
74 #define _mkdir(x) mkdir(x,0777)
75 #define _unlink unlink
77 #define SLEEPFUNCTION usleep
79 /* CMake will determine these specifics. Things like bugs, etc */
81 /* Does not support new float byte<->float conversions */
82 /* #undef _CL_HAVE_NO_FLOAT_BYTE */
84 /* Define if recursive pthread mutexes are available */
85 #define _CL_HAVE_PTHREAD_MUTEX_RECURSIVE 1
87 /** define if you would like to force clucene to use the internal
88 * character functions.
89 * Tests may display unpredictable behaviour if this is not defined.
91 #ifndef LUCENE_USE_INTERNAL_CHAR_FUNCTIONS
92 #define LUCENE_USE_INTERNAL_CHAR_FUNCTIONS 1
95 /** fix ansi for loop scope */
97 #define for if (0); else for
101 /* Compiler oddities */
103 //not sure why, but cygwin reports _S_IREAD, but doesn't actually work...
104 //TODO: make this work properly (this bit shouldn't be necessary)
106 #define _S_IREAD 0333
107 #define _S_IWRITE 0333
110 #ifdef __BORLANDC__ //borland compiler