config-win32.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594
  1. #ifndef __LIB_CONFIG_WIN32_H
  2. #define __LIB_CONFIG_WIN32_H
  3. /* ================================================================ */
  4. /* lib/config-win32.h - Hand crafted config file for Windows */
  5. /* ================================================================ */
  6. /* ---------------------------------------------------------------- */
  7. /* HEADER FILES */
  8. /* ---------------------------------------------------------------- */
  9. /* Define if you have the <arpa/inet.h> header file. */
  10. /* #define HAVE_ARPA_INET_H 1 */
  11. /* Define if you have the <assert.h> header file. */
  12. #define HAVE_ASSERT_H 1
  13. /* Define if you have the <crypto.h> header file. */
  14. /* #define HAVE_CRYPTO_H 1 */
  15. /* Define if you have the <err.h> header file. */
  16. /* #define HAVE_ERR_H 1 */
  17. /* Define if you have the <fcntl.h> header file. */
  18. #define HAVE_FCNTL_H 1
  19. /* Define if you have the <getopt.h> header file. */
  20. /* #define HAVE_GETOPT_H 1 */
  21. /* Define if you have the <io.h> header file. */
  22. #define HAVE_IO_H 1
  23. /* Define if you have the <limits.h> header file. */
  24. #define HAVE_LIMITS_H 1
  25. /* Define if you need the malloc.h header file even with stdlib.h */
  26. #if !defined(__SALFORDC__) && !defined(__POCC__)
  27. #define NEED_MALLOC_H 1
  28. #endif
  29. /* Define if you have the <netdb.h> header file. */
  30. /* #define HAVE_NETDB_H 1 */
  31. /* Define if you have the <netinet/in.h> header file. */
  32. /* #define HAVE_NETINET_IN_H 1 */
  33. /* Define if you have the <process.h> header file. */
  34. #ifndef __SALFORDC__
  35. #define HAVE_PROCESS_H 1
  36. #endif
  37. /* Define if you have the <signal.h> header file. */
  38. #define HAVE_SIGNAL_H 1
  39. /* Define if you have the <sgtty.h> header file. */
  40. /* #define HAVE_SGTTY_H 1 */
  41. /* Define if you have the <ssl.h> header file. */
  42. /* #define HAVE_SSL_H 1 */
  43. /* Define if you have the <stdlib.h> header file. */
  44. #define HAVE_STDLIB_H 1
  45. /* Define if you have the <sys/param.h> header file. */
  46. /* #define HAVE_SYS_PARAM_H 1 */
  47. /* Define if you have the <sys/select.h> header file. */
  48. /* #define HAVE_SYS_SELECT_H 1 */
  49. /* Define if you have the <sys/socket.h> header file. */
  50. /* #define HAVE_SYS_SOCKET_H 1 */
  51. /* Define if you have the <sys/sockio.h> header file. */
  52. /* #define HAVE_SYS_SOCKIO_H 1 */
  53. /* Define if you have the <sys/stat.h> header file. */
  54. #define HAVE_SYS_STAT_H 1
  55. /* Define if you have the <sys/time.h> header file */
  56. /* #define HAVE_SYS_TIME_H 1 */
  57. /* Define if you have the <sys/types.h> header file. */
  58. #define HAVE_SYS_TYPES_H 1
  59. /* Define if you have the <sys/utime.h> header file. */
  60. #ifndef __BORLANDC__
  61. #define HAVE_SYS_UTIME_H 1
  62. #endif
  63. /* Define if you have the <termio.h> header file. */
  64. /* #define HAVE_TERMIO_H 1 */
  65. /* Define if you have the <termios.h> header file. */
  66. /* #define HAVE_TERMIOS_H 1 */
  67. /* Define if you have the <time.h> header file. */
  68. #define HAVE_TIME_H 1
  69. /* Define if you have the <unistd.h> header file. */
  70. #if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__LCC__) || \
  71. defined(__POCC__)
  72. #define HAVE_UNISTD_H 1
  73. #endif
  74. /* Define if you have the <windows.h> header file. */
  75. #define HAVE_WINDOWS_H 1
  76. /* Define if you have the <winsock.h> header file. */
  77. #define HAVE_WINSOCK_H 1
  78. /* Define if you have the <winsock2.h> header file. */
  79. #ifndef __SALFORDC__
  80. #define HAVE_WINSOCK2_H 1
  81. #endif
  82. /* Define if you have the <ws2tcpip.h> header file. */
  83. #ifndef __SALFORDC__
  84. #define HAVE_WS2TCPIP_H 1
  85. #endif
  86. /* ---------------------------------------------------------------- */
  87. /* OTHER HEADER INFO */
  88. /* ---------------------------------------------------------------- */
  89. /* Define if sig_atomic_t is an available typedef. */
  90. #define HAVE_SIG_ATOMIC_T 1
  91. /* Define if you have the ANSI C header files. */
  92. #define STDC_HEADERS 1
  93. /* Define if you can safely include both <sys/time.h> and <time.h>. */
  94. /* #define TIME_WITH_SYS_TIME 1 */
  95. /* ---------------------------------------------------------------- */
  96. /* FUNCTIONS */
  97. /* ---------------------------------------------------------------- */
  98. /* Define if you have the closesocket function. */
  99. #define HAVE_CLOSESOCKET 1
  100. /* Define if you don't have vprintf but do have _doprnt. */
  101. /* #define HAVE_DOPRNT 1 */
  102. /* Define if you have the gethostbyaddr function. */
  103. #define HAVE_GETHOSTBYADDR 1
  104. /* Define if you have the gethostname function. */
  105. #define HAVE_GETHOSTNAME 1
  106. /* Define if you have the getpass function. */
  107. /* #define HAVE_GETPASS 1 */
  108. /* Define if you have the getservbyname function. */
  109. #define HAVE_GETSERVBYNAME 1
  110. /* Define if you have the getprotobyname function. */
  111. #define HAVE_GETPROTOBYNAME
  112. /* Define if you have the gettimeofday function. */
  113. /* #define HAVE_GETTIMEOFDAY 1 */
  114. /* Define if you have the inet_addr function. */
  115. #define HAVE_INET_ADDR 1
  116. /* Define if you have the ioctlsocket function. */
  117. #define HAVE_IOCTLSOCKET 1
  118. /* Define if you have a working ioctlsocket FIONBIO function. */
  119. #define HAVE_IOCTLSOCKET_FIONBIO 1
  120. /* Define if you have the perror function. */
  121. #define HAVE_PERROR 1
  122. /* Define if you have the RAND_screen function when using SSL */
  123. #define HAVE_RAND_SCREEN 1
  124. /* Define if you have the `RAND_status' function when using SSL. */
  125. #define HAVE_RAND_STATUS 1
  126. /* Define to 1 if you have the `CRYPTO_cleanup_all_ex_data' function.
  127. This is present in OpenSSL versions after 0.9.6b */
  128. #define HAVE_CRYPTO_CLEANUP_ALL_EX_DATA 1
  129. /* Define if you have the select function. */
  130. #define HAVE_SELECT 1
  131. /* Define if you have the setvbuf function. */
  132. #define HAVE_SETVBUF 1
  133. /* Define if you have the socket function. */
  134. #define HAVE_SOCKET 1
  135. /* Define if you have the strcasecmp function. */
  136. /* #define HAVE_STRCASECMP 1 */
  137. /* Define if you have the strdup function. */
  138. #define HAVE_STRDUP 1
  139. /* Define if you have the strftime function. */
  140. #define HAVE_STRFTIME 1
  141. /* Define if you have the stricmp function. */
  142. #define HAVE_STRICMP 1
  143. /* Define if you have the strncasecmp function. */
  144. /* #define HAVE_STRNCASECMP 1 */
  145. /* Define if you have the strnicmp function. */
  146. #define HAVE_STRNICMP 1
  147. /* Define if you have the strstr function. */
  148. #define HAVE_STRSTR 1
  149. /* Define if you have the strtoll function. */
  150. #if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__POCC__)
  151. #define HAVE_STRTOLL 1
  152. #endif
  153. /* Define if you have the tcgetattr function. */
  154. /* #define HAVE_TCGETATTR 1 */
  155. /* Define if you have the tcsetattr function. */
  156. /* #define HAVE_TCSETATTR 1 */
  157. /* Define if you have the utime function */
  158. #ifndef __BORLANDC__
  159. #define HAVE_UTIME 1
  160. #endif
  161. /* Define to the type qualifier of arg 1 for getnameinfo. */
  162. #define GETNAMEINFO_QUAL_ARG1 const
  163. /* Define to the type of arg 1 for getnameinfo. */
  164. #define GETNAMEINFO_TYPE_ARG1 struct sockaddr *
  165. /* Define to the type of arg 2 for getnameinfo. */
  166. #define GETNAMEINFO_TYPE_ARG2 socklen_t
  167. /* Define to the type of args 4 and 6 for getnameinfo. */
  168. #define GETNAMEINFO_TYPE_ARG46 DWORD
  169. /* Define to the type of arg 7 for getnameinfo. */
  170. #define GETNAMEINFO_TYPE_ARG7 int
  171. /* Define if you have the recv function. */
  172. #define HAVE_RECV 1
  173. /* Define to the type of arg 1 for recv. */
  174. #define RECV_TYPE_ARG1 SOCKET
  175. /* Define to the type of arg 2 for recv. */
  176. #define RECV_TYPE_ARG2 char *
  177. /* Define to the type of arg 3 for recv. */
  178. #define RECV_TYPE_ARG3 int
  179. /* Define to the type of arg 4 for recv. */
  180. #define RECV_TYPE_ARG4 int
  181. /* Define to the function return type for recv. */
  182. #define RECV_TYPE_RETV int
  183. /* Define if you have the recvfrom function. */
  184. #define HAVE_RECVFROM 1
  185. /* Define to the type of arg 1 for recvfrom. */
  186. #define RECVFROM_TYPE_ARG1 SOCKET
  187. /* Define to the type pointed by arg 2 for recvfrom. */
  188. #define RECVFROM_TYPE_ARG2 char
  189. /* Define to the type of arg 3 for recvfrom. */
  190. #define RECVFROM_TYPE_ARG3 int
  191. /* Define to the type of arg 4 for recvfrom. */
  192. #define RECVFROM_TYPE_ARG4 int
  193. /* Define to the type pointed by arg 5 for recvfrom. */
  194. #define RECVFROM_TYPE_ARG5 struct sockaddr
  195. /* Define to the type pointed by arg 6 for recvfrom. */
  196. #define RECVFROM_TYPE_ARG6 int
  197. /* Define to the function return type for recvfrom. */
  198. #define RECVFROM_TYPE_RETV int
  199. /* Define if you have the send function. */
  200. #define HAVE_SEND 1
  201. /* Define to the type of arg 1 for send. */
  202. #define SEND_TYPE_ARG1 SOCKET
  203. /* Define to the type qualifier of arg 2 for send. */
  204. #define SEND_QUAL_ARG2 const
  205. /* Define to the type of arg 2 for send. */
  206. #define SEND_TYPE_ARG2 char *
  207. /* Define to the type of arg 3 for send. */
  208. #define SEND_TYPE_ARG3 int
  209. /* Define to the type of arg 4 for send. */
  210. #define SEND_TYPE_ARG4 int
  211. /* Define to the function return type for send. */
  212. #define SEND_TYPE_RETV int
  213. /* ---------------------------------------------------------------- */
  214. /* TYPEDEF REPLACEMENTS */
  215. /* ---------------------------------------------------------------- */
  216. /* Define this if in_addr_t is not an available 'typedefed' type */
  217. #define in_addr_t unsigned long
  218. /* Define as the return type of signal handlers (int or void). */
  219. #define RETSIGTYPE void
  220. /* Define ssize_t if it is not an available 'typedefed' type */
  221. #ifndef _SSIZE_T_DEFINED
  222. # if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || \
  223. defined(__POCC__) || \
  224. defined(__MINGW32__)
  225. # elif defined(_WIN64)
  226. # define _SSIZE_T_DEFINED
  227. # define ssize_t __int64
  228. # else
  229. # define _SSIZE_T_DEFINED
  230. # define ssize_t int
  231. # endif
  232. #endif
  233. /* ---------------------------------------------------------------- */
  234. /* TYPE SIZES */
  235. /* ---------------------------------------------------------------- */
  236. /* The size of `int', as computed by sizeof. */
  237. #define SIZEOF_INT 4
  238. /* The size of `long double', as computed by sizeof. */
  239. #define SIZEOF_LONG_DOUBLE 16
  240. /* The size of `long long', as computed by sizeof. */
  241. /* #define SIZEOF_LONG_LONG 8 */
  242. /* The size of `short', as computed by sizeof. */
  243. #define SIZEOF_SHORT 2
  244. /* The size of `size_t', as computed by sizeof. */
  245. #if defined(_WIN64)
  246. # define SIZEOF_SIZE_T 8
  247. #else
  248. # define SIZEOF_SIZE_T 4
  249. #endif
  250. /* ---------------------------------------------------------------- */
  251. /* STRUCT RELATED */
  252. /* ---------------------------------------------------------------- */
  253. /* Define this if you have struct sockaddr_storage */
  254. #ifndef __SALFORDC__
  255. #define HAVE_STRUCT_SOCKADDR_STORAGE 1
  256. #endif
  257. /* Define this if you have struct timeval */
  258. #define HAVE_STRUCT_TIMEVAL 1
  259. /* ---------------------------------------------------------------- */
  260. /* Watt-32 tcp/ip SPECIFIC */
  261. /* ---------------------------------------------------------------- */
  262. #ifdef USE_WATT32
  263. #include <tcp.h>
  264. #undef byte
  265. #undef word
  266. #undef USE_WINSOCK
  267. #undef HAVE_WINSOCK_H
  268. #undef HAVE_WINSOCK2_H
  269. #undef HAVE_WS2TCPIP_H
  270. #define HAVE_GETADDRINFO
  271. #define HAVE_GETNAMEINFO
  272. #define HAVE_SYS_IOCTL_H
  273. #define HAVE_SYS_SOCKET_H
  274. #define HAVE_NETINET_IN_H
  275. #define HAVE_NETDB_H
  276. #define HAVE_ARPA_INET_H
  277. #define HAVE_FREEADDRINFO
  278. #define SOCKET int
  279. #endif
  280. /* ---------------------------------------------------------------- */
  281. /* COMPILER SPECIFIC */
  282. /* ---------------------------------------------------------------- */
  283. /* Undef keyword 'const' if it does not work. */
  284. /* #undef const */
  285. /* Windows should not have HAVE_GMTIME_R defined */
  286. /* #undef HAVE_GMTIME_R */
  287. /* Define if the compiler supports C99 variadic macro style. */
  288. #if defined(_MSC_VER) && (_MSC_VER >= 1400)
  289. #define HAVE_VARIADIC_MACROS_C99 1
  290. #endif
  291. /* Define if the compiler supports the 'long long' data type. */
  292. #if defined(__MINGW32__) || defined(__WATCOMC__)
  293. #define HAVE_LONGLONG 1
  294. #endif
  295. /* Define to avoid VS2005 complaining about portable C functions */
  296. #if defined(_MSC_VER) && (_MSC_VER >= 1400)
  297. #define _CRT_SECURE_NO_DEPRECATE 1
  298. #define _CRT_NONSTDC_NO_DEPRECATE 1
  299. #endif
  300. /* VS2005 and later dafault size for time_t is 64-bit, unless */
  301. /* _USE_32BIT_TIME_T has been defined to get a 32-bit time_t. */
  302. #if defined(_MSC_VER) && (_MSC_VER >= 1400)
  303. # ifndef _USE_32BIT_TIME_T
  304. # define SIZEOF_TIME_T 8
  305. # else
  306. # define SIZEOF_TIME_T 4
  307. # endif
  308. #endif
  309. /* Officially, Microsoft's Windows SDK versions 6.X do not support Windows
  310. 2000 as a supported build target. VS2008 default installations provide an
  311. embedded Windows SDK v6.0A along with the claim that Windows 2000 is a
  312. valid build target for VS2008. Popular belief is that binaries built using
  313. Windows SDK versions 6.X and Windows 2000 as a build target are functional */
  314. #if defined(_MSC_VER) && (_MSC_VER >= 1500)
  315. # define VS2008_MINIMUM_TARGET 0x0500
  316. #endif
  317. /* When no build target is specified VS2008 default build target is Windows
  318. Vista, which leaves out even Winsows XP. If no build target has been given
  319. for VS2008 we will target the minimum Officially supported build target,
  320. which happens to be Windows XP. */
  321. #if defined(_MSC_VER) && (_MSC_VER >= 1500)
  322. # define VS2008_DEFAULT_TARGET 0x0501
  323. #endif
  324. /* VS2008 default target settings and minimum build target check */
  325. #if defined(_MSC_VER) && (_MSC_VER >= 1500)
  326. # ifndef _WIN32_WINNT
  327. # define _WIN32_WINNT VS2008_DEFAULT_TARGET
  328. # endif
  329. # ifndef WINVER
  330. # define WINVER VS2008_DEFAULT_TARGET
  331. # endif
  332. # if (_WIN32_WINNT < VS2008_MINIMUM_TARGET) || (WINVER < VS2008_MINIMUM_TARGET)
  333. # error VS2008 does not support Windows build targets prior to Windows 2000
  334. # endif
  335. #endif
  336. /* When no build target is specified Pelles C 5.00 and later default build
  337. target is Windows Vista. We override default target to be Windows 2000. */
  338. #if defined(__POCC__) && (__POCC__ >= 500)
  339. # ifndef _WIN32_WINNT
  340. # define _WIN32_WINNT 0x0500
  341. # endif
  342. # ifndef WINVER
  343. # define WINVER 0x0500
  344. # endif
  345. #endif
  346. /* Availability of freeaddrinfo, getaddrinfo and getnameinfo functions is
  347. quite convoluted, compiler dependent and even build target dependent. */
  348. #if defined(HAVE_WS2TCPIP_H)
  349. # if defined(__POCC__)
  350. # define HAVE_FREEADDRINFO 1
  351. # define HAVE_GETADDRINFO 1
  352. # define HAVE_GETADDRINFO_THREADSAFE 1
  353. # define HAVE_GETNAMEINFO 1
  354. # elif defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
  355. # define HAVE_FREEADDRINFO 1
  356. # define HAVE_GETADDRINFO 1
  357. # define HAVE_GETADDRINFO_THREADSAFE 1
  358. # define HAVE_GETNAMEINFO 1
  359. # elif defined(_MSC_VER) && (_MSC_VER >= 1200)
  360. # define HAVE_FREEADDRINFO 1
  361. # define HAVE_GETADDRINFO 1
  362. # define HAVE_GETADDRINFO_THREADSAFE 1
  363. # define HAVE_GETNAMEINFO 1
  364. # endif
  365. #endif
  366. #if defined(__POCC__)
  367. # ifndef _MSC_VER
  368. # error Microsoft extensions /Ze compiler option is required
  369. # endif
  370. # ifndef __POCC__OLDNAMES
  371. # error Compatibility names /Go compiler option is required
  372. # endif
  373. #endif
  374. /* ---------------------------------------------------------------- */
  375. /* LARGE FILE SUPPORT */
  376. /* ---------------------------------------------------------------- */
  377. #if defined(_MSC_VER) && !defined(_WIN32_WCE)
  378. # if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64)
  379. # define USE_WIN32_LARGE_FILES
  380. # else
  381. # define USE_WIN32_SMALL_FILES
  382. # endif
  383. #endif
  384. #if defined(__MINGW32__) && !defined(USE_WIN32_LARGE_FILES)
  385. # define USE_WIN32_LARGE_FILES
  386. #endif
  387. #if defined(__WATCOMC__) && !defined(USE_WIN32_LARGE_FILES)
  388. # define USE_WIN32_LARGE_FILES
  389. #endif
  390. #if defined(__POCC__)
  391. # undef USE_WIN32_LARGE_FILES
  392. #endif
  393. #if !defined(USE_WIN32_LARGE_FILES) && !defined(USE_WIN32_SMALL_FILES)
  394. # define USE_WIN32_SMALL_FILES
  395. #endif
  396. /* ---------------------------------------------------------------- */
  397. /* DNS RESOLVER SPECIALTY */
  398. /* ---------------------------------------------------------------- */
  399. /*
  400. * Undefine both USE_ARES and USE_THREADS_WIN32 for synchronous DNS
  401. */
  402. /* Define USE_ARES to enable c-ares asynchronous DNS lookups */
  403. /* #define USE_ARES 1 */
  404. /* Define USE_THREADS_WIN32 to enable threaded asynchronous DNS lookups */
  405. #define USE_THREADS_WIN32 1
  406. #if defined(USE_ARES) && defined(USE_THREADS_WIN32)
  407. # error "Only one DNS lookup specialty may be defined at most"
  408. #endif
  409. /* ---------------------------------------------------------------- */
  410. /* LDAP SUPPORT */
  411. /* ---------------------------------------------------------------- */
  412. #if defined(CURL_HAS_NOVELL_LDAPSDK) || defined(CURL_HAS_MOZILLA_LDAPSDK)
  413. #undef CURL_LDAP_WIN
  414. #define HAVE_LDAP_SSL_H 1
  415. #define HAVE_LDAP_URL_PARSE 1
  416. #elif defined(CURL_HAS_OPENLDAP_LDAPSDK)
  417. #undef CURL_LDAP_WIN
  418. #define HAVE_LDAP_URL_PARSE 1
  419. #else
  420. #undef HAVE_LDAP_URL_PARSE
  421. #define CURL_LDAP_WIN 1
  422. #endif
  423. #if defined(__WATCOMC__) && defined(CURL_LDAP_WIN)
  424. #if __WATCOMC__ < 1280
  425. #define WINBERAPI __declspec(cdecl)
  426. #define WINLDAPAPI __declspec(cdecl)
  427. #endif
  428. #endif
  429. #if defined(__POCC__) && defined(CURL_LDAP_WIN)
  430. # define CURL_DISABLE_LDAP 1
  431. #endif
  432. /* ---------------------------------------------------------------- */
  433. /* ADDITIONAL DEFINITIONS */
  434. /* ---------------------------------------------------------------- */
  435. /* Define cpu-machine-OS */
  436. #undef OS
  437. #if defined(_M_IX86) || defined(__i386__) /* x86 (MSVC or gcc) */
  438. #define OS "i386-pc-win32"
  439. #elif defined(_M_IA64) /* Itanium */
  440. #define OS "ia64-pc-win32"
  441. #elif defined(_M_X64) /* AMD64/EM64T - Not defined until MSVC 2005 */
  442. #define OS "amd64-pc-win32"
  443. #else
  444. #define OS "unknown-pc-win32"
  445. #endif
  446. /* Name of package */
  447. #define PACKAGE "curl"
  448. #if defined(__POCC__) || (USE_IPV6)
  449. # define ENABLE_IPV6 1
  450. #endif
  451. #endif /* __LIB_CONFIG_WIN32_H */