1#ifndef __CARES_BUILD_H 2#define __CARES_BUILD_H 3 4 5/* Copyright (C) 2009 by Daniel Stenberg et al 6 * 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. 16 */ 17 18/* ================================================================ */ 19/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ 20/* ================================================================ */ 21 22/* 23 * NOTE 1: 24 * ------- 25 * 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. 28 * 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/ 32 * 33 * This header file shall only export symbols which are 'cares' or 'CARES' 34 * prefixed, otherwise public name space would be polluted. 35 * 36 * NOTE 2: 37 * ------- 38 * 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: 41 * 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. 46 * 47 */ 48 49/* ================================================================ */ 50/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ 51/* ================================================================ */ 52 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 56#endif 57 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 61#endif 62 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 66#endif 67 68/* ================================================================ */ 69/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */ 70/* ================================================================ */ 71 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 78# endif 79# include <windows.h> 80# include <winsock2.h> 81# include <ws2tcpip.h> 82#endif 83 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> 89#endif 90 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> 96#endif 97 98/* The size of `long', as computed by sizeof. */ 99#undef CARES_SIZEOF_LONG 100 101/* Integral data type used for ares_socklen_t. */ 102#undef CARES_TYPEOF_ARES_SOCKLEN_T 103 104/* The size of `ares_socklen_t', as computed by sizeof. */ 105#undef CARES_SIZEOF_ARES_SOCKLEN_T 106 107/* Data type definition of ares_socklen_t. */ 108typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t; 109 110#endif /* __CARES_BUILD_H */ 111