PageRenderTime 45ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 1ms

/deps/cares/src/config-win32.h

https://gitlab.com/thomasphillips3/node
C Header | 385 lines | 173 code | 84 blank | 128 comment | 20 complexity | bbe49b78e430225f51c39b8645652659 MD5 | raw file
  1. #ifndef HEADER_CARES_CONFIG_WIN32_H
  2. #define HEADER_CARES_CONFIG_WIN32_H
  3. /* Copyright (C) 2004 - 2011 by Daniel Stenberg et al
  4. *
  5. * Permission to use, copy, modify, and distribute this software and its
  6. * documentation for any purpose and without fee is hereby granted, provided
  7. * that the above copyright notice appear in all copies and that both that
  8. * copyright notice and this permission notice appear in supporting
  9. * documentation, and that the name of M.I.T. not be used in advertising or
  10. * publicity pertaining to distribution of the software without specific,
  11. * written prior permission. M.I.T. makes no representations about the
  12. * suitability of this software for any purpose. It is provided "as is"
  13. * without express or implied warranty.
  14. */
  15. /* ================================================================ */
  16. /* c-ares/config-win32.h - Hand crafted config file for Windows */
  17. /* ================================================================ */
  18. /* ---------------------------------------------------------------- */
  19. /* HEADER FILES */
  20. /* ---------------------------------------------------------------- */
  21. /* Define if you have the <assert.h> header file. */
  22. #define HAVE_ASSERT_H 1
  23. /* Define if you have the <errno.h> header file. */
  24. #define HAVE_ERRNO_H 1
  25. /* Define if you have the <getopt.h> header file. */
  26. #if defined(__MINGW32__) || defined(__POCC__)
  27. #define HAVE_GETOPT_H 1
  28. #endif
  29. /* Define if you have the <limits.h> header file. */
  30. #define HAVE_LIMITS_H 1
  31. /* Define if you have the <process.h> header file. */
  32. #ifndef __SALFORDC__
  33. #define HAVE_PROCESS_H 1
  34. #endif
  35. /* Define if you have the <signal.h> header file. */
  36. #define HAVE_SIGNAL_H 1
  37. /* Define if you have the <sys/time.h> header file */
  38. /* #define HAVE_SYS_TIME_H 1 */
  39. /* Define if you have the <time.h> header file. */
  40. #define HAVE_TIME_H 1
  41. /* Define if you have the <unistd.h> header file. */
  42. #if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__LCC__) || \
  43. defined(__POCC__)
  44. #define HAVE_UNISTD_H 1
  45. #endif
  46. /* Define if you have the <windows.h> header file. */
  47. #define HAVE_WINDOWS_H 1
  48. /* Define if you have the <winsock.h> header file. */
  49. #define HAVE_WINSOCK_H 1
  50. /* Define if you have the <winsock2.h> header file. */
  51. #ifndef __SALFORDC__
  52. #define HAVE_WINSOCK2_H 1
  53. #endif
  54. /* Define if you have the <ws2tcpip.h> header file. */
  55. #ifndef __SALFORDC__
  56. #define HAVE_WS2TCPIP_H 1
  57. #endif
  58. /* ---------------------------------------------------------------- */
  59. /* OTHER HEADER INFO */
  60. /* ---------------------------------------------------------------- */
  61. /* Define if sig_atomic_t is an available typedef. */
  62. #define HAVE_SIG_ATOMIC_T 1
  63. /* Define if you have the ANSI C header files. */
  64. #define STDC_HEADERS 1
  65. /* Define if you can safely include both <sys/time.h> and <time.h>. */
  66. /* #define TIME_WITH_SYS_TIME 1 */
  67. /* ---------------------------------------------------------------- */
  68. /* FUNCTIONS */
  69. /* ---------------------------------------------------------------- */
  70. /* Define if you have the closesocket function. */
  71. #define HAVE_CLOSESOCKET 1
  72. /* Define if you have the getenv function. */
  73. #define HAVE_GETENV 1
  74. /* Define if you have the gethostname function. */
  75. #define HAVE_GETHOSTNAME 1
  76. /* Define if you have the ioctlsocket function. */
  77. #define HAVE_IOCTLSOCKET 1
  78. /* Define if you have a working ioctlsocket FIONBIO function. */
  79. #define HAVE_IOCTLSOCKET_FIONBIO 1
  80. /* Define if you have the strcasecmp function. */
  81. /* #define HAVE_STRCASECMP 1 */
  82. /* Define if you have the strdup function. */
  83. #define HAVE_STRDUP 1
  84. /* Define if you have the stricmp function. */
  85. #define HAVE_STRICMP 1
  86. /* Define if you have the strncasecmp function. */
  87. /* #define HAVE_STRNCASECMP 1 */
  88. /* Define if you have the strnicmp function. */
  89. #define HAVE_STRNICMP 1
  90. /* Define if you have the recv function. */
  91. #define HAVE_RECV 1
  92. /* Define to the type of arg 1 for recv. */
  93. #define RECV_TYPE_ARG1 SOCKET
  94. /* Define to the type of arg 2 for recv. */
  95. #define RECV_TYPE_ARG2 char *
  96. /* Define to the type of arg 3 for recv. */
  97. #define RECV_TYPE_ARG3 int
  98. /* Define to the type of arg 4 for recv. */
  99. #define RECV_TYPE_ARG4 int
  100. /* Define to the function return type for recv. */
  101. #define RECV_TYPE_RETV int
  102. /* Define if you have the recvfrom function. */
  103. #define HAVE_RECVFROM 1
  104. /* Define to the type of arg 1 for recvfrom. */
  105. #define RECVFROM_TYPE_ARG1 SOCKET
  106. /* Define to the type pointed by arg 2 for recvfrom. */
  107. #define RECVFROM_TYPE_ARG2 char
  108. /* Define to the type of arg 3 for recvfrom. */
  109. #define RECVFROM_TYPE_ARG3 int
  110. /* Define to the type of arg 4 for recvfrom. */
  111. #define RECVFROM_TYPE_ARG4 int
  112. /* Define to the type pointed by arg 5 for recvfrom. */
  113. #define RECVFROM_TYPE_ARG5 struct sockaddr
  114. /* Define to the type pointed by arg 6 for recvfrom. */
  115. #define RECVFROM_TYPE_ARG6 int
  116. /* Define to the function return type for recvfrom. */
  117. #define RECVFROM_TYPE_RETV int
  118. /* Define if you have the send function. */
  119. #define HAVE_SEND 1
  120. /* Define to the type of arg 1 for send. */
  121. #define SEND_TYPE_ARG1 SOCKET
  122. /* Define to the type qualifier of arg 2 for send. */
  123. #define SEND_QUAL_ARG2 const
  124. /* Define to the type of arg 2 for send. */
  125. #define SEND_TYPE_ARG2 char *
  126. /* Define to the type of arg 3 for send. */
  127. #define SEND_TYPE_ARG3 int
  128. /* Define to the type of arg 4 for send. */
  129. #define SEND_TYPE_ARG4 int
  130. /* Define to the function return type for send. */
  131. #define SEND_TYPE_RETV int
  132. /* Specifics for the Watt-32 tcp/ip stack. */
  133. #ifdef WATT32
  134. #define SOCKET int
  135. #define NS_INADDRSZ 4
  136. #define HAVE_ARPA_NAMESER_H 1
  137. #define HAVE_ARPA_INET_H 1
  138. #define HAVE_NETDB_H 1
  139. #define HAVE_NETINET_IN_H 1
  140. #define HAVE_SYS_SOCKET_H 1
  141. #define HAVE_NETINET_TCP_H 1
  142. #define HAVE_AF_INET6 1
  143. #define HAVE_PF_INET6 1
  144. #define HAVE_STRUCT_IN6_ADDR 1
  145. #define HAVE_STRUCT_SOCKADDR_IN6 1
  146. #undef HAVE_WINSOCK_H
  147. #undef HAVE_WINSOCK2_H
  148. #undef HAVE_WS2TCPIP_H
  149. #endif
  150. /* ---------------------------------------------------------------- */
  151. /* TYPEDEF REPLACEMENTS */
  152. /* ---------------------------------------------------------------- */
  153. /* Define if in_addr_t is not an available 'typedefed' type. */
  154. #define in_addr_t unsigned long
  155. /* Define to the return type of signal handlers (int or void). */
  156. #define RETSIGTYPE void
  157. /* Define if ssize_t is not an available 'typedefed' type. */
  158. #ifndef _SSIZE_T_DEFINED
  159. # if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || \
  160. defined(__POCC__) || \
  161. defined(__MINGW32__)
  162. # elif defined(_WIN64)
  163. # define _SSIZE_T_DEFINED
  164. # define ssize_t __int64
  165. # else
  166. # define _SSIZE_T_DEFINED
  167. # define ssize_t int
  168. # endif
  169. #endif
  170. /* ---------------------------------------------------------------- */
  171. /* TYPE SIZES */
  172. /* ---------------------------------------------------------------- */
  173. /* Define to the size of `int', as computed by sizeof. */
  174. #define SIZEOF_INT 4
  175. /* Define to the size of `short', as computed by sizeof. */
  176. #define SIZEOF_SHORT 2
  177. /* Define to the size of `size_t', as computed by sizeof. */
  178. #if defined(_WIN64)
  179. # define SIZEOF_SIZE_T 8
  180. #else
  181. # define SIZEOF_SIZE_T 4
  182. #endif
  183. /* ---------------------------------------------------------------- */
  184. /* STRUCT RELATED */
  185. /* ---------------------------------------------------------------- */
  186. /* Define if you have struct addrinfo. */
  187. #define HAVE_STRUCT_ADDRINFO 1
  188. /* Define if you have struct sockaddr_storage. */
  189. #if !defined(__SALFORDC__) && !defined(__BORLANDC__)
  190. #define HAVE_STRUCT_SOCKADDR_STORAGE 1
  191. #endif
  192. /* Define if you have struct timeval. */
  193. #define HAVE_STRUCT_TIMEVAL 1
  194. /* ---------------------------------------------------------------- */
  195. /* COMPILER SPECIFIC */
  196. /* ---------------------------------------------------------------- */
  197. /* Define to avoid VS2005 complaining about portable C functions. */
  198. #if defined(_MSC_VER) && (_MSC_VER >= 1400)
  199. # define _CRT_SECURE_NO_DEPRECATE 1
  200. # define _CRT_NONSTDC_NO_DEPRECATE 1
  201. #endif
  202. /* Officially, Microsoft's Windows SDK versions 6.X do not support Windows
  203. 2000 as a supported build target. VS2008 default installations provide
  204. an embedded Windows SDK v6.0A along with the claim that Windows 2000 is
  205. a valid build target for VS2008. Popular belief is that binaries built
  206. with VS2008 using Windows SDK versions 6.X and Windows 2000 as a build
  207. target are functional. */
  208. #if defined(_MSC_VER) && (_MSC_VER >= 1500)
  209. # define VS2008_MIN_TARGET 0x0500
  210. #endif
  211. /* When no build target is specified VS2008 default build target is Windows
  212. Vista, which leaves out even Winsows XP. If no build target has been given
  213. for VS2008 we will target the minimum Officially supported build target,
  214. which happens to be Windows XP. */
  215. #if defined(_MSC_VER) && (_MSC_VER >= 1500)
  216. # define VS2008_DEF_TARGET 0x0501
  217. #endif
  218. /* VS2008 default target settings and minimum build target check. */
  219. #if defined(_MSC_VER) && (_MSC_VER >= 1500)
  220. # ifndef _WIN32_WINNT
  221. # define _WIN32_WINNT VS2008_DEF_TARGET
  222. # endif
  223. # ifndef WINVER
  224. # define WINVER VS2008_DEF_TARGET
  225. # endif
  226. # if (_WIN32_WINNT < VS2008_MIN_TARGET) || (WINVER < VS2008_MIN_TARGET)
  227. # error VS2008 does not support Windows build targets prior to Windows 2000
  228. # endif
  229. #endif
  230. /* When no build target is specified Pelles C 5.00 and later default build
  231. target is Windows Vista. We override default target to be Windows 2000. */
  232. #if defined(__POCC__) && (__POCC__ >= 500)
  233. # ifndef _WIN32_WINNT
  234. # define _WIN32_WINNT 0x0500
  235. # endif
  236. # ifndef WINVER
  237. # define WINVER 0x0500
  238. # endif
  239. #endif
  240. /* Availability of freeaddrinfo, getaddrinfo and getnameinfo functions is
  241. quite convoluted, compiler dependent and even build target dependent. */
  242. #if defined(HAVE_WS2TCPIP_H)
  243. # if defined(__POCC__)
  244. # define HAVE_FREEADDRINFO 1
  245. # define HAVE_GETADDRINFO 1
  246. # define HAVE_GETNAMEINFO 1
  247. # elif defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
  248. # define HAVE_FREEADDRINFO 1
  249. # define HAVE_GETADDRINFO 1
  250. # define HAVE_GETNAMEINFO 1
  251. # elif defined(_MSC_VER) && (_MSC_VER >= 1200)
  252. # define HAVE_FREEADDRINFO 1
  253. # define HAVE_GETADDRINFO 1
  254. # define HAVE_GETNAMEINFO 1
  255. # endif
  256. #endif
  257. #if defined(__POCC__)
  258. # ifndef _MSC_VER
  259. # error Microsoft extensions /Ze compiler option is required
  260. # endif
  261. # ifndef __POCC__OLDNAMES
  262. # error Compatibility names /Go compiler option is required
  263. # endif
  264. #endif
  265. /* ---------------------------------------------------------------- */
  266. /* IPV6 COMPATIBILITY */
  267. /* ---------------------------------------------------------------- */
  268. /* Define if you have address family AF_INET6. */
  269. #ifdef HAVE_WINSOCK2_H
  270. #define HAVE_AF_INET6 1
  271. #endif
  272. /* Define if you have protocol family PF_INET6. */
  273. #ifdef HAVE_WINSOCK2_H
  274. #define HAVE_PF_INET6 1
  275. #endif
  276. /* Define if you have struct in6_addr. */
  277. #ifdef HAVE_WS2TCPIP_H
  278. #define HAVE_STRUCT_IN6_ADDR 1
  279. #endif
  280. /* Define if you have struct sockaddr_in6. */
  281. #ifdef HAVE_WS2TCPIP_H
  282. #define HAVE_STRUCT_SOCKADDR_IN6 1
  283. #endif
  284. /* Define if you have sockaddr_in6 with scopeid. */
  285. #ifdef HAVE_WS2TCPIP_H
  286. #define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
  287. #endif
  288. /* ---------------------------------------------------------------- */
  289. /* Win CE */
  290. /* ---------------------------------------------------------------- */
  291. /* FIXME: A proper config-win32ce.h should be created to hold these */
  292. /*
  293. * System error codes for Windows CE
  294. */
  295. #if defined(_WIN32_WCE) && !defined(HAVE_ERRNO_H)
  296. # define ENOENT ERROR_FILE_NOT_FOUND
  297. # define ESRCH ERROR_PATH_NOT_FOUND
  298. # define ENOMEM ERROR_NOT_ENOUGH_MEMORY
  299. # define ENOSPC ERROR_INVALID_PARAMETER
  300. #endif
  301. #endif /* HEADER_CARES_CONFIG_WIN32_H */