config.h 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  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.34.0"
  23. #define NE_VERSION_MAJOR (0)
  24. #define NE_VERSION_MINOR (34)
  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 HAVE_INET_NTOP 1
  34. #define HAVE_INET_PTON 1
  35. #define HAVE_IF_INDEXTONAME 1
  36. #define HAVE_IF_NAMETOINDEX 1
  37. #define USE_GETADDRINFO
  38. #define USE_GAI_ADDRCONFIG
  39. #define NE_HAVE_IPV6 // doesn't really have any practival effect
  40. /* Define to enable debugging */
  41. #define NE_DEBUGGING 1
  42. #ifdef _WIN64
  43. #define NE_FMT_SIZE_T "I64u"
  44. #define NE_FMT_SSIZE_T "I64d"
  45. #else
  46. #define NE_FMT_SIZE_T "u"
  47. #define NE_FMT_SSIZE_T "d"
  48. #endif
  49. #define NE_FMT_OFF_T "ld"
  50. #define NE_FMT_OFF64_T "I64d"
  51. #define NE_FMT_NE_OFF_T NE_FMT_OFF_T
  52. #ifndef NE_FMT_XML_SIZE
  53. #define NE_FMT_XML_SIZE "d"
  54. #endif
  55. #define SIZEOF_INT 4
  56. #define SIZEOF_LONG 4
  57. /* Win32 uses a underscore, so we use a macro to eliminate that. */
  58. /* VS2015 has this already defined */
  59. #if (_MSC_VER < 1900)
  60. #define snprintf _snprintf
  61. #endif
  62. /* VS2008 has this already defined */
  63. #if (_MSC_VER < 1500)
  64. #define vsnprintf _vsnprintf
  65. #endif
  66. #if defined(_MSC_VER) && _MSC_VER >= 1400
  67. #define strcasecmp _strcmpi
  68. #define strncasecmp _strnicmp
  69. #else
  70. #define strcasecmp strcmpi
  71. #define strncasecmp strnicmp
  72. #endif
  73. #if defined(_MSC_VER) && _MSC_VER >= 1300
  74. #define HAVE_STRTOLL
  75. /* VS2013 has this already defined */
  76. #if _MSC_VER < 1800
  77. #define strtoll _strtoi64
  78. #endif
  79. #endif
  80. #ifndef __BORLANDC__
  81. #ifdef _WIN64
  82. #define ssize_t __int64
  83. #else
  84. #define ssize_t int
  85. #endif
  86. #endif
  87. /* VS2015 has this already defined */
  88. #if defined (_MSC_VER) && (_MSC_VER < 1900)
  89. #define inline __inline
  90. #endif
  91. #if defined(NE_LFS)
  92. #ifdef __BORLANDC__
  93. #define lseek64 _lseeki64
  94. #define fstat64 _fstati64
  95. #define stat64 stati64
  96. #else
  97. #define lseek64 _lseeki64
  98. #define fstat64 _fstat64
  99. #define stat64 __stat64
  100. #endif
  101. #else
  102. #define off_t _off_t
  103. #endif
  104. #ifndef USE_GETADDRINFO
  105. #define in_addr_t unsigned int
  106. #endif
  107. // WINSCP
  108. #define HAVE_CRYPTO_SET_IDPTR_CALLBACK
  109. #define NE_FMT_TIME_T "ld"
  110. typedef int socklen_t;
  111. #include <io.h>
  112. #define read _read
  113. #endif