Git init
[external/curl.git] / src / config-win32.h
1 #ifndef __SRC_CONFIG_WIN32_H
2 #define __SRC_CONFIG_WIN32_H
3
4 /* ================================================================ */
5 /*    src/config-win32.h - Hand crafted config file for windows     */
6 /* ================================================================ */
7
8 /* ---------------------------------------------------------------- */
9 /*                          HEADER FILES                            */
10 /* ---------------------------------------------------------------- */
11
12 /* Define if you have the <fcntl.h> header file.  */
13 #define HAVE_FCNTL_H 1
14
15 /* Define if you have the <io.h> header file.  */
16 #define HAVE_IO_H 1
17
18 /* Define if you have the <limits.h> header file.  */
19 #define HAVE_LIMITS_H 1
20
21 /* Define if you have the <locale.h> header file.  */
22 #define HAVE_LOCALE_H 1
23
24 /* Define if you need the malloc.h header file even with stdlib.h  */
25 #if !defined(__SALFORDC__) && !defined(__POCC__)
26 #define NEED_MALLOC_H 1
27 #endif
28
29 /* Define if you have the <signal.h> header file. */
30 #define HAVE_SIGNAL_H 1
31
32 /* Define if you have the <stdlib.h> header file.  */
33 #define HAVE_STDLIB_H 1
34
35 /* Define if you have the <sys/time.h> header file */
36 /* #define HAVE_SYS_TIME_H 1 */
37
38 /* Define if you have the <sys/types.h> header file.  */
39 #define HAVE_SYS_TYPES_H 1
40
41 /* Define if you have the <sys/utime.h> header file.  */
42 #ifndef __BORLANDC__
43 #define HAVE_SYS_UTIME_H 1
44 #endif
45
46 /* Define if you have the <time.h> header file.  */
47 #define HAVE_TIME_H 1
48
49 /* Define if you have the <unistd.h> header file.  */
50 #if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__LCC__) || \
51     defined(__POCC__)
52 #define HAVE_UNISTD_H 1
53 #endif
54
55 /* Define if you have the <windows.h> header file.  */
56 #define HAVE_WINDOWS_H 1
57
58 /* Define if you have the <winsock.h> header file.  */
59 #define HAVE_WINSOCK_H 1
60
61 /* Define if you have the <winsock2.h> header file.  */
62 #ifndef __SALFORDC__
63 #define HAVE_WINSOCK2_H 1
64 #endif
65
66 /* Define if you have the <ws2tcpip.h> header file.  */
67 #ifndef __SALFORDC__
68 #define HAVE_WS2TCPIP_H 1
69 #endif
70
71 /* ---------------------------------------------------------------- */
72 /*                        OTHER HEADER INFO                         */
73 /* ---------------------------------------------------------------- */
74
75 /* Define if sig_atomic_t is an available typedef. */
76 #define HAVE_SIG_ATOMIC_T 1
77
78 /* Define if you have the ANSI C header files.  */
79 #define STDC_HEADERS 1
80
81 /* Define if you can safely include both <sys/time.h> and <time.h>.  */
82 /* #define TIME_WITH_SYS_TIME 1 */
83
84 /* ---------------------------------------------------------------- */
85 /*                             FUNCTIONS                            */
86 /* ---------------------------------------------------------------- */
87
88 /* Define if you have the ftruncate function.  */
89 #define HAVE_FTRUNCATE 1
90
91 /* Define if you have the ioctlsocket function. */
92 #define HAVE_IOCTLSOCKET 1
93
94 /* Define if you have a working ioctlsocket FIONBIO function. */
95 #define HAVE_IOCTLSOCKET_FIONBIO 1
96
97 /* Define if you have the setlocale function.  */
98 #define HAVE_SETLOCALE 1
99
100 /* Define if you have the setmode function. */
101 #define HAVE_SETMODE 1
102
103 /* Define if you have the strcasecmp function. */
104 /* #define HAVE_STRCASECMP 1 */
105
106 /* Define if you have the strdup function.  */
107 #define HAVE_STRDUP 1
108
109 /* Define if you have the stricmp function.  */
110 #define HAVE_STRICMP 1
111
112 /* Define if you have the strncasecmp function. */
113 /* #define HAVE_STRNCASECMP 1 */
114
115 /* Define if you have the strnicmp function. */
116 #define HAVE_STRNICMP 1
117
118 /* Define if you have the utime function */
119 #ifndef __BORLANDC__
120 #define HAVE_UTIME 1
121 #endif
122
123 /* Define if you have the recv function. */
124 #define HAVE_RECV 1
125
126 /* Define to the type of arg 1 for recv. */
127 #define RECV_TYPE_ARG1 SOCKET
128
129 /* Define to the type of arg 2 for recv. */
130 #define RECV_TYPE_ARG2 char *
131
132 /* Define to the type of arg 3 for recv. */
133 #define RECV_TYPE_ARG3 int
134
135 /* Define to the type of arg 4 for recv. */
136 #define RECV_TYPE_ARG4 int
137
138 /* Define to the function return type for recv. */
139 #define RECV_TYPE_RETV int
140
141 /* Define if you have the recvfrom function. */
142 #define HAVE_RECVFROM 1
143
144 /* Define to the type of arg 1 for recvfrom. */
145 #define RECVFROM_TYPE_ARG1 SOCKET
146
147 /* Define to the type pointed by arg 2 for recvfrom. */
148 #define RECVFROM_TYPE_ARG2 char
149
150 /* Define to the type of arg 3 for recvfrom. */
151 #define RECVFROM_TYPE_ARG3 int
152
153 /* Define to the type of arg 4 for recvfrom. */
154 #define RECVFROM_TYPE_ARG4 int
155
156 /* Define to the type pointed by arg 5 for recvfrom. */
157 #define RECVFROM_TYPE_ARG5 struct sockaddr
158
159 /* Define to the type pointed by arg 6 for recvfrom. */
160 #define RECVFROM_TYPE_ARG6 int
161
162 /* Define to the function return type for recvfrom. */
163 #define RECVFROM_TYPE_RETV int
164
165 /* Define if you have the send function. */
166 #define HAVE_SEND 1
167
168 /* Define to the type of arg 1 for send. */
169 #define SEND_TYPE_ARG1 SOCKET
170
171 /* Define to the type qualifier of arg 2 for send. */
172 #define SEND_QUAL_ARG2 const
173
174 /* Define to the type of arg 2 for send. */
175 #define SEND_TYPE_ARG2 char *
176
177 /* Define to the type of arg 3 for send. */
178 #define SEND_TYPE_ARG3 int
179
180 /* Define to the type of arg 4 for send. */
181 #define SEND_TYPE_ARG4 int
182
183 /* Define to the function return type for send. */
184 #define SEND_TYPE_RETV int
185
186 /* ---------------------------------------------------------------- */
187 /*                       TYPEDEF REPLACEMENTS                       */
188 /* ---------------------------------------------------------------- */
189
190 /* Define this if in_addr_t is not an available 'typedefed' type */
191 #define in_addr_t unsigned long
192
193 /* Define as the return type of signal handlers (int or void).  */
194 #define RETSIGTYPE void
195
196 /* Define ssize_t if it is not an available 'typedefed' type */
197 #ifndef _SSIZE_T_DEFINED
198 #  if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || \
199       defined(__POCC__) || \
200       defined(__MINGW32__)
201 #  elif defined(_WIN64)
202 #    define _SSIZE_T_DEFINED
203 #    define ssize_t __int64
204 #  else
205 #    define _SSIZE_T_DEFINED
206 #    define ssize_t int
207 #  endif
208 #endif
209
210 /* ---------------------------------------------------------------- */
211 /*                            TYPE SIZES                            */
212 /* ---------------------------------------------------------------- */
213
214 /* The size of `int', as computed by sizeof. */
215 #define SIZEOF_INT 4
216
217 /* The size of `long double', as computed by sizeof. */
218 #define SIZEOF_LONG_DOUBLE 16
219
220 /* The size of `long long', as computed by sizeof. */
221 /* #define SIZEOF_LONG_LONG 8 */
222
223 /* The size of `short', as computed by sizeof. */
224 #define SIZEOF_SHORT 2
225
226 /* ---------------------------------------------------------------- */
227 /*                          STRUCT RELATED                          */
228 /* ---------------------------------------------------------------- */
229
230 /* Define this if you have struct sockaddr_storage */
231 #ifndef __SALFORDC__
232 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
233 #endif
234
235 /* Define this if you have struct timeval */
236 #define HAVE_STRUCT_TIMEVAL 1
237
238 /* Define this if struct sockaddr_in6 has the sin6_scope_id member */
239 #define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
240
241 /* ---------------------------------------------------------------- */
242 /*                        Watt-32 tcp/ip SPECIFIC                   */
243 /* ---------------------------------------------------------------- */
244
245 #ifdef USE_WATT32
246   #include <tcp.h>
247   #undef byte
248   #undef word
249   #undef USE_WINSOCK
250   #undef HAVE_WINSOCK_H
251   #undef HAVE_WINSOCK2_H
252   #undef HAVE_WS2TCPIP_H
253   #define HAVE_GETADDRINFO
254   #define HAVE_GETNAMEINFO
255   #define HAVE_SYS_IOCTL_H
256   #define HAVE_SYS_SOCKET_H
257   #define HAVE_NETINET_IN_H
258   #define HAVE_NETDB_H
259   #define HAVE_ARPA_INET_H
260   #define HAVE_FREEADDRINFO
261   #define SOCKET int
262 #endif
263
264
265 /* ---------------------------------------------------------------- */
266 /*                        COMPILER SPECIFIC                         */
267 /* ---------------------------------------------------------------- */
268
269 /* Undef keyword 'const' if it does not work.  */
270 /* #undef const */
271
272 /* Windows should not have HAVE_GMTIME_R defined */
273 /* #undef HAVE_GMTIME_R */
274
275 /* Define if the compiler supports C99 variadic macro style. */
276 #if defined(_MSC_VER) && (_MSC_VER >= 1400)
277 #define HAVE_VARIADIC_MACROS_C99 1
278 #endif
279
280 /* Define if the compiler supports the 'long long' data type. */
281 #if defined(__MINGW32__) || defined(__WATCOMC__)
282 #define HAVE_LONGLONG 1
283 #endif
284
285 /* Define to avoid VS2005 complaining about portable C functions */
286 #if defined(_MSC_VER) && (_MSC_VER >= 1400)
287 #define _CRT_SECURE_NO_DEPRECATE 1
288 #define _CRT_NONSTDC_NO_DEPRECATE 1
289 #endif
290
291 /* VS2005 and later dafault size for time_t is 64-bit, unless */
292 /* _USE_32BIT_TIME_T has been defined to get a 32-bit time_t. */
293 #if defined(_MSC_VER) && (_MSC_VER >= 1400)
294 #  ifndef _USE_32BIT_TIME_T
295 #    define SIZEOF_TIME_T 8
296 #  else
297 #    define SIZEOF_TIME_T 4
298 #  endif
299 #endif
300
301 /* Officially, Microsoft's Windows SDK versions 6.X do not support Windows
302    2000 as a supported build target. VS2008 default installations provide an
303    embedded Windows SDK v6.0A along with the claim that Windows 2000 is a
304    valid build target for VS2008. Popular belief is that binaries built using
305    Windows SDK versions 6.X and Windows 2000 as a build target are functional */
306 #if defined(_MSC_VER) && (_MSC_VER >= 1500)
307 #  define VS2008_MINIMUM_TARGET 0x0500
308 #endif
309
310 /* When no build target is specified VS2008 default build target is Windows
311    Vista, which leaves out even Winsows XP. If no build target has been given
312    for VS2008 we will target the minimum Officially supported build target,
313    which happens to be Windows XP. */
314 #if defined(_MSC_VER) && (_MSC_VER >= 1500)
315 #  define VS2008_DEFAULT_TARGET  0x0501
316 #endif
317
318 /* VS2008 default target settings and minimum build target check */
319 #if defined(_MSC_VER) && (_MSC_VER >= 1500)
320 #  ifndef _WIN32_WINNT
321 #    define _WIN32_WINNT VS2008_DEFAULT_TARGET
322 #  endif
323 #  ifndef WINVER
324 #    define WINVER VS2008_DEFAULT_TARGET
325 #  endif
326 #  if (_WIN32_WINNT < VS2008_MINIMUM_TARGET) || (WINVER < VS2008_MINIMUM_TARGET)
327 #    error VS2008 does not support Windows build targets prior to Windows 2000
328 #  endif
329 #endif
330
331 /* When no build target is specified Pelles C 5.00 and later default build
332    target is Windows Vista. We override default target to be Windows 2000. */
333 #if defined(__POCC__) && (__POCC__ >= 500)
334 #  ifndef _WIN32_WINNT
335 #    define _WIN32_WINNT 0x0500
336 #  endif
337 #  ifndef WINVER
338 #    define WINVER 0x0500
339 #  endif
340 #endif
341
342 /* Availability of freeaddrinfo, getaddrinfo and getnameinfo functions is
343    quite convoluted, compiler dependent and even build target dependent. */
344 #if defined(HAVE_WS2TCPIP_H)
345 #  if defined(__POCC__)
346 #    define HAVE_FREEADDRINFO           1
347 #    define HAVE_GETADDRINFO            1
348 #    define HAVE_GETADDRINFO_THREADSAFE 1
349 #    define HAVE_GETNAMEINFO            1
350 #  elif defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
351 #    define HAVE_FREEADDRINFO           1
352 #    define HAVE_GETADDRINFO            1
353 #    define HAVE_GETADDRINFO_THREADSAFE 1
354 #    define HAVE_GETNAMEINFO            1
355 #  elif defined(_MSC_VER) && (_MSC_VER >= 1200)
356 #    define HAVE_FREEADDRINFO           1
357 #    define HAVE_GETADDRINFO            1
358 #    define HAVE_GETADDRINFO_THREADSAFE 1
359 #    define HAVE_GETNAMEINFO            1
360 #  endif
361 #endif
362
363 #if defined(__POCC__)
364 #  ifndef _MSC_VER
365 #    error Microsoft extensions /Ze compiler option is required
366 #  endif
367 #  ifndef __POCC__OLDNAMES
368 #    error Compatibility names /Go compiler option is required
369 #  endif
370 #endif
371
372 /* ---------------------------------------------------------------- */
373 /*                        LARGE FILE SUPPORT                        */
374 /* ---------------------------------------------------------------- */
375
376 #if defined(_MSC_VER) && !defined(_WIN32_WCE)
377 #  if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64)
378 #    define USE_WIN32_LARGE_FILES
379 #  else
380 #    define USE_WIN32_SMALL_FILES
381 #  endif
382 #endif
383
384 #if defined(__MINGW32__) && !defined(USE_WIN32_LARGE_FILES)
385 #  define USE_WIN32_LARGE_FILES
386 #endif
387
388 #if defined(__WATCOMC__) && !defined(USE_WIN32_LARGE_FILES)
389 #  define USE_WIN32_LARGE_FILES
390 #endif
391
392 #if defined(__POCC__)
393 #  undef USE_WIN32_LARGE_FILES
394 #endif
395
396 #if !defined(USE_WIN32_LARGE_FILES) && !defined(USE_WIN32_SMALL_FILES)
397 #  define USE_WIN32_SMALL_FILES
398 #endif
399
400 /* ---------------------------------------------------------------- */
401 /*                       ADDITIONAL DEFINITIONS                     */
402 /* ---------------------------------------------------------------- */
403
404 /* Define cpu-machine-OS */
405 #ifndef OS
406 #define OS "i386-pc-win32"
407 #endif
408
409 /* Define to 1 if you want the built-in manual */
410 #define USE_MANUAL 1
411
412 #if defined(__POCC__)
413 #  define ENABLE_IPV6 1
414 #endif
415
416 #endif /* __SRC_CONFIG_WIN32_H */