config-win32.h 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736
  1. #ifndef HEADER_CURL_CONFIG_WIN32_H
  2. #define HEADER_CURL_CONFIG_WIN32_H
  3. /***************************************************************************
  4. * _ _ ____ _
  5. * Project ___| | | | _ \| |
  6. * / __| | | | |_) | |
  7. * | (__| |_| | _ <| |___
  8. * \___|\___/|_| \_\_____|
  9. *
  10. * Copyright (C) 1998 - 2016, Daniel Stenberg, <[email protected]>, et al.
  11. *
  12. * This software is licensed as described in the file COPYING, which
  13. * you should have received as part of this distribution. The terms
  14. * are also available at https://curl.haxx.se/docs/copyright.html.
  15. *
  16. * You may opt to use, copy, modify, merge, publish, distribute and/or sell
  17. * copies of the Software, and permit persons to whom the Software is
  18. * furnished to do so, under the terms of the COPYING file.
  19. *
  20. * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
  21. * KIND, either express or implied.
  22. *
  23. ***************************************************************************/
  24. /* ================================================================ */
  25. /* Hand crafted config file for Windows */
  26. /* ================================================================ */
  27. /* ---------------------------------------------------------------- */
  28. /* HEADER FILES */
  29. /* ---------------------------------------------------------------- */
  30. /* Define if you have the <arpa/inet.h> header file. */
  31. /* #define HAVE_ARPA_INET_H 1 */
  32. /* Define if you have the <assert.h> header file. */
  33. #define HAVE_ASSERT_H 1
  34. /* Define if you have the <crypto.h> header file. */
  35. /* #define HAVE_CRYPTO_H 1 */
  36. /* Define if you have the <errno.h> header file. */
  37. #define HAVE_ERRNO_H 1
  38. /* Define if you have the <err.h> header file. */
  39. /* #define HAVE_ERR_H 1 */
  40. /* Define if you have the <fcntl.h> header file. */
  41. #define HAVE_FCNTL_H 1
  42. /* Define if you have the <getopt.h> header file. */
  43. #if defined(__MINGW32__) || defined(__POCC__)
  44. #define HAVE_GETOPT_H 1
  45. #endif
  46. /* Define to 1 if you have the <inttypes.h> header file. */
  47. #if defined(_MSC_VER) && (_MSC_VER >= 1800)
  48. #define HAVE_INTTYPES_H 1
  49. #endif
  50. /* Define if you have the <io.h> header file. */
  51. #define HAVE_IO_H 1
  52. /* Define if you have the <limits.h> header file. */
  53. #define HAVE_LIMITS_H 1
  54. /* Define if you have the <locale.h> header file. */
  55. #define HAVE_LOCALE_H 1
  56. /* Define if you need <malloc.h> header even with <stdlib.h> header file. */
  57. #if !defined(__SALFORDC__) && !defined(__POCC__)
  58. #define NEED_MALLOC_H 1
  59. #endif
  60. /* Define if you have the <netdb.h> header file. */
  61. /* #define HAVE_NETDB_H 1 */
  62. /* Define if you have the <netinet/in.h> header file. */
  63. /* #define HAVE_NETINET_IN_H 1 */
  64. /* Define if you have the <process.h> header file. */
  65. #ifndef __SALFORDC__
  66. #define HAVE_PROCESS_H 1
  67. #endif
  68. /* Define if you have the <signal.h> header file. */
  69. #define HAVE_SIGNAL_H 1
  70. /* Define if you have the <sgtty.h> header file. */
  71. /* #define HAVE_SGTTY_H 1 */
  72. /* Define if you have the <ssl.h> header file. */
  73. /* #define HAVE_SSL_H 1 */
  74. /* Define to 1 if you have the <stdbool.h> header file. */
  75. #if defined(_MSC_VER) && (_MSC_VER >= 1800)
  76. #define HAVE_STDBOOL_H 1
  77. #endif
  78. /* Define if you have the <stdlib.h> header file. */
  79. #define HAVE_STDLIB_H 1
  80. /* Define if you have the <sys/param.h> header file. */
  81. /* #define HAVE_SYS_PARAM_H 1 */
  82. /* Define if you have the <sys/select.h> header file. */
  83. /* #define HAVE_SYS_SELECT_H 1 */
  84. /* Define if you have the <sys/socket.h> header file. */
  85. /* #define HAVE_SYS_SOCKET_H 1 */
  86. /* Define if you have the <sys/sockio.h> header file. */
  87. /* #define HAVE_SYS_SOCKIO_H 1 */
  88. /* Define if you have the <sys/stat.h> header file. */
  89. #define HAVE_SYS_STAT_H 1
  90. /* Define if you have the <sys/time.h> header file. */
  91. /* #define HAVE_SYS_TIME_H 1 */
  92. /* Define if you have the <sys/types.h> header file. */
  93. #define HAVE_SYS_TYPES_H 1
  94. /* Define if you have the <sys/utime.h> header file. */
  95. #ifndef __BORLANDC__
  96. #define HAVE_SYS_UTIME_H 1
  97. #endif
  98. /* Define if you have the <termio.h> header file. */
  99. /* #define HAVE_TERMIO_H 1 */
  100. /* Define if you have the <termios.h> header file. */
  101. /* #define HAVE_TERMIOS_H 1 */
  102. /* Define if you have the <time.h> header file. */
  103. #define HAVE_TIME_H 1
  104. /* Define if you have the <unistd.h> header file. */
  105. #if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__LCC__) || \
  106. defined(__POCC__)
  107. #define HAVE_UNISTD_H 1
  108. #endif
  109. /* Define if you have the <windows.h> header file. */
  110. #define HAVE_WINDOWS_H 1
  111. /* Define if you have the <winsock.h> header file. */
  112. #define HAVE_WINSOCK_H 1
  113. /* Define if you have the <winsock2.h> header file. */
  114. #ifndef __SALFORDC__
  115. #define HAVE_WINSOCK2_H 1
  116. #endif
  117. /* Define if you have the <ws2tcpip.h> header file. */
  118. #ifndef __SALFORDC__
  119. #define HAVE_WS2TCPIP_H 1
  120. #endif
  121. /* ---------------------------------------------------------------- */
  122. /* OTHER HEADER INFO */
  123. /* ---------------------------------------------------------------- */
  124. /* Define if sig_atomic_t is an available typedef. */
  125. #define HAVE_SIG_ATOMIC_T 1
  126. /* Define if you have the ANSI C header files. */
  127. #define STDC_HEADERS 1
  128. /* Define if you can safely include both <sys/time.h> and <time.h>. */
  129. /* #define TIME_WITH_SYS_TIME 1 */
  130. /* Define to 1 if bool is an available type. */
  131. #if defined(_MSC_VER) && (_MSC_VER >= 1800)
  132. #define HAVE_BOOL_T 1
  133. #endif
  134. /* ---------------------------------------------------------------- */
  135. /* FUNCTIONS */
  136. /* ---------------------------------------------------------------- */
  137. /* Define if you have the closesocket function. */
  138. #define HAVE_CLOSESOCKET 1
  139. /* Define if you don't have vprintf but do have _doprnt. */
  140. /* #define HAVE_DOPRNT 1 */
  141. /* Define if you have the ftruncate function. */
  142. #define HAVE_FTRUNCATE 1
  143. /* Define if you have the gethostbyaddr function. */
  144. #define HAVE_GETHOSTBYADDR 1
  145. /* Define if you have the gethostname function. */
  146. #define HAVE_GETHOSTNAME 1
  147. /* Define if you have the getpass function. */
  148. /* #define HAVE_GETPASS 1 */
  149. /* Define if you have the getservbyname function. */
  150. #define HAVE_GETSERVBYNAME 1
  151. /* Define if you have the getprotobyname function. */
  152. #define HAVE_GETPROTOBYNAME
  153. /* Define if you have the gettimeofday function. */
  154. /* #define HAVE_GETTIMEOFDAY 1 */
  155. /* Define if you have the inet_addr function. */
  156. #define HAVE_INET_ADDR 1
  157. /* Define if you have the ioctlsocket function. */
  158. #define HAVE_IOCTLSOCKET 1
  159. /* Define if you have a working ioctlsocket FIONBIO function. */
  160. #define HAVE_IOCTLSOCKET_FIONBIO 1
  161. /* Define if you have the perror function. */
  162. #define HAVE_PERROR 1
  163. /* Define if you have the RAND_screen function when using SSL. */
  164. #define HAVE_RAND_SCREEN 1
  165. /* Define if you have the `RAND_status' function when using SSL. */
  166. #define HAVE_RAND_STATUS 1
  167. /* Define if you have the `CRYPTO_cleanup_all_ex_data' function.
  168. This is present in OpenSSL versions after 0.9.6b */
  169. #define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1
  170. /* Define if you have the select function. */
  171. #define HAVE_SELECT 1
  172. /* Define if you have the setlocale function. */
  173. #define HAVE_SETLOCALE 1
  174. /* Define if you have the setmode function. */
  175. #define HAVE_SETMODE 1
  176. /* Define if you have the setvbuf function. */
  177. #define HAVE_SETVBUF 1
  178. /* Define if you have the socket function. */
  179. #define HAVE_SOCKET 1
  180. /* Define if you have the strcasecmp function. */
  181. /* #define HAVE_STRCASECMP 1 */
  182. /* Define if you have the strdup function. */
  183. #define HAVE_STRDUP 1
  184. /* Define if you have the strftime function. */
  185. #define HAVE_STRFTIME 1
  186. /* Define if you have the stricmp function. */
  187. #define HAVE_STRICMP 1
  188. /* Define if you have the strncasecmp function. */
  189. /* #define HAVE_STRNCASECMP 1 */
  190. /* Define if you have the strnicmp function. */
  191. #define HAVE_STRNICMP 1
  192. /* Define if you have the strstr function. */
  193. #define HAVE_STRSTR 1
  194. /* Define if you have the strtoll function. */
  195. #if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__POCC__) || \
  196. (defined(_MSC_VER) && (_MSC_VER >= 1800))
  197. #define HAVE_STRTOLL 1
  198. #endif
  199. /* Define if you have the tcgetattr function. */
  200. /* #define HAVE_TCGETATTR 1 */
  201. /* Define if you have the tcsetattr function. */
  202. /* #define HAVE_TCSETATTR 1 */
  203. /* Define if you have the utime function. */
  204. #ifndef __BORLANDC__
  205. #define HAVE_UTIME 1
  206. #endif
  207. /* Define to the type qualifier of arg 1 for getnameinfo. */
  208. #define GETNAMEINFO_QUAL_ARG1 const
  209. /* Define to the type of arg 1 for getnameinfo. */
  210. #define GETNAMEINFO_TYPE_ARG1 struct sockaddr *
  211. /* Define to the type of arg 2 for getnameinfo. */
  212. #define GETNAMEINFO_TYPE_ARG2 socklen_t
  213. /* Define to the type of args 4 and 6 for getnameinfo. */
  214. #define GETNAMEINFO_TYPE_ARG46 DWORD
  215. /* Define to the type of arg 7 for getnameinfo. */
  216. #define GETNAMEINFO_TYPE_ARG7 int
  217. /* Define if you have the recv function. */
  218. #define HAVE_RECV 1
  219. /* Define to the type of arg 1 for recv. */
  220. #define RECV_TYPE_ARG1 SOCKET
  221. /* Define to the type of arg 2 for recv. */
  222. #define RECV_TYPE_ARG2 char *
  223. /* Define to the type of arg 3 for recv. */
  224. #define RECV_TYPE_ARG3 int
  225. /* Define to the type of arg 4 for recv. */
  226. #define RECV_TYPE_ARG4 int
  227. /* Define to the function return type for recv. */
  228. #define RECV_TYPE_RETV int
  229. /* Define if you have the recvfrom function. */
  230. #define HAVE_RECVFROM 1
  231. /* Define to the type of arg 1 for recvfrom. */
  232. #define RECVFROM_TYPE_ARG1 SOCKET
  233. /* Define to the type pointed by arg 2 for recvfrom. */
  234. #define RECVFROM_TYPE_ARG2 char
  235. /* Define to the type of arg 3 for recvfrom. */
  236. #define RECVFROM_TYPE_ARG3 int
  237. /* Define to the type of arg 4 for recvfrom. */
  238. #define RECVFROM_TYPE_ARG4 int
  239. /* Define to the type pointed by arg 5 for recvfrom. */
  240. #define RECVFROM_TYPE_ARG5 struct sockaddr
  241. /* Define to the type pointed by arg 6 for recvfrom. */
  242. #define RECVFROM_TYPE_ARG6 int
  243. /* Define to the function return type for recvfrom. */
  244. #define RECVFROM_TYPE_RETV int
  245. /* Define if you have the send function. */
  246. #define HAVE_SEND 1
  247. /* Define to the type of arg 1 for send. */
  248. #define SEND_TYPE_ARG1 SOCKET
  249. /* Define to the type qualifier of arg 2 for send. */
  250. #define SEND_QUAL_ARG2 const
  251. /* Define to the type of arg 2 for send. */
  252. #define SEND_TYPE_ARG2 char *
  253. /* Define to the type of arg 3 for send. */
  254. #define SEND_TYPE_ARG3 int
  255. /* Define to the type of arg 4 for send. */
  256. #define SEND_TYPE_ARG4 int
  257. /* Define to the function return type for send. */
  258. #define SEND_TYPE_RETV int
  259. /* ---------------------------------------------------------------- */
  260. /* TYPEDEF REPLACEMENTS */
  261. /* ---------------------------------------------------------------- */
  262. /* Define if in_addr_t is not an available 'typedefed' type. */
  263. #define in_addr_t unsigned long
  264. /* Define to the return type of signal handlers (int or void). */
  265. #define RETSIGTYPE void
  266. /* Define if ssize_t is not an available 'typedefed' type. */
  267. #ifndef _SSIZE_T_DEFINED
  268. # if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || \
  269. defined(__POCC__) || \
  270. defined(__MINGW32__)
  271. # elif defined(_WIN64)
  272. # define _SSIZE_T_DEFINED
  273. # define ssize_t __int64
  274. # else
  275. # define _SSIZE_T_DEFINED
  276. # define ssize_t int
  277. # endif
  278. #endif
  279. /* ---------------------------------------------------------------- */
  280. /* TYPE SIZES */
  281. /* ---------------------------------------------------------------- */
  282. /* Define to the size of `int', as computed by sizeof. */
  283. #define SIZEOF_INT 4
  284. /* Define to the size of `long double', as computed by sizeof. */
  285. #define SIZEOF_LONG_DOUBLE 16
  286. /* Define to the size of `long long', as computed by sizeof. */
  287. /* #define SIZEOF_LONG_LONG 8 */
  288. /* Define to the size of `short', as computed by sizeof. */
  289. #define SIZEOF_SHORT 2
  290. /* Define to the size of `size_t', as computed by sizeof. */
  291. #if defined(_WIN64)
  292. # define SIZEOF_SIZE_T 8
  293. #else
  294. # define SIZEOF_SIZE_T 4
  295. #endif
  296. /* ---------------------------------------------------------------- */
  297. /* BSD-style lwIP TCP/IP stack SPECIFIC */
  298. /* ---------------------------------------------------------------- */
  299. /* Define to use BSD-style lwIP TCP/IP stack. */
  300. /* #define USE_LWIPSOCK 1 */
  301. #ifdef USE_LWIPSOCK
  302. # undef USE_WINSOCK
  303. # undef HAVE_WINSOCK_H
  304. # undef HAVE_WINSOCK2_H
  305. # undef HAVE_WS2TCPIP_H
  306. # undef HAVE_ERRNO_H
  307. # undef HAVE_GETHOSTNAME
  308. # undef HAVE_GETNAMEINFO
  309. # undef LWIP_POSIX_SOCKETS_IO_NAMES
  310. # undef RECV_TYPE_ARG1
  311. # undef RECV_TYPE_ARG3
  312. # undef SEND_TYPE_ARG1
  313. # undef SEND_TYPE_ARG3
  314. # define HAVE_FREEADDRINFO
  315. # define HAVE_GETADDRINFO
  316. # define HAVE_GETHOSTBYNAME
  317. # define HAVE_GETHOSTBYNAME_R
  318. # define HAVE_GETHOSTBYNAME_R_6
  319. # define LWIP_POSIX_SOCKETS_IO_NAMES 0
  320. # define RECV_TYPE_ARG1 int
  321. # define RECV_TYPE_ARG3 size_t
  322. # define SEND_TYPE_ARG1 int
  323. # define SEND_TYPE_ARG3 size_t
  324. #endif
  325. /* ---------------------------------------------------------------- */
  326. /* Watt-32 tcp/ip SPECIFIC */
  327. /* ---------------------------------------------------------------- */
  328. #ifdef USE_WATT32
  329. #include <tcp.h>
  330. #undef byte
  331. #undef word
  332. #undef USE_WINSOCK
  333. #undef HAVE_WINSOCK_H
  334. #undef HAVE_WINSOCK2_H
  335. #undef HAVE_WS2TCPIP_H
  336. #define HAVE_GETADDRINFO
  337. #define HAVE_GETNAMEINFO
  338. #define HAVE_SYS_IOCTL_H
  339. #define HAVE_SYS_SOCKET_H
  340. #define HAVE_NETINET_IN_H
  341. #define HAVE_NETDB_H
  342. #define HAVE_ARPA_INET_H
  343. #define HAVE_FREEADDRINFO
  344. #define SOCKET int
  345. #endif
  346. /* ---------------------------------------------------------------- */
  347. /* COMPILER SPECIFIC */
  348. /* ---------------------------------------------------------------- */
  349. /* Define to nothing if compiler does not support 'const' qualifier. */
  350. /* #define const */
  351. /* Define to nothing if compiler does not support 'volatile' qualifier. */
  352. /* #define volatile */
  353. /* Windows should not have HAVE_GMTIME_R defined */
  354. /* #undef HAVE_GMTIME_R */
  355. /* Define if the compiler supports C99 variadic macro style. */
  356. #if defined(_MSC_VER) && (_MSC_VER >= 1400)
  357. #define HAVE_VARIADIC_MACROS_C99 1
  358. #endif
  359. /* Define if the compiler supports the 'long long' data type. */
  360. #if defined(__MINGW32__) || defined(__WATCOMC__) || \
  361. (defined(_MSC_VER) && (_MSC_VER >= 1310)) || \
  362. (defined(__BORLANDC__) && (__BORLANDC__ >= 0x561))
  363. #define HAVE_LONGLONG 1
  364. #endif
  365. /* Define to avoid VS2005 complaining about portable C functions. */
  366. #if defined(_MSC_VER) && (_MSC_VER >= 1400)
  367. #define _CRT_SECURE_NO_DEPRECATE 1
  368. #define _CRT_NONSTDC_NO_DEPRECATE 1
  369. #endif
  370. /* VS2005 and later dafault size for time_t is 64-bit, unless
  371. _USE_32BIT_TIME_T has been defined to get a 32-bit time_t. */
  372. #if defined(_MSC_VER) && (_MSC_VER >= 1400)
  373. # ifndef _USE_32BIT_TIME_T
  374. # define SIZEOF_TIME_T 8
  375. # else
  376. # define SIZEOF_TIME_T 4
  377. # endif
  378. #endif
  379. /* Define some minimum and default build targets for Visual Studio */
  380. #if defined(_MSC_VER)
  381. /* Officially, Microsoft's Windows SDK versions 6.X does not support Windows
  382. 2000 as a supported build target. VS2008 default installations provides
  383. an embedded Windows SDK v6.0A along with the claim that Windows 2000 is a
  384. valid build target for VS2008. Popular belief is that binaries built with
  385. VS2008 using Windows SDK versions v6.X and Windows 2000 as a build target
  386. are functional. */
  387. # define VS2008_MIN_TARGET 0x0500
  388. /* The minimum build target for VS2012 is Vista unless Update 1 is installed
  389. and the v110_xp toolset is choosen. */
  390. # if defined(_USING_V110_SDK71_)
  391. # define VS2012_MIN_TARGET 0x0501
  392. # else
  393. # define VS2012_MIN_TARGET 0x0600
  394. # endif
  395. /* VS2008 default build target is Windows Vista. We override default target
  396. to be Windows XP. */
  397. # define VS2008_DEF_TARGET 0x0501
  398. /* VS2012 default build target is Windows Vista unless Update 1 is installed
  399. and the v110_xp toolset is choosen. */
  400. # if defined(_USING_V110_SDK71_)
  401. # define VS2012_DEF_TARGET 0x0501
  402. # else
  403. # define VS2012_DEF_TARGET 0x0600
  404. # endif
  405. #endif
  406. /* VS2008 default target settings and minimum build target check. */
  407. #if defined(_MSC_VER) && (_MSC_VER >= 1500) && (_MSC_VER <= 1600)
  408. # ifndef _WIN32_WINNT
  409. # define _WIN32_WINNT VS2008_DEF_TARGET
  410. # endif
  411. # ifndef WINVER
  412. # define WINVER VS2008_DEF_TARGET
  413. # endif
  414. # if (_WIN32_WINNT < VS2008_MIN_TARGET) || (WINVER < VS2008_MIN_TARGET)
  415. # error VS2008 does not support Windows build targets prior to Windows 2000
  416. # endif
  417. #endif
  418. /* VS2012 default target settings and minimum build target check. */
  419. #if defined(_MSC_VER) && (_MSC_VER >= 1700)
  420. # ifndef _WIN32_WINNT
  421. # define _WIN32_WINNT VS2012_DEF_TARGET
  422. # endif
  423. # ifndef WINVER
  424. # define WINVER VS2012_DEF_TARGET
  425. # endif
  426. # if (_WIN32_WINNT < VS2012_MIN_TARGET) || (WINVER < VS2012_MIN_TARGET)
  427. # if defined(_USING_V110_SDK71_)
  428. # error VS2012 does not support Windows build targets prior to Windows XP
  429. # else
  430. # error VS2012 does not support Windows build targets prior to Windows \
  431. Vista
  432. # endif
  433. # endif
  434. #endif
  435. /* When no build target is specified Pelles C 5.00 and later default build
  436. target is Windows Vista. We override default target to be Windows 2000. */
  437. #if defined(__POCC__) && (__POCC__ >= 500)
  438. # ifndef _WIN32_WINNT
  439. # define _WIN32_WINNT 0x0500
  440. # endif
  441. # ifndef WINVER
  442. # define WINVER 0x0500
  443. # endif
  444. #endif
  445. /* Availability of freeaddrinfo, getaddrinfo and getnameinfo functions is
  446. quite convoluted, compiler dependent and even build target dependent. */
  447. #if defined(HAVE_WS2TCPIP_H)
  448. # if defined(__POCC__)
  449. # define HAVE_FREEADDRINFO 1
  450. # define HAVE_GETADDRINFO 1
  451. # define HAVE_GETADDRINFO_THREADSAFE 1
  452. # define HAVE_GETNAMEINFO 1
  453. # elif defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
  454. # define HAVE_FREEADDRINFO 1
  455. # define HAVE_GETADDRINFO 1
  456. # define HAVE_GETADDRINFO_THREADSAFE 1
  457. # define HAVE_GETNAMEINFO 1
  458. # elif defined(_MSC_VER) && (_MSC_VER >= 1200)
  459. # define HAVE_FREEADDRINFO 1
  460. # define HAVE_GETADDRINFO 1
  461. # define HAVE_GETADDRINFO_THREADSAFE 1
  462. # define HAVE_GETNAMEINFO 1
  463. # endif
  464. #endif
  465. #if defined(__POCC__)
  466. # ifndef _MSC_VER
  467. # error Microsoft extensions /Ze compiler option is required
  468. # endif
  469. # ifndef __POCC__OLDNAMES
  470. # error Compatibility names /Go compiler option is required
  471. # endif
  472. #endif
  473. /* ---------------------------------------------------------------- */
  474. /* STRUCT RELATED */
  475. /* ---------------------------------------------------------------- */
  476. /* Define if you have struct sockaddr_storage. */
  477. #if !defined(__SALFORDC__) && !defined(__BORLANDC__)
  478. #define HAVE_STRUCT_SOCKADDR_STORAGE 1
  479. #endif
  480. /* Define if you have struct timeval. */
  481. #define HAVE_STRUCT_TIMEVAL 1
  482. /* Define if struct sockaddr_in6 has the sin6_scope_id member. */
  483. #define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
  484. #if defined(HAVE_WINSOCK2_H) && defined(_WIN32_WINNT) && \
  485. (_WIN32_WINNT >= 0x0600)
  486. #define HAVE_STRUCT_POLLFD 1
  487. #endif
  488. /* ---------------------------------------------------------------- */
  489. /* LARGE FILE SUPPORT */
  490. /* ---------------------------------------------------------------- */
  491. #if defined(_MSC_VER) && !defined(_WIN32_WCE)
  492. # if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64)
  493. # define USE_WIN32_LARGE_FILES
  494. # else
  495. # define USE_WIN32_SMALL_FILES
  496. # endif
  497. #endif
  498. #if defined(__MINGW32__) && !defined(USE_WIN32_LARGE_FILES)
  499. # define USE_WIN32_LARGE_FILES
  500. #endif
  501. #if defined(__WATCOMC__) && !defined(USE_WIN32_LARGE_FILES)
  502. # define USE_WIN32_LARGE_FILES
  503. #endif
  504. #if defined(__POCC__)
  505. # undef USE_WIN32_LARGE_FILES
  506. #endif
  507. #if !defined(USE_WIN32_LARGE_FILES) && !defined(USE_WIN32_SMALL_FILES)
  508. # define USE_WIN32_SMALL_FILES
  509. #endif
  510. /* ---------------------------------------------------------------- */
  511. /* DNS RESOLVER SPECIALTY */
  512. /* ---------------------------------------------------------------- */
  513. /*
  514. * Undefine both USE_ARES and USE_THREADS_WIN32 for synchronous DNS.
  515. */
  516. /* Define to enable c-ares asynchronous DNS lookups. */
  517. /* #define USE_ARES 1 */
  518. /* Default define to enable threaded asynchronous DNS lookups. */
  519. #if !defined(USE_SYNC_DNS) && !defined(USE_ARES) && \
  520. !defined(USE_THREADS_WIN32)
  521. # define USE_THREADS_WIN32 1
  522. #endif
  523. #if defined(USE_ARES) && defined(USE_THREADS_WIN32)
  524. # error "Only one DNS lookup specialty may be defined at most"
  525. #endif
  526. /* ---------------------------------------------------------------- */
  527. /* LDAP SUPPORT */
  528. /* ---------------------------------------------------------------- */
  529. #if defined(CURL_HAS_NOVELL_LDAPSDK) || defined(CURL_HAS_MOZILLA_LDAPSDK)
  530. #undef USE_WIN32_LDAP
  531. #define HAVE_LDAP_SSL_H 1
  532. #define HAVE_LDAP_URL_PARSE 1
  533. #elif defined(CURL_HAS_OPENLDAP_LDAPSDK)
  534. #undef USE_WIN32_LDAP
  535. #define HAVE_LDAP_URL_PARSE 1
  536. #else
  537. #undef HAVE_LDAP_URL_PARSE
  538. #define USE_WIN32_LDAP 1
  539. #endif
  540. #if defined(__WATCOMC__) && defined(USE_WIN32_LDAP)
  541. #if __WATCOMC__ < 1280
  542. #define WINBERAPI __declspec(cdecl)
  543. #define WINLDAPAPI __declspec(cdecl)
  544. #endif
  545. #endif
  546. #if defined(__POCC__) && defined(USE_WIN32_LDAP)
  547. # define CURL_DISABLE_LDAP 1
  548. #endif
  549. /* Define to use the Windows crypto library. */
  550. #if !defined(USE_OPENSSL) && !defined(USE_NSS)
  551. #define USE_WIN32_CRYPTO
  552. #endif
  553. /* ---------------------------------------------------------------- */
  554. /* ADDITIONAL DEFINITIONS */
  555. /* ---------------------------------------------------------------- */
  556. /* Define cpu-machine-OS */
  557. #undef OS
  558. #if defined(_M_IX86) || defined(__i386__) /* x86 (MSVC or gcc) */
  559. #define OS "i386-pc-win32"
  560. #elif defined(_M_X64) || defined(__x86_64__) /* x86_64 (MSVC >=2005 or gcc) */
  561. #define OS "x86_64-pc-win32"
  562. #elif defined(_M_IA64) /* Itanium */
  563. #define OS "ia64-pc-win32"
  564. #else
  565. #define OS "unknown-pc-win32"
  566. #endif
  567. /* Name of package */
  568. #define PACKAGE "curl"
  569. /* If you want to build curl with the built-in manual */
  570. #define USE_MANUAL 1
  571. #if defined(__POCC__) || defined(USE_IPV6)
  572. # define ENABLE_IPV6 1
  573. #endif
  574. #endif /* HEADER_CURL_CONFIG_WIN32_H */