1 #ifndef __CARES_BUILD_H
2 #define __CARES_BUILD_H
5 /* Copyright (C) 2009 by Daniel Stenberg et al
7 * Permission to use, copy, modify, and distribute this software and its
8 * documentation for any purpose and without fee is hereby granted, provided
9 * that the above copyright notice appear in all copies and that both that
10 * copyright notice and this permission notice appear in supporting
11 * documentation, and that the name of M.I.T. not be used in advertising or
12 * publicity pertaining to distribution of the software without specific,
13 * written prior permission. M.I.T. makes no representations about the
14 * suitability of this software for any purpose. It is provided "as is"
15 * without express or implied warranty.
18 /* ================================================================ */
19 /* NOTES FOR CONFIGURE CAPABLE SYSTEMS */
20 /* ================================================================ */
26 * Nothing in this file is intended to be modified or adjusted by the
27 * c-ares library user nor by the c-ares library builder.
29 * If you think that something actually needs to be changed, adjusted
30 * or fixed in this file, then, report it on the c-ares development
31 * mailing list: http://cool.haxx.se/mailman/listinfo/c-ares/
33 * This header file shall only export symbols which are 'cares' or 'CARES'
34 * prefixed, otherwise public name space would be polluted.
39 * Right now you might be staring at file ares_build.h.in or ares_build.h,
40 * this is due to the following reason:
42 * On systems capable of running the configure script, the configure process
43 * will overwrite the distributed ares_build.h file with one that is suitable
44 * and specific to the library being configured and built, which is generated
45 * from the ares_build.h.in template file.
49 /* ================================================================ */
50 /* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */
51 /* ================================================================ */
53 #ifdef CARES_SIZEOF_LONG
54 # error "CARES_SIZEOF_LONG shall not be defined except in ares_build.h"
55 Error Compilation_aborted_CARES_SIZEOF_LONG_already_defined
58 #ifdef CARES_TYPEOF_ARES_SOCKLEN_T
59 # error "CARES_TYPEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h"
60 Error Compilation_aborted_CARES_TYPEOF_ARES_SOCKLEN_T_already_defined
63 #ifdef CARES_SIZEOF_ARES_SOCKLEN_T
64 # error "CARES_SIZEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h"
65 Error Compilation_aborted_CARES_SIZEOF_ARES_SOCKLEN_T_already_defined
68 /* ================================================================ */
69 /* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */
70 /* ================================================================ */
72 /* Configure process defines this to 1 when it finds out that system */
73 /* header file ws2tcpip.h must be included by the external interface. */
74 #undef CARES_PULL_WS2TCPIP_H
75 #ifdef CARES_PULL_WS2TCPIP_H
76 # ifndef WIN32_LEAN_AND_MEAN
77 # define WIN32_LEAN_AND_MEAN
80 # include <winsock2.h>
81 # include <ws2tcpip.h>
84 /* Configure process defines this to 1 when it finds out that system */
85 /* header file sys/types.h must be included by the external interface. */
86 #undef CARES_PULL_SYS_TYPES_H
87 #ifdef CARES_PULL_SYS_TYPES_H
88 # include <sys/types.h>
91 /* Configure process defines this to 1 when it finds out that system */
92 /* header file sys/socket.h must be included by the external interface. */
93 #undef CARES_PULL_SYS_SOCKET_H
94 #ifdef CARES_PULL_SYS_SOCKET_H
95 # include <sys/socket.h>
98 /* The size of `long', as computed by sizeof. */
99 #undef CARES_SIZEOF_LONG
101 /* Integral data type used for ares_socklen_t. */
102 #undef CARES_TYPEOF_ARES_SOCKLEN_T
104 /* The size of `ares_socklen_t', as computed by sizeof. */
105 #undef CARES_SIZEOF_ARES_SOCKLEN_T
107 /* Data type definition of ares_socklen_t. */
108 typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t;
110 #endif /* __CARES_BUILD_H */