1 #ifndef __CARES_BUILD_H
2 #define __CARES_BUILD_H
6 /* Copyright (C) 2009 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 /* NOTES FOR CONFIGURE CAPABLE SYSTEMS */
21 /* ================================================================ */
27 * Nothing in this file is intended to be modified or adjusted by the
28 * c-ares library user nor by the c-ares library builder.
30 * If you think that something actually needs to be changed, adjusted
31 * or fixed in this file, then, report it on the c-ares development
32 * mailing list: http://cool.haxx.se/mailman/listinfo/c-ares/
34 * This header file shall only export symbols which are 'cares' or 'CARES'
35 * prefixed, otherwise public name space would be polluted.
40 * Right now you might be staring at file ares_build.h.in or ares_build.h,
41 * this is due to the following reason:
43 * On systems capable of running the configure script, the configure process
44 * will overwrite the distributed ares_build.h file with one that is suitable
45 * and specific to the library being configured and built, which is generated
46 * from the ares_build.h.in template file.
50 /* ================================================================ */
51 /* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */
52 /* ================================================================ */
54 #ifdef CARES_SIZEOF_LONG
55 # error "CARES_SIZEOF_LONG shall not be defined except in ares_build.h"
56 Error Compilation_aborted_CARES_SIZEOF_LONG_already_defined
59 #ifdef CARES_TYPEOF_ARES_SOCKLEN_T
60 # error "CARES_TYPEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h"
61 Error Compilation_aborted_CARES_TYPEOF_ARES_SOCKLEN_T_already_defined
64 #ifdef CARES_SIZEOF_ARES_SOCKLEN_T
65 # error "CARES_SIZEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h"
66 Error Compilation_aborted_CARES_SIZEOF_ARES_SOCKLEN_T_already_defined
69 /* ================================================================ */
70 /* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */
71 /* ================================================================ */
73 /* Configure process defines this to 1 when it finds out that system */
74 /* header file ws2tcpip.h must be included by the external interface. */
75 #undef CARES_PULL_WS2TCPIP_H
76 #ifdef CARES_PULL_WS2TCPIP_H
77 # ifndef WIN32_LEAN_AND_MEAN
78 # define WIN32_LEAN_AND_MEAN
81 # include <winsock2.h>
82 # include <ws2tcpip.h>
85 /* Configure process defines this to 1 when it finds out that system */
86 /* header file sys/types.h must be included by the external interface. */
87 #undef CARES_PULL_SYS_TYPES_H
88 #ifdef CARES_PULL_SYS_TYPES_H
89 # include <sys/types.h>
92 /* Configure process defines this to 1 when it finds out that system */
93 /* header file sys/socket.h must be included by the external interface. */
94 #undef CARES_PULL_SYS_SOCKET_H
95 #ifdef CARES_PULL_SYS_SOCKET_H
96 # include <sys/socket.h>
99 /* The size of `long', as computed by sizeof. */
100 #undef CARES_SIZEOF_LONG
102 /* Integral data type used for ares_socklen_t. */
103 #undef CARES_TYPEOF_ARES_SOCKLEN_T
105 /* The size of `ares_socklen_t', as computed by sizeof. */
106 #undef CARES_SIZEOF_ARES_SOCKLEN_T
108 /* Data type definition of ares_socklen_t. */
109 typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t;
111 #endif /* __CARES_BUILD_H */