|
| 1 | +/* ares_build.h. Generated from ares_build.h.in by configure. */ |
| 2 | +#ifndef __CARES_BUILD_H |
| 3 | +#define __CARES_BUILD_H |
| 4 | + |
| 5 | + |
| 6 | +/* Copyright (C) 2009 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 | +/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ |
| 21 | +/* ================================================================ */ |
| 22 | + |
| 23 | +/* |
| 24 | + * NOTE 1: |
| 25 | + * ------- |
| 26 | + * |
| 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. |
| 29 | + * |
| 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/ |
| 33 | + * |
| 34 | + * This header file shall only export symbols which are 'cares' or 'CARES' |
| 35 | + * prefixed, otherwise public name space would be polluted. |
| 36 | + * |
| 37 | + * NOTE 2: |
| 38 | + * ------- |
| 39 | + * |
| 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: |
| 42 | + * |
| 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. |
| 47 | + * |
| 48 | + */ |
| 49 | + |
| 50 | +/* ================================================================ */ |
| 51 | +/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ |
| 52 | +/* ================================================================ */ |
| 53 | + |
| 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 |
| 57 | +#endif |
| 58 | + |
| 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 |
| 62 | +#endif |
| 63 | + |
| 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 |
| 67 | +#endif |
| 68 | + |
| 69 | +/* ================================================================ */ |
| 70 | +/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */ |
| 71 | +/* ================================================================ */ |
| 72 | + |
| 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 | + |
| 76 | +#ifdef WIN32 |
| 77 | +# define CARES_PULL_WS2TCPIP_H 1 |
| 78 | +#else |
| 79 | +# define CARES_PULL_SYS_TYPES_H 1 |
| 80 | +# define CARES_PULL_SYS_SOCKET_H 1 |
| 81 | +#endif |
| 82 | + |
| 83 | +/* #undef CARES_PULL_WS2TCPIP_H */ |
| 84 | +#ifdef CARES_PULL_WS2TCPIP_H |
| 85 | +# ifndef WIN32_LEAN_AND_MEAN |
| 86 | +# define WIN32_LEAN_AND_MEAN |
| 87 | +# endif |
| 88 | +# include <windows.h> |
| 89 | +# include <winsock2.h> |
| 90 | +# include <ws2tcpip.h> |
| 91 | +#endif |
| 92 | + |
| 93 | +/* Configure process defines this to 1 when it finds out that system */ |
| 94 | +/* header file sys/types.h must be included by the external interface. */ |
| 95 | +#ifdef CARES_PULL_SYS_TYPES_H |
| 96 | +# include <sys/types.h> |
| 97 | +#endif |
| 98 | + |
| 99 | +/* Configure process defines this to 1 when it finds out that system */ |
| 100 | +/* header file sys/socket.h must be included by the external interface. */ |
| 101 | +#ifdef CARES_PULL_SYS_SOCKET_H |
| 102 | +# include <sys/socket.h> |
| 103 | +#endif |
| 104 | + |
| 105 | +/* The size of `long', as computed by sizeof. */ |
| 106 | +/* #undef CARES_SIZEOF_LONG */ |
| 107 | + |
| 108 | +/* Integral data type used for ares_socklen_t. */ |
| 109 | +#define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t |
| 110 | + |
| 111 | +/* The size of `ares_socklen_t', as computed by sizeof. */ |
| 112 | +#define CARES_SIZEOF_ARES_SOCKLEN_T 4 |
| 113 | + |
| 114 | +/* Data type definition of ares_socklen_t. */ |
| 115 | +typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t; |
| 116 | + |
| 117 | +#endif /* __CARES_BUILD_H */ |
0 commit comments