patch-clucene_configs__clucene-config-OPENBSD_h 3.7 KB

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