MSVC 9.0 (VS2008) does not support Windows build targets prior to WinXP,
[platform/upstream/c-ares.git] / config-win32.h
1 #ifndef __ARES_CONFIG_WIN32_H
2 #define __ARES_CONFIG_WIN32_H
3
4 /* $Id$ */
5
6 /* Copyright (C) 2004 - 2006 by Daniel Stenberg et al
7  *
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.
17  */
18
19 /* ================================================================ */
20 /*    ares/config-win32.h - Hand crafted config file for Windows    */
21 /* ================================================================ */
22
23 /* ---------------------------------------------------------------- */
24 /*                          HEADER FILES                            */
25 /* ---------------------------------------------------------------- */
26
27 /* Define if you have the <getopt.h> header file.  */
28 #if defined(__MINGW32__)
29 #define HAVE_GETOPT_H 1
30 #endif
31
32 /* Define if you have the <signal.h> header file. */
33 #define HAVE_SIGNAL_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 <time.h> header file.  */
39 #define HAVE_TIME_H 1
40
41 /* Define if you have the <process.h> header file.  */
42 #define HAVE_PROCESS_H 1
43
44 /* Define if you have the <unistd.h> header file.  */
45 #if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__LCC__) || \
46     defined(__POCC__)
47 #define HAVE_UNISTD_H 1
48 #endif
49
50 /* Define if you have the <windows.h> header file.  */
51 #define HAVE_WINDOWS_H 1
52
53 /* Define if you have the <winsock.h> header file.  */
54 #define HAVE_WINSOCK_H 1
55
56 /* Define if you have the <winsock2.h> header file.  */
57 #define HAVE_WINSOCK2_H 1
58
59 /* Define if you have the <ws2tcpip.h> header file.  */
60 #define HAVE_WS2TCPIP_H 1
61
62 /* ---------------------------------------------------------------- */
63 /*                        OTHER HEADER INFO                         */
64 /* ---------------------------------------------------------------- */
65
66 /* Define if sig_atomic_t is an available typedef. */
67 #define HAVE_SIG_ATOMIC_T 1
68
69 /* Define if you have the ANSI C header files.  */
70 #define STDC_HEADERS 1
71
72 /* Define if you can safely include both <sys/time.h> and <time.h>.  */
73 /* #define TIME_WITH_SYS_TIME 1 */
74
75 /* ---------------------------------------------------------------- */
76 /*                             FUNCTIONS                            */
77 /* ---------------------------------------------------------------- */
78
79 /* Define if you have the ioctlsocket function.  */
80 #define HAVE_IOCTLSOCKET 1
81
82 /* Define if you have the recv function. */
83 #define HAVE_RECV 1
84
85 /* Define to the type of arg 1 for recv. */
86 #define RECV_TYPE_ARG1 SOCKET
87
88 /* Define to the type of arg 2 for recv. */
89 #define RECV_TYPE_ARG2 char *
90
91 /* Define to the type of arg 3 for recv. */
92 #define RECV_TYPE_ARG3 int
93
94 /* Define to the type of arg 4 for recv. */
95 #define RECV_TYPE_ARG4 int
96
97 /* Define to the function return type for recv. */
98 #define RECV_TYPE_RETV int
99
100 /* Define if you have the send function. */
101 #define HAVE_SEND 1
102
103 /* Define to the type of arg 1 for send. */
104 #define SEND_TYPE_ARG1 SOCKET
105
106 /* Define to the type qualifier of arg 2 for send. */
107 #define SEND_QUAL_ARG2 const
108
109 /* Define to the type of arg 2 for send. */
110 #define SEND_TYPE_ARG2 char *
111
112 /* Define to the type of arg 3 for send. */
113 #define SEND_TYPE_ARG3 int
114
115 /* Define to the type of arg 4 for send. */
116 #define SEND_TYPE_ARG4 int
117
118 /* Define to the function return type for send. */
119 #define SEND_TYPE_RETV int
120
121 /* Specifics for the Watt-32 tcp/ip stack */
122 #ifdef WATT32
123   #define SOCKET              int
124   #define NS_INADDRSZ         4
125   #define HAVE_ARPA_NAMESER_H 1
126   #undef HAVE_WINSOCK_H
127   #undef HAVE_WINSOCK2_H
128   #undef HAVE_WS2TCPIP_H
129 #endif
130
131 /* ---------------------------------------------------------------- */
132 /*                       TYPEDEF REPLACEMENTS                       */
133 /* ---------------------------------------------------------------- */
134
135 /* Define this if in_addr_t is not an available 'typedefed' type */
136 #define in_addr_t unsigned long
137
138 /* Define as the return type of signal handlers (int or void).  */
139 #define RETSIGTYPE void
140
141 /* Define ssize_t if it is not an available 'typedefed' type */
142 #if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || defined(__POCC__)
143 #elif defined(_WIN64)
144 #define ssize_t __int64
145 #else
146 #define ssize_t int
147 #endif
148
149 /* ---------------------------------------------------------------- */
150 /*                          STRUCT RELATED                          */
151 /* ---------------------------------------------------------------- */
152
153 /* Define this if you have struct addrinfo */
154 #define HAVE_STRUCT_ADDRINFO 1
155
156 /* Define this if you have struct sockaddr_storage */
157 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
158
159 /* Define this if you have struct timeval */
160 #define HAVE_STRUCT_TIMEVAL 1
161
162 /* ---------------------------------------------------------------- */
163 /*                        COMPILER SPECIFIC                         */
164 /* ---------------------------------------------------------------- */
165
166 /* Define to avoid VS2005 complaining about portable C functions */
167 #if defined(_MSC_VER) && (_MSC_VER >= 1400)
168 #define _CRT_SECURE_NO_DEPRECATE 1
169 #define _CRT_NONSTDC_NO_DEPRECATE 1
170 #endif
171
172 /* VS2008 does not support Windows build targets prior to WinXP, */
173 /* so, if no build target has been defined we will target WinXP. */
174 #if defined(_MSC_VER) && (_MSC_VER >= 1500)
175 #  ifndef _WIN32_WINNT
176 #    define _WIN32_WINNT 0x0501
177 #  endif
178 #  ifndef WINVER
179 #    define WINVER 0x0501
180 #  endif
181 #  if (_WIN32_WINNT < 0x0501) || (WINVER < 0x0501)
182 #    error VS2008 does not support Windows build targets prior to WinXP
183 #  endif
184 #endif
185
186 /* ---------------------------------------------------------------- */
187 /*                         IPV6 COMPATIBILITY                       */
188 /* ---------------------------------------------------------------- */
189
190 /* Define this if you have address family AF_INET6 */
191 #ifdef HAVE_WINSOCK2_H
192 #define HAVE_AF_INET6 1
193 #endif
194
195 /* Define this if you have protocol family PF_INET6 */
196 #ifdef HAVE_WINSOCK2_H
197 #define HAVE_PF_INET6 1
198 #endif
199
200 /* Define this if you have struct in6_addr */
201 #ifdef HAVE_WS2TCPIP_H
202 #define HAVE_STRUCT_IN6_ADDR 1
203 #endif
204
205 /* Define this if you have struct sockaddr_in6 */
206 #ifdef HAVE_WS2TCPIP_H
207 #define HAVE_STRUCT_SOCKADDR_IN6 1
208 #endif
209
210 /* Define this if you have sockaddr_in6 with scopeid */
211 #ifdef HAVE_WS2TCPIP_H
212 #define HAVE_SOCKADDR_IN6_SIN6_SCOPE_ID 1
213 #endif
214
215
216 #endif  /* __ARES_CONFIG_WIN32_H */