1. #ifndef _SRC_CLUCENE_INTERNAL_CLUCENE_CONFIG_H
  2. #define _SRC_CLUCENE_INTERNAL_CLUCENE_CONFIG_H 1
  3.  
  4. /* src/shared/CLucene/_clucene-config.h.
  5. *  Generated automatically at end of cmake.
  6. *  These are internal definitions, and this file does not need to be distributed
  7. */
  8.  
  9. /* CMake will look for these functions: */
  10. #define _CL_HAVE_FUNCTION__VSNWPRINTF
  11. /* #undef _CL_HAVE_FUNCTION__SNWPRINTF */
  12. /* #undef _CL_HAVE_FUNCTION_WCSCASECMP */
  13. #define _CL_HAVE_FUNCTION_WCSCAT  1
  14. #define _CL_HAVE_FUNCTION_WCSCHR  1
  15. #define _CL_HAVE_FUNCTION_WCSCMP  1
  16. #define _CL_HAVE_FUNCTION_WCSCPY  1
  17. #define _CL_HAVE_FUNCTION_WCSCSPN  1
  18. #define _CL_HAVE_FUNCTION_WCSICMP
  19. #define _CL_HAVE_FUNCTION_WCSLEN  1
  20. #define _CL_HAVE_FUNCTION_WCSNCMP  1
  21. #define _CL_HAVE_FUNCTION_WCSNCPY  1
  22. #define _CL_HAVE_FUNCTION_WCSSTR  1
  23. #define _CL_HAVE_FUNCTION_WCSTOD 1
  24. #define _CL_HAVE_FUNCTION_WCSDUP 1
  25. #define _CL_HAVE_FUNCTION_WCSTOLL 1
  26. #define _CL_HAVE_FUNCTION_WCSUPR 1
  27. #define _CL_HAVE_FUNCTION_GETTIMEOFDAY 1
  28. #define _CL_HAVE_FUNCTION_MAPVIEWOFFILE 1
  29.  
  30. #define _CL_HAVE_FUNCTION_LLTOA 1
  31. #define _CL_HAVE_FUNCTION_LLTOW 1
  32. #define _CL_HAVE_FUNCTION_PRINTF  1
  33. #define _CL_HAVE_FUNCTION_SNPRINTF  1
  34. /* #undef _CL_HAVE_FUNCTION_MMAP */
  35. #define _CL_HAVE_FUNCTION_STRLWR 1
  36. #define _CL_HAVE_FUNCTION_STRTOLL 1
  37. #define _CL_HAVE_FUNCTION_STRUPR 1
  38. /* #undef _CL_HAVE_FUNCTION_GETPAGESIZE */
  39. #define _CL_HAVE_FUNCTION_USLEEP 1
  40. /* #undef _CL_HAVE_FUNCTION_SLEEP */
  41.  
  42. #define CL_MAX_PATH 4096
  43. //this is the max filename... for now its just the same,
  44. //but this could change, so we use a different name
  45. #define CL_MAX_NAME CL_MAX_PATH
  46. //this used to be CL_MAX_NAME * 32, but as Alex Hudson points out, this could come to be 128kb.
  47. //the above logic for CL_MAX_NAME should be correct enough to handle all file names
  48. #define CL_MAX_DIR CL_MAX_PATH
  49.  
  50. /* undef _O_RANDOM _O_RANDOM */
  51. /* undef _O_BINARY _O_BINARY */
  52. /* undef _S_IREAD _S_IREAD */
  53. /* undef _S_IWRITE _S_IWRITE */
  54. /* #undef _timeb */
  55.  
  56. #define _ILONG(x) x ## L
  57. #define _ILONGLONG(x) x ## LL
  58.  
  59. #define fileStat _stati64
  60. #define cl_stat_t _stati64
  61. #define fileSize _filelengthi64
  62. #define fileSeek _lseeki64
  63. #define fileTell _telli64
  64. #define fileHandleStat _fstati64
  65. #define _realpath(rel,abs) ::_fullpath(abs,rel,CL_MAX_PATH)
  66. #define _rename rename
  67. /* undef _close _close */
  68. /* undef _read _read */
  69. #define _cl_open _open
  70. /* undef _write _write */
  71. #define _snprintf snprintf
  72. /* undef _mkdir _mkdir */
  73. /* undef _unlink _unlink */
  74. /* undef _ftime _ftime */
  75. #define SLEEPFUNCTION usleep
  76.  
  77. /* CMake will determine these specifics. Things like bugs, etc */
  78.  
  79. /* Does not support new float byte<->float conversions */
  80. /* #undef _CL_HAVE_NO_FLOAT_BYTE */
  81.  
  82. /* Define if recursive pthread mutexes are available */
  83. /* #undef _CL_HAVE_PTHREAD_MUTEX_RECURSIVE */
  84.  
  85. /** define if you would like to force clucene to use the internal
  86. * character functions.
  87. * Tests may display unpredictable behaviour if this is not defined.
  88. */
  89. #ifndef LUCENE_USE_INTERNAL_CHAR_FUNCTIONS
  90.     #define LUCENE_USE_INTERNAL_CHAR_FUNCTIONS 1
  91. #endif
  92.  
  93. /** fix ansi for loop scope */
  94. #if 1==0
  95.  #define for if (0); else for
  96. #endif
  97.  
  98.  
  99. /* Compiler oddities */
  100.  
  101. //not sure why, but cygwin reports _S_IREAD, but doesn't actually work...
  102. //TODO: make this work properly (this bit shouldn't be necessary)
  103. #ifdef __CYGWIN__
  104.     #define _S_IREAD 0333
  105.     #define _S_IWRITE 0333
  106. #endif
  107.  
  108. #ifdef __BORLANDC__ //borland compiler
  109.     #define O_RANDOM 0
  110. #endif
  111.  
  112. #endif