config.hw 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. /* -*- c -*-
  2. Win32 config.h
  3. Copyright (C) 1999-2000, Peter Boos <[email protected]>
  4. Copyright (C) 2002-2006, Joe Orton <[email protected]>
  5. This library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Library General Public
  7. License as published by the Free Software Foundation; either
  8. version 2 of the License, or (at your option) any later version.
  9. This library is distributed in the hope that it will be useful,
  10. but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  12. Library General Public License for more details.
  13. You should have received a copy of the GNU Library General Public
  14. License along with this library; if not, write to the Free
  15. Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
  16. MA 02111-1307, USA
  17. */
  18. #if defined(_WIN32) && !defined(WIN32)
  19. #define WIN32
  20. #endif
  21. #ifdef WIN32
  22. #define NEON_VERSION "0.35.0"
  23. #define NE_VERSION_MAJOR (0)
  24. #define NE_VERSION_MINOR (35)
  25. #define HAVE_ERRNO_H
  26. #define HAVE_LIMITS_H
  27. #define HAVE_STDLIB_H
  28. #define HAVE_STRING_H
  29. #define HAVE_MEMCPY
  30. #define HAVE_SETSOCKOPT
  31. #define HAVE_SSPI
  32. #define NE_HAVE_TS_SSL 1
  33. /* Define to enable debugging */
  34. #define NE_DEBUGGING 1
  35. #ifdef _WIN64
  36. #define NE_FMT_SIZE_T "I64u"
  37. #define NE_FMT_SSIZE_T "I64d"
  38. #else
  39. #define NE_FMT_SIZE_T "u"
  40. #define NE_FMT_SSIZE_T "d"
  41. #endif
  42. #define NE_FMT_OFF_T "ld"
  43. #define NE_FMT_OFF64_T "I64d"
  44. #define NE_FMT_NE_OFF_T NE_FMT_OFF_T
  45. #define NE_FMT_TIME_T "ld"
  46. #ifndef NE_FMT_XML_SIZE
  47. #define NE_FMT_XML_SIZE "d"
  48. #endif
  49. #define SIZEOF_INT 4
  50. #define SIZEOF_LONG 4
  51. /* Win32 uses a underscore, so we use a macro to eliminate that. */
  52. /* VS2015 has this already defined */
  53. #if (_MSC_VER < 1900)
  54. #define snprintf _snprintf
  55. #endif
  56. /* VS2008 has this already defined */
  57. #if (_MSC_VER < 1500)
  58. #define vsnprintf _vsnprintf
  59. #endif
  60. #if defined(_MSC_VER) && _MSC_VER >= 1400
  61. #define strcasecmp _strcmpi
  62. #define strncasecmp _strnicmp
  63. #else
  64. #define strcasecmp strcmpi
  65. #define strncasecmp strnicmp
  66. #endif
  67. #if defined(_MSC_VER) && _MSC_VER >= 1300
  68. #define HAVE_STRTOLL
  69. /* VS2013 has this already defined */
  70. #if _MSC_VER < 1800
  71. #define strtoll _strtoi64
  72. #endif
  73. #endif
  74. #ifdef _WIN64
  75. #define ssize_t __int64
  76. #else
  77. #define ssize_t int
  78. #endif
  79. /* VS2015 has this already defined */
  80. #if defined (_MSC_VER) && (_MSC_VER < 1900)
  81. #define inline __inline
  82. #endif
  83. #if defined(NE_LFS)
  84. #define lseek64 _lseeki64
  85. #define fstat64 _fstat64
  86. #define stat64 __stat64
  87. #else
  88. #define off_t _off_t
  89. #endif
  90. #ifndef USE_GETADDRINFO
  91. #define in_addr_t unsigned int
  92. typedef int socklen_t;
  93. #endif
  94. #include <io.h>
  95. #endif