config-win32.h 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. /*
  2. * Copyright 2002, LifeLine Networks BV (www.lifeline.nl). All rights reserved.
  3. * Copyright 2002, Bastiaan Bakker. All rights reserved.
  4. *
  5. * See the COPYING file for the terms of usage and distribution.
  6. */
  7. #ifndef _INCLUDE_LOG4CPP_CONFIG_WIN32_H
  8. #define _INCLUDE_LOG4CPP_CONFIG_WIN32_H 1
  9. /* manually edited from include/log4cpp/config.h */
  10. /* Define if you have the syslog function. */
  11. /* #undef LOG4CPP_HAVE_SYSLOG */
  12. /* Define if you have the `ftime' function. */
  13. #ifndef LOG4CPP_HAVE_FTIME
  14. #define LOG4CPP_HAVE_FTIME 1
  15. #endif
  16. /* Define if you have the `gettimeofday' function. */
  17. /* #undef LOG4CPP_HAVE_GETTIMEOFDAY */
  18. /* define if the compiler has int64_t */
  19. #ifndef LOG4CPP_HAVE_INT64_T
  20. #define LOG4CPP_HAVE_INT64_T
  21. typedef __int64 int64_t;
  22. /* define if the compiler has in_addr_t */
  23. #ifndef LOG4CPP_HAVE_IN_ADDR_T
  24. #define LOG4CPP_HAVE_IN_ADDR_T
  25. #ifndef u_long
  26. typedef unsigned long u_long;
  27. #endif
  28. /* u_long is the type of in_addr.s_addr */
  29. typedef u_long in_addr_t;
  30. /* u_short is the type of sockaddr_in.sin_port */
  31. // typedef u_short in_port_t;
  32. #endif
  33. #if defined(_MSC_VER) && _MSC_VER < 1300
  34. #define LOG4CPP_MISSING_INT64_OSTREAM_OP
  35. #endif
  36. #endif
  37. /* Define if you have the <io.h> header file. */
  38. #ifndef LOG4CPP_HAVE_IO_H
  39. #define LOG4CPP_HAVE_IO_H 1
  40. #endif
  41. /* Define if you have the <unistd.h> header file. */
  42. /* #undef LOG4CPP_HAVE_UNISTD_H */
  43. /* Define if you have the idsa library (-lidsa). */
  44. /* #undef LOG4CPP_HAVE_LIBIDSA */
  45. /* Define if you have the `strcasecmp' function. */
  46. /* #undef LOG4CPP_HAVE_STRCASECMP */
  47. /* Name of package */
  48. #ifndef LOG4CPP_PACKAGE
  49. #define LOG4CPP_PACKAGE "log4cpp"
  50. #endif
  51. /* Version number of package */
  52. #ifndef LOG4CPP_VERSION
  53. #define LOG4CPP_VERSION "1.0"
  54. #endif
  55. /* define if the compiler implements namespaces */
  56. #ifndef LOG4CPP_HAVE_NAMESPACES
  57. #define LOG4CPP_HAVE_NAMESPACES 1
  58. #endif
  59. /* define if the compiler has stringstream */
  60. #ifndef LOG4CPP_HAVE_SSTREAM
  61. #define LOG4CPP_HAVE_SSTREAM 1
  62. #endif
  63. #if defined(_MSC_VER)
  64. # if _MSC_VER < 1300
  65. # define LOG4CPP_HAS_WCHAR_T 0
  66. # else
  67. # define LOG4CPP_HAS_WCHAR_T 1
  68. # endif
  69. #else
  70. # define LOG4CPP_HAS_WCHAR_T 1
  71. #endif
  72. /* define if the C library has snprintf */
  73. #ifndef LOG4CPP_HAVE_SNPRINTF
  74. #define LOG4CPP_HAVE_SNPRINTF 1
  75. #endif
  76. #if defined(_MSC_VER) && _MSC_VER >= 1300
  77. #define LOG4CPP_HAVE_LOCALTIME_R 1
  78. #endif
  79. /* define to get around problems with ERROR in windows.h */
  80. #ifndef LOG4CPP_FIX_ERROR_COLLISION
  81. #define LOG4CPP_FIX_ERROR_COLLISION 1
  82. #endif
  83. /* define WIN32 for Borland */
  84. #ifndef WIN32
  85. #define WIN32
  86. #endif
  87. /* use threads */
  88. #ifndef LOG4CPP_HAVE_THREADING
  89. #define LOG4CPP_HAVE_THREADING
  90. #endif
  91. /* use ms threads */
  92. #ifndef LOG4CPP_USE_MSTHREADS
  93. #define LOG4CPP_USE_MSTHREADS
  94. #endif
  95. /* supply DLL main */
  96. #ifndef LOG4CPP_SUPPLY_DLLMAIN
  97. #define LOG4CPP_SUPPLY_DLLMAIN
  98. #endif
  99. /* MSVCs <cstdlib> and <cstring> headers are broken in the sense that they
  100. put functions in the global namespace instead of std::
  101. The #defines below enable a workaround for MSVC 6 and lower. If MSVC 7
  102. is still broken please adjust the _MSC_VER version check and report it.
  103. See also bug report #628211.
  104. */
  105. #if defined(_MSC_VER) && _MSC_VER < 1300
  106. #ifndef LOG4CPP_CSTDLIB_NOT_IN_STD
  107. #define LOG4CPP_CSTDLIB_NOT_IN_STD
  108. #endif
  109. #ifndef LOG4CPP_CSTRING_NOT_IN_STD
  110. #define LOG4CPP_CSTRING_NOT_IN_STD
  111. #endif
  112. #ifndef LOG4CPP_CTIME_NOT_IN_STD
  113. #define LOG4CPP_CTIME_NOT_IN_STD
  114. #endif
  115. #ifndef LOG4CPP_CMATH_NOT_IN_STD
  116. #define LOG4CPP_CMATH_NOT_IN_STD
  117. #endif
  118. #endif
  119. /* define mode_t. Move to Portability.hh if more platforms need it */
  120. #if !defined(__BORLANDC__)
  121. typedef int mode_t;
  122. #endif
  123. #if defined(_MSC_VER) && _MSC_VER == 1310
  124. // warning C4275: interface non dll class 'std::runtime_error' utilisée comme base
  125. // d'une interface dll class 'log4cpp::ConfigureFailure'
  126. #pragma warning(disable: 4275)
  127. #endif
  128. /* _INCLUDE_LOG4CPP_CONFIG_WIN32_H */
  129. #endif