Windows build targets have socklen_t definition in ws2tcpip.h but some
[platform/upstream/curl.git] / lib / config-win32.h
1 #ifndef __LIB_CONFIG_WIN32_H
2 #define __LIB_CONFIG_WIN32_H
3
4 /* ================================================================ */
5 /*    lib/config-win32.h - Hand crafted config file for Windows     */
6 /* ================================================================ */
7
8 /* ---------------------------------------------------------------- */
9 /*                          HEADER FILES                            */
10 /* ---------------------------------------------------------------- */
11
12 /* Define if you have the <arpa/inet.h> header file.  */
13 /* #define HAVE_ARPA_INET_H 1 */
14
15 /* Define if you have the <assert.h> header file.  */
16 #define HAVE_ASSERT_H 1
17
18 /* Define if you have the <crypto.h> header file.  */
19 /* #define HAVE_CRYPTO_H 1 */
20
21 /* Define if you have the <err.h> header file.  */
22 /* #define HAVE_ERR_H 1 */
23
24 /* Define if you have the <fcntl.h> header file.  */
25 #define HAVE_FCNTL_H 1
26
27 /* Define if you have the <getopt.h> header file.  */
28 /* #define HAVE_GETOPT_H 1 */
29
30 /* Define if you have the <io.h> header file.  */
31 #define HAVE_IO_H 1
32
33 /* Define if you need the malloc.h header file even with stdlib.h  */
34 #ifndef __SALFORDC__
35 #define NEED_MALLOC_H 1
36 #endif
37
38 /* Define if you have the <netdb.h> header file.  */
39 /* #define HAVE_NETDB_H 1 */
40
41 /* Define if you have the <netinet/in.h> header file.  */
42 /* #define HAVE_NETINET_IN_H 1 */
43
44 /* Define if you have the <process.h> header file.  */
45 #ifndef __SALFORDC__
46 #define HAVE_PROCESS_H 1
47 #endif
48
49 /* Define if you have the <signal.h> header file. */
50 #define HAVE_SIGNAL_H 1
51
52 /* Define if you have the <sgtty.h> header file.  */
53 /* #define HAVE_SGTTY_H 1 */
54
55 /* Define if you have the <ssl.h> header file.  */
56 /* #define HAVE_SSL_H 1 */
57
58 /* Define if you have the <stdlib.h> header file.  */
59 #define HAVE_STDLIB_H 1
60
61 /* Define if you have the <sys/param.h> header file.  */
62 /* #define HAVE_SYS_PARAM_H 1 */
63
64 /* Define if you have the <sys/select.h> header file.  */
65 /* #define HAVE_SYS_SELECT_H 1 */
66
67 /* Define if you have the <sys/socket.h> header file.  */
68 /* #define HAVE_SYS_SOCKET_H 1 */
69
70 /* Define if you have the <sys/sockio.h> header file.  */
71 /* #define HAVE_SYS_SOCKIO_H 1 */
72
73 /* Define if you have the <sys/stat.h> header file.  */
74 #define HAVE_SYS_STAT_H 1
75
76 /* Define if you have the <sys/time.h> header file */
77 /* #define HAVE_SYS_TIME_H 1 */
78
79 /* Define if you have the <sys/types.h> header file.  */
80 #define HAVE_SYS_TYPES_H 1
81
82 /* Define if you have the <sys/utime.h> header file */
83 #ifndef __BORLANDC__
84 #define HAVE_SYS_UTIME_H 1
85 #endif
86
87 /* Define if you have the <termio.h> header file.  */
88 /* #define HAVE_TERMIO_H 1 */
89
90 /* Define if you have the <termios.h> header file.  */
91 /* #define HAVE_TERMIOS_H 1 */
92
93 /* Define if you have the <time.h> header file.  */
94 #define HAVE_TIME_H 1
95
96 /* Define if you have the <unistd.h> header file.  */
97 #if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__LCC__) || \
98     defined(__POCC__)
99 #define HAVE_UNISTD_H 1
100 #endif
101
102 /* Define if you have the <windows.h> header file.  */
103 #define HAVE_WINDOWS_H 1
104
105 /* Define if you have the <winsock.h> header file.  */
106 #define HAVE_WINSOCK_H 1
107
108 #ifndef __SALFORDC__
109 /* Define if you have the <winsock2.h> header file.  */
110 #define HAVE_WINSOCK2_H 1
111
112 /* Define if you have the <ws2tcpip.h> header file.  */
113 #define HAVE_WS2TCPIP_H 1
114 #endif
115
116 /* ---------------------------------------------------------------- */
117 /*                        OTHER HEADER INFO                         */
118 /* ---------------------------------------------------------------- */
119
120 /* Define if sig_atomic_t is an available typedef. */
121 #define HAVE_SIG_ATOMIC_T 1
122
123 /* Define if you have the ANSI C header files.  */
124 #define STDC_HEADERS 1
125
126 /* Define if you can safely include both <sys/time.h> and <time.h>.  */
127 /* #define TIME_WITH_SYS_TIME 1 */
128
129 /* ---------------------------------------------------------------- */
130 /*                             FUNCTIONS                            */
131 /* ---------------------------------------------------------------- */
132
133 /* Define if you have the closesocket function.  */
134 #define HAVE_CLOSESOCKET 1
135
136 /* Define if you don't have vprintf but do have _doprnt.  */
137 /* #define HAVE_DOPRNT 1 */
138
139 /* Define if you have the gethostbyaddr function.  */
140 #define HAVE_GETHOSTBYADDR 1
141
142 /* Define if you have the gethostname function.  */
143 #define HAVE_GETHOSTNAME 1
144
145 /* Define if you have the getpass function.  */
146 /* #define HAVE_GETPASS 1 */
147
148 /* Define if you have the getservbyname function.  */
149 #define HAVE_GETSERVBYNAME 1
150
151 /* Define if you have the getprotobyname function.  */
152 #define HAVE_GETPROTOBYNAME
153
154 /* Define if you have the gettimeofday function.  */
155 /* #define HAVE_GETTIMEOFDAY 1 */
156
157 /* Define if you have the inet_addr function.  */
158 #define HAVE_INET_ADDR 1
159
160 /* Define if you have the inet_ntoa function.  */
161 #define HAVE_INET_NTOA 1
162
163 /* Define if you have the ioctlsocket function.  */
164 #define HAVE_IOCTLSOCKET 1
165
166 /* Define if you have the perror function.  */
167 #define HAVE_PERROR 1
168
169 /* Define if you have the RAND_screen function when using SSL  */
170 #define HAVE_RAND_SCREEN 1
171
172 /* Define if you have the `RAND_status' function when using SSL. */
173 #define HAVE_RAND_STATUS 1
174
175 /* Define if you have the select function.  */
176 #define HAVE_SELECT 1
177
178 /* Define if you have the setvbuf function.  */
179 #define HAVE_SETVBUF 1
180
181 /* Define if you have the socket function.  */
182 #define HAVE_SOCKET 1
183
184 /* Define if you have the strcasecmp function.  */
185 /* #define HAVE_STRCASECMP 1 */
186
187 /* Define if you have the stricmp function.  */
188 #define HAVE_STRICMP 1
189
190 /* Define if you have the strdup function.  */
191 #define HAVE_STRDUP 1
192
193 /* Define if you have the strftime function.  */
194 #define HAVE_STRFTIME 1
195
196 /* Define if you have the strstr function.  */
197 #define HAVE_STRSTR 1
198
199 /* Define if you have the strtoll function.  */
200 #if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__POCC__)
201 #define HAVE_STRTOLL 1
202 #endif
203
204 /* Define if you have the tcgetattr function.  */
205 /* #define HAVE_TCGETATTR 1 */
206
207 /* Define if you have the tcsetattr function.  */
208 /* #define HAVE_TCSETATTR 1 */
209
210 /* Define if you have the utime function */
211 #ifndef __BORLANDC__
212 #define HAVE_UTIME 1
213 #endif
214
215 /* Define if you have the getnameinfo function. */
216 #define HAVE_GETNAMEINFO 1
217
218 /* Define to the type qualifier of arg 1 for getnameinfo. */
219 #define GETNAMEINFO_QUAL_ARG1 const
220
221 /* Define to the type of arg 1 for getnameinfo. */
222 #define GETNAMEINFO_TYPE_ARG1 struct sockaddr *
223
224 /* Define to the type of arg 2 for getnameinfo. */
225 #define GETNAMEINFO_TYPE_ARG2 socklen_t
226
227 /* Define to the type of args 4 and 6 for getnameinfo. */
228 #define GETNAMEINFO_TYPE_ARG46 DWORD
229
230 /* Define to the type of arg 7 for getnameinfo. */
231 #define GETNAMEINFO_TYPE_ARG7 int
232
233 /* Define if you have the recv function. */
234 #define HAVE_RECV 1
235
236 /* Define to the type of arg 1 for recv. */
237 #define RECV_TYPE_ARG1 SOCKET
238
239 /* Define to the type of arg 2 for recv. */
240 #define RECV_TYPE_ARG2 char *
241
242 /* Define to the type of arg 3 for recv. */
243 #define RECV_TYPE_ARG3 int
244
245 /* Define to the type of arg 4 for recv. */
246 #define RECV_TYPE_ARG4 int
247
248 /* Define to the function return type for recv. */
249 #define RECV_TYPE_RETV int
250
251 /* Define if you have the send function. */
252 #define HAVE_SEND 1
253
254 /* Define to the type of arg 1 for send. */
255 #define SEND_TYPE_ARG1 SOCKET
256
257 /* Define to the type qualifier of arg 2 for send. */
258 #define SEND_QUAL_ARG2 const
259
260 /* Define to the type of arg 2 for send. */
261 #define SEND_TYPE_ARG2 char *
262
263 /* Define to the type of arg 3 for send. */
264 #define SEND_TYPE_ARG3 int
265
266 /* Define to the type of arg 4 for send. */
267 #define SEND_TYPE_ARG4 int
268
269 /* Define to the function return type for send. */
270 #define SEND_TYPE_RETV int
271
272 /* ---------------------------------------------------------------- */
273 /*                       TYPEDEF REPLACEMENTS                       */
274 /* ---------------------------------------------------------------- */
275
276 /* Define this if in_addr_t is not an available 'typedefed' type */
277 #define in_addr_t unsigned long
278
279 /* Define as the return type of signal handlers (int or void).  */
280 #define RETSIGTYPE void
281
282 #ifndef _SSIZE_T_DEFINED
283 #if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || defined(__POCC__) || \
284     defined(__MINGW32__)
285 #elif defined(_WIN64)
286 #define ssize_t __int64
287 #else
288 #define ssize_t int
289 #endif
290 #define _SSIZE_T_DEFINED
291 #endif
292
293 /* ---------------------------------------------------------------- */
294 /*                            TYPE SIZES                            */
295 /* ---------------------------------------------------------------- */
296
297 /* The number of bytes in a long double.  */
298 #define SIZEOF_LONG_DOUBLE 16
299
300 /* The number of bytes in a long long.  */
301 /* #define SIZEOF_LONG_LONG 8 */
302
303 /* Undef SIZEOF_CURL_OFF_T if already defined. */
304 #ifdef SIZEOF_CURL_OFF_T
305 #undef SIZEOF_CURL_OFF_T
306 #endif
307
308 /* Define SIZEOF_CURL_OFF_T as computed by sizeof(curl_off_t) */
309 /* Borland/PellesC/SalfordC lacks _lseeki64(), so we don't support
310  * >2GB files.
311  */
312 #if defined(__BORLANDC__) || defined(__POCC__) || defined(__SALFORDC__)
313 #define SIZEOF_CURL_OFF_T 4
314 #else
315 #define SIZEOF_CURL_OFF_T 8
316 #endif
317
318 /* ---------------------------------------------------------------- */
319 /*                          STRUCT RELATED                          */
320 /* ---------------------------------------------------------------- */
321
322 /* Define this if you have struct sockaddr_storage */
323 #ifndef __SALFORDC__
324 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
325 #endif
326
327 /* Define this if you have struct timeval */
328 #define HAVE_STRUCT_TIMEVAL 1
329
330 /* ---------------------------------------------------------------- */
331 /*                        COMPILER SPECIFIC                         */
332 /* ---------------------------------------------------------------- */
333
334 /* Undef keyword 'const' if it does not work.  */
335 /* #undef const */
336
337 /* Windows should not have HAVE_GMTIME_R defined */
338 /* #undef HAVE_GMTIME_R */
339
340 /* Define if the compiler supports C99 variadic macro style. */
341 #if defined(_MSC_VER) && (_MSC_VER >= 1400)
342 #define HAVE_VARIADIC_MACROS_C99 1
343 #endif
344
345 /* Define if the compiler supports LONGLONG. */
346 #if defined(__MINGW32__) || defined(__WATCOMC__)
347 #define HAVE_LONGLONG 1
348 #endif
349
350 /* ---------------------------------------------------------------- */
351 /*                           LDAP SUPPORT                           */
352 /* ---------------------------------------------------------------- */
353
354 #if defined(CURL_HAS_NOVELL_LDAPSDK) || defined(CURL_HAS_MOZILLA_LDAPSDK)
355 #undef CURL_LDAP_HYBRID
356 #undef CURL_LDAP_WIN
357 #define HAVE_LDAP_SSL_H 1
358 #define HAVE_LDAP_URL_PARSE 1
359 #elif defined(CURL_HAS_OPENLDAP_LDAPSDK)
360 #undef CURL_LDAP_HYBRID
361 #undef CURL_LDAP_WIN
362 #define HAVE_LDAP_URL_PARSE 1
363 #else
364 #undef CURL_LDAP_HYBRID
365 #undef HAVE_LDAP_URL_PARSE
366 #define CURL_LDAP_WIN 1
367 #endif
368
369 /* ---------------------------------------------------------------- */
370 /*                       ADDITIONAL DEFINITIONS                     */
371 /* ---------------------------------------------------------------- */
372
373 /* Defines set for VS2005 to _not_ deprecate a few functions we use. */
374 #define _CRT_SECURE_NO_DEPRECATE 1
375 #define _CRT_NONSTDC_NO_DEPRECATE 1
376
377 /* Define cpu-machine-OS */
378 #undef OS
379 #if defined(_M_IX86) || defined(__i386__) /* x86 (MSVC or gcc) */
380 #define OS "i386-pc-win32"
381 #elif defined(_M_IA64) /* Itanium */
382 #define OS "ia64-pc-win32"
383 #elif defined(_M_X64) /* AMD64/EM64T - Not defined until MSVC 2005 */
384 #define OS "amd64-pc-win32"
385 #else
386 #define OS "unknown-pc-win32"
387 #endif
388
389 /* Name of package */
390 #define PACKAGE "curl"
391
392
393 #endif /* __LIB_CONFIG_WIN32_H */