1 #ifndef __ARES_CONFIG_WIN32_H
2 #define __ARES_CONFIG_WIN32_H
6 /* Copyright (C) 2004 - 2008 by Daniel Stenberg et al
8 * Permission to use, copy, modify, and distribute this software and its
9 * documentation for any purpose and without fee is hereby granted, provided
10 * that the above copyright notice appear in all copies and that both that
11 * copyright notice and this permission notice appear in supporting
12 * documentation, and that the name of M.I.T. not be used in advertising or
13 * publicity pertaining to distribution of the software without specific,
14 * written prior permission. M.I.T. makes no representations about the
15 * suitability of this software for any purpose. It is provided "as is"
16 * without express or implied warranty.
19 /* ================================================================ */
20 /* ares/config-win32.h - Hand crafted config file for Windows */
21 /* ================================================================ */
23 /* ---------------------------------------------------------------- */
25 /* ---------------------------------------------------------------- */
27 /* Define if you have the <getopt.h> header file. */
28 #if defined(__MINGW32__)
29 #define HAVE_GETOPT_H 1
32 /* Define if you have the <signal.h> header file. */
33 #define HAVE_SIGNAL_H 1
35 /* Define if you have the <sys/time.h> header file */
36 /* #define HAVE_SYS_TIME_H 1 */
38 /* Define if you have the <time.h> header file. */
41 /* Define if you have the <process.h> header file. */
42 #define HAVE_PROCESS_H 1
44 /* Define if you have the <unistd.h> header file. */
45 #if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__LCC__) || \
47 #define HAVE_UNISTD_H 1
50 /* Define if you have the <windows.h> header file. */
51 #define HAVE_WINDOWS_H 1
53 /* Define if you have the <winsock.h> header file. */
54 #define HAVE_WINSOCK_H 1
56 /* Define if you have the <winsock2.h> header file. */
57 #define HAVE_WINSOCK2_H 1
59 /* Define if you have the <ws2tcpip.h> header file. */
60 #define HAVE_WS2TCPIP_H 1
62 /* ---------------------------------------------------------------- */
63 /* OTHER HEADER INFO */
64 /* ---------------------------------------------------------------- */
66 /* Define if sig_atomic_t is an available typedef. */
67 #define HAVE_SIG_ATOMIC_T 1
69 /* Define if you have the ANSI C header files. */
70 #define STDC_HEADERS 1
72 /* Define if you can safely include both <sys/time.h> and <time.h>. */
73 /* #define TIME_WITH_SYS_TIME 1 */
75 /* ---------------------------------------------------------------- */
77 /* ---------------------------------------------------------------- */
79 /* Define if you have the ioctlsocket function. */
80 #define HAVE_IOCTLSOCKET 1
82 /* Define if you have the recv function. */
85 /* Define to the type of arg 1 for recv. */
86 #define RECV_TYPE_ARG1 SOCKET
88 /* Define to the type of arg 2 for recv. */
89 #define RECV_TYPE_ARG2 char *
91 /* Define to the type of arg 3 for recv. */
92 #define RECV_TYPE_ARG3 int
94 /* Define to the type of arg 4 for recv. */
95 #define RECV_TYPE_ARG4 int
97 /* Define to the function return type for recv. */
98 #define RECV_TYPE_RETV int
100 /* Define if you have the recvfrom function. */
101 #define HAVE_RECVFROM 1
103 /* Define to the type of arg 1 for recvfrom. */
104 #define RECVFROM_TYPE_ARG1 SOCKET
106 /* Define to the type pointed by arg 2 for recvfrom. */
107 #define RECVFROM_TYPE_ARG2 char
109 /* Define to the type of arg 3 for recvfrom. */
110 #define RECVFROM_TYPE_ARG3 int
112 /* Define to the type of arg 4 for recvfrom. */
113 #define RECVFROM_TYPE_ARG4 int
115 /* Define to the type pointed by arg 5 for recvfrom. */
116 #define RECVFROM_TYPE_ARG5 struct sockaddr
118 /* Define to the type pointed by arg 6 for recvfrom. */
119 #define RECVFROM_TYPE_ARG6 int
121 /* Define to the function return type for recvfrom. */
122 #define RECVFROM_TYPE_RETV int
124 /* Define if you have the send function. */
127 /* Define to the type of arg 1 for send. */
128 #define SEND_TYPE_ARG1 SOCKET
130 /* Define to the type qualifier of arg 2 for send. */
131 #define SEND_QUAL_ARG2 const
133 /* Define to the type of arg 2 for send. */
134 #define SEND_TYPE_ARG2 char *
136 /* Define to the type of arg 3 for send. */
137 #define SEND_TYPE_ARG3 int
139 /* Define to the type of arg 4 for send. */
140 #define SEND_TYPE_ARG4 int
142 /* Define to the function return type for send. */
143 #define SEND_TYPE_RETV int
145 /* Specifics for the Watt-32 tcp/ip stack */
148 #define NS_INADDRSZ 4
149 #define HAVE_ARPA_NAMESER_H 1
150 #undef HAVE_WINSOCK_H
151 #undef HAVE_WINSOCK2_H
152 #undef HAVE_WS2TCPIP_H
155 /* ---------------------------------------------------------------- */
156 /* TYPEDEF REPLACEMENTS */
157 /* ---------------------------------------------------------------- */
159 /* Define this if in_addr_t is not an available 'typedefed' type */
160 #define in_addr_t unsigned long
162 /* Define as the return type of signal handlers (int or void). */
163 #define RETSIGTYPE void
165 /* Define ssize_t if it is not an available 'typedefed' type */
166 #if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || defined(__POCC__)
167 #elif defined(_WIN64)
168 #define ssize_t __int64
173 /* ---------------------------------------------------------------- */
175 /* ---------------------------------------------------------------- */
177 /* Define this if you have struct addrinfo */
178 #define HAVE_STRUCT_ADDRINFO 1
180 /* Define this if you have struct sockaddr_storage */
181 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
183 /* Define this if you have struct timeval */
184 #define HAVE_STRUCT_TIMEVAL 1
186 /* ---------------------------------------------------------------- */
187 /* COMPILER SPECIFIC */
188 /* ---------------------------------------------------------------- */
190 /* Define to avoid VS2005 complaining about portable C functions */
191 #if defined(_MSC_VER) && (_MSC_VER >= 1400)
192 #define _CRT_SECURE_NO_DEPRECATE 1
193 #define _CRT_NONSTDC_NO_DEPRECATE 1
196 /* VS2008 does not support Windows build targets prior to WinXP, */
197 /* so, if no build target has been defined we will target WinXP. */
198 #if defined(_MSC_VER) && (_MSC_VER >= 1500)
199 # ifndef _WIN32_WINNT
200 # define _WIN32_WINNT 0x0501
203 # define WINVER 0x0501
205 # if (_WIN32_WINNT < 0x0501) || (WINVER < 0x0501)
206 # error VS2008 does not support Windows build targets prior to WinXP
210 /* ---------------------------------------------------------------- */
211 /* IPV6 COMPATIBILITY */
212 /* ---------------------------------------------------------------- */
214 /* Define this if you have address family AF_INET6 */
215 #ifdef HAVE_WINSOCK2_H
216 #define HAVE_AF_INET6 1
219 /* Define this if you have protocol family PF_INET6 */
220 #ifdef HAVE_WINSOCK2_H
221 #define HAVE_PF_INET6 1
224 /* Define this if you have struct in6_addr */
225 #ifdef HAVE_WS2TCPIP_H
226 #define HAVE_STRUCT_IN6_ADDR 1
229 /* Define this if you have struct sockaddr_in6 */
230 #ifdef HAVE_WS2TCPIP_H
231 #define HAVE_STRUCT_SOCKADDR_IN6 1
234 /* Define this if you have sockaddr_in6 with scopeid */
235 #ifdef HAVE_WS2TCPIP_H
236 #define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
240 #endif /* __ARES_CONFIG_WIN32_H */