From 6049387cc6a7fd6807ddf4af978c6b043be359b5 Mon Sep 17 00:00:00 2001 From: Ryan Dahl Date: Tue, 28 Jun 2011 13:13:39 +0200 Subject: [PATCH] ares.h should not depend on ares_build.h A dirty dirty patch but c-ares's header rules are way too annoying for a static library. --- c-ares/ares.h | 59 +++++++++++++-- c-ares/ares_nowarn.c | 15 +--- c-ares/ares_setup.h | 2 +- c-ares/config_cygwin/ares_build.h | 112 ----------------------------- c-ares/config_darwin/ares_build.h | 112 ----------------------------- c-ares/config_freebsd/ares_build.h | 112 ----------------------------- c-ares/config_linux/ares_build.h | 112 ----------------------------- c-ares/config_openbsd/ares_build.h | 112 ----------------------------- c-ares/config_sunos/ares_build.h | 112 ----------------------------- c-ares/config_win32/ares_build.h | 111 ---------------------------- 10 files changed, 57 insertions(+), 802 deletions(-) delete mode 100644 c-ares/config_cygwin/ares_build.h delete mode 100644 c-ares/config_darwin/ares_build.h delete mode 100644 c-ares/config_freebsd/ares_build.h delete mode 100644 c-ares/config_linux/ares_build.h delete mode 100644 c-ares/config_openbsd/ares_build.h delete mode 100644 c-ares/config_sunos/ares_build.h delete mode 100644 c-ares/config_win32/ares_build.h diff --git a/c-ares/ares.h b/c-ares/ares.h index d4632edc..659f9be6 100644 --- a/c-ares/ares.h +++ b/c-ares/ares.h @@ -19,11 +19,6 @@ #define ARES__H #include "ares_version.h" /* c-ares version defines */ -#include "ares_build.h" /* c-ares build definitions */ - -#if 0 /* libuv disabled */ -#include "ares_rules.h" /* c-ares rules enforcement */ -#endif /* * Define WIN32 when build target is Win32 API @@ -34,6 +29,60 @@ # define WIN32 #endif +/*************************** libuv patch ***************/ + +/* + * We want to avoid autoconf altogether since there are a finite number of + * operating systems and simply build c-ares. Therefore we do not want the + * configurations provided by ares_build.h since we are always statically + * linking c-ares into libuv. Having a system dependent ares_build.h forces + * all users of ares.h to include the correct ares_build.h. We do not care + * about the linking checks provided by ares_rules.h. This would complicate + * the libuv build process. + */ + +#ifndef __CARES_BUILD_H +#define __CARES_BUILD_H + + +#if defined(WIN32) +/* Configure process defines this to 1 when it finds out that system */ +/* header file ws2tcpip.h must be included by the external interface. */ +/* #undef CARES_PULL_WS2TCPIP_H */ +# include +# include +# include + +#else /* Not Windows */ + +# include +# include +#endif + +#if 0 +/* The size of `long', as computed by sizeof. */ +#define CARES_SIZEOF_LONG 4 +#endif + +/* Integral data type used for ares_socklen_t. */ +#define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t + +#if 0 +/* The size of `ares_socklen_t', as computed by sizeof. */ +#define CARES_SIZEOF_ARES_SOCKLEN_T 4 +#endif + +/* Data type definition of ares_socklen_t. */ +typedef int ares_socklen_t; + +#endif /* __CARES_BUILD_H */ + +#if 0 /* libuv disabled */ +#include "ares_rules.h" /* c-ares rules enforcement */ +#endif + +/*********************** end libuv patch ***************/ + #include /* HP-UX systems version 9, 10 and 11 lack sys/select.h and so does oldish diff --git a/c-ares/ares_nowarn.c b/c-ares/ares_nowarn.c index ed84ade4..52d079e6 100644 --- a/c-ares/ares_nowarn.c +++ b/c-ares/ares_nowarn.c @@ -19,19 +19,8 @@ #include "ares_nowarn.h" -#if (SIZEOF_INT == 2) -# define CARES_MASK_SINT 0x7FFF -# define CARES_MASK_UINT 0xFFFF -#elif (SIZEOF_INT == 4) -# define CARES_MASK_SINT 0x7FFFFFFF -# define CARES_MASK_UINT 0xFFFFFFFF -#elif (SIZEOF_INT == 8) -# define CARES_MASK_SINT 0x7FFFFFFFFFFFFFFF -# define CARES_MASK_UINT 0xFFFFFFFFFFFFFFFF -#elif (SIZEOF_INT == 16) -# define CARES_MASK_SINT 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF -# define CARES_MASK_UINT 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF -#endif +#define CARES_MASK_UINT (~(unsigned int) 0) +#define CARES_MASK_SINT (CARES_MASK_UINT >> 1) /* ** size_t to signed int diff --git a/c-ares/ares_setup.h b/c-ares/ares_setup.h index db61bb5f..0d1ce0f9 100644 --- a/c-ares/ares_setup.h +++ b/c-ares/ares_setup.h @@ -76,6 +76,7 @@ /* please, do it beyond the point further indicated in this file. */ /* ================================================================ */ +#if 0 /* libuv disabled */ /* * c-ares external interface definitions are also used internally, * and might also include required system header files to define them. @@ -87,7 +88,6 @@ * Compile time sanity checks must also be done when building the library. */ -#if 0 /* libuv disabled */ #include #endif diff --git a/c-ares/config_cygwin/ares_build.h b/c-ares/config_cygwin/ares_build.h deleted file mode 100644 index ecceded2..00000000 --- a/c-ares/config_cygwin/ares_build.h +++ /dev/null @@ -1,112 +0,0 @@ -/* ares_build.h. Generated from ares_build.h.in by configure. */ -#ifndef __CARES_BUILD_H -#define __CARES_BUILD_H - -/* $Id$ */ - -/* Copyright (C) 2009 by Daniel Stenberg et al - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, provided - * that the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of M.I.T. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. M.I.T. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - */ - -/* ================================================================ */ -/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ -/* ================================================================ */ - -/* - * NOTE 1: - * ------- - * - * Nothing in this file is intended to be modified or adjusted by the - * c-ares library user nor by the c-ares library builder. - * - * If you think that something actually needs to be changed, adjusted - * or fixed in this file, then, report it on the c-ares development - * mailing list: http://cool.haxx.se/mailman/listinfo/c-ares/ - * - * This header file shall only export symbols which are 'cares' or 'CARES' - * prefixed, otherwise public name space would be polluted. - * - * NOTE 2: - * ------- - * - * Right now you might be staring at file ares_build.h.in or ares_build.h, - * this is due to the following reason: - * - * On systems capable of running the configure script, the configure process - * will overwrite the distributed ares_build.h file with one that is suitable - * and specific to the library being configured and built, which is generated - * from the ares_build.h.in template file. - * - */ - -/* ================================================================ */ -/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ -/* ================================================================ */ - -#ifdef CARES_SIZEOF_LONG -# error "CARES_SIZEOF_LONG shall not be defined except in ares_build.h" - Error Compilation_aborted_CARES_SIZEOF_LONG_already_defined -#endif - -#ifdef CARES_TYPEOF_ARES_SOCKLEN_T -# error "CARES_TYPEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h" - Error Compilation_aborted_CARES_TYPEOF_ARES_SOCKLEN_T_already_defined -#endif - -#ifdef CARES_SIZEOF_ARES_SOCKLEN_T -# error "CARES_SIZEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h" - Error Compilation_aborted_CARES_SIZEOF_ARES_SOCKLEN_T_already_defined -#endif - -/* ================================================================ */ -/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */ -/* ================================================================ */ - -/* Configure process defines this to 1 when it finds out that system */ -/* header file ws2tcpip.h must be included by the external interface. */ -/* #undef CARES_PULL_WS2TCPIP_H */ -#ifdef CARES_PULL_WS2TCPIP_H -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# endif -# include -# include -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/types.h must be included by the external interface. */ -#define CARES_PULL_SYS_TYPES_H 1 -#ifdef CARES_PULL_SYS_TYPES_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/socket.h must be included by the external interface. */ -#define CARES_PULL_SYS_SOCKET_H 1 -#ifdef CARES_PULL_SYS_SOCKET_H -# include -#endif - -/* The size of `long', as computed by sizeof. */ -#define CARES_SIZEOF_LONG 4 - -/* Integral data type used for ares_socklen_t. */ -#define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t - -/* The size of `ares_socklen_t', as computed by sizeof. */ -#define CARES_SIZEOF_ARES_SOCKLEN_T 4 - -/* Data type definition of ares_socklen_t. */ -typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t; - -#endif /* __CARES_BUILD_H */ diff --git a/c-ares/config_darwin/ares_build.h b/c-ares/config_darwin/ares_build.h deleted file mode 100644 index ecceded2..00000000 --- a/c-ares/config_darwin/ares_build.h +++ /dev/null @@ -1,112 +0,0 @@ -/* ares_build.h. Generated from ares_build.h.in by configure. */ -#ifndef __CARES_BUILD_H -#define __CARES_BUILD_H - -/* $Id$ */ - -/* Copyright (C) 2009 by Daniel Stenberg et al - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, provided - * that the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of M.I.T. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. M.I.T. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - */ - -/* ================================================================ */ -/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ -/* ================================================================ */ - -/* - * NOTE 1: - * ------- - * - * Nothing in this file is intended to be modified or adjusted by the - * c-ares library user nor by the c-ares library builder. - * - * If you think that something actually needs to be changed, adjusted - * or fixed in this file, then, report it on the c-ares development - * mailing list: http://cool.haxx.se/mailman/listinfo/c-ares/ - * - * This header file shall only export symbols which are 'cares' or 'CARES' - * prefixed, otherwise public name space would be polluted. - * - * NOTE 2: - * ------- - * - * Right now you might be staring at file ares_build.h.in or ares_build.h, - * this is due to the following reason: - * - * On systems capable of running the configure script, the configure process - * will overwrite the distributed ares_build.h file with one that is suitable - * and specific to the library being configured and built, which is generated - * from the ares_build.h.in template file. - * - */ - -/* ================================================================ */ -/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ -/* ================================================================ */ - -#ifdef CARES_SIZEOF_LONG -# error "CARES_SIZEOF_LONG shall not be defined except in ares_build.h" - Error Compilation_aborted_CARES_SIZEOF_LONG_already_defined -#endif - -#ifdef CARES_TYPEOF_ARES_SOCKLEN_T -# error "CARES_TYPEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h" - Error Compilation_aborted_CARES_TYPEOF_ARES_SOCKLEN_T_already_defined -#endif - -#ifdef CARES_SIZEOF_ARES_SOCKLEN_T -# error "CARES_SIZEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h" - Error Compilation_aborted_CARES_SIZEOF_ARES_SOCKLEN_T_already_defined -#endif - -/* ================================================================ */ -/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */ -/* ================================================================ */ - -/* Configure process defines this to 1 when it finds out that system */ -/* header file ws2tcpip.h must be included by the external interface. */ -/* #undef CARES_PULL_WS2TCPIP_H */ -#ifdef CARES_PULL_WS2TCPIP_H -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# endif -# include -# include -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/types.h must be included by the external interface. */ -#define CARES_PULL_SYS_TYPES_H 1 -#ifdef CARES_PULL_SYS_TYPES_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/socket.h must be included by the external interface. */ -#define CARES_PULL_SYS_SOCKET_H 1 -#ifdef CARES_PULL_SYS_SOCKET_H -# include -#endif - -/* The size of `long', as computed by sizeof. */ -#define CARES_SIZEOF_LONG 4 - -/* Integral data type used for ares_socklen_t. */ -#define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t - -/* The size of `ares_socklen_t', as computed by sizeof. */ -#define CARES_SIZEOF_ARES_SOCKLEN_T 4 - -/* Data type definition of ares_socklen_t. */ -typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t; - -#endif /* __CARES_BUILD_H */ diff --git a/c-ares/config_freebsd/ares_build.h b/c-ares/config_freebsd/ares_build.h deleted file mode 100644 index ecceded2..00000000 --- a/c-ares/config_freebsd/ares_build.h +++ /dev/null @@ -1,112 +0,0 @@ -/* ares_build.h. Generated from ares_build.h.in by configure. */ -#ifndef __CARES_BUILD_H -#define __CARES_BUILD_H - -/* $Id$ */ - -/* Copyright (C) 2009 by Daniel Stenberg et al - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, provided - * that the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of M.I.T. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. M.I.T. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - */ - -/* ================================================================ */ -/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ -/* ================================================================ */ - -/* - * NOTE 1: - * ------- - * - * Nothing in this file is intended to be modified or adjusted by the - * c-ares library user nor by the c-ares library builder. - * - * If you think that something actually needs to be changed, adjusted - * or fixed in this file, then, report it on the c-ares development - * mailing list: http://cool.haxx.se/mailman/listinfo/c-ares/ - * - * This header file shall only export symbols which are 'cares' or 'CARES' - * prefixed, otherwise public name space would be polluted. - * - * NOTE 2: - * ------- - * - * Right now you might be staring at file ares_build.h.in or ares_build.h, - * this is due to the following reason: - * - * On systems capable of running the configure script, the configure process - * will overwrite the distributed ares_build.h file with one that is suitable - * and specific to the library being configured and built, which is generated - * from the ares_build.h.in template file. - * - */ - -/* ================================================================ */ -/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ -/* ================================================================ */ - -#ifdef CARES_SIZEOF_LONG -# error "CARES_SIZEOF_LONG shall not be defined except in ares_build.h" - Error Compilation_aborted_CARES_SIZEOF_LONG_already_defined -#endif - -#ifdef CARES_TYPEOF_ARES_SOCKLEN_T -# error "CARES_TYPEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h" - Error Compilation_aborted_CARES_TYPEOF_ARES_SOCKLEN_T_already_defined -#endif - -#ifdef CARES_SIZEOF_ARES_SOCKLEN_T -# error "CARES_SIZEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h" - Error Compilation_aborted_CARES_SIZEOF_ARES_SOCKLEN_T_already_defined -#endif - -/* ================================================================ */ -/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */ -/* ================================================================ */ - -/* Configure process defines this to 1 when it finds out that system */ -/* header file ws2tcpip.h must be included by the external interface. */ -/* #undef CARES_PULL_WS2TCPIP_H */ -#ifdef CARES_PULL_WS2TCPIP_H -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# endif -# include -# include -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/types.h must be included by the external interface. */ -#define CARES_PULL_SYS_TYPES_H 1 -#ifdef CARES_PULL_SYS_TYPES_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/socket.h must be included by the external interface. */ -#define CARES_PULL_SYS_SOCKET_H 1 -#ifdef CARES_PULL_SYS_SOCKET_H -# include -#endif - -/* The size of `long', as computed by sizeof. */ -#define CARES_SIZEOF_LONG 4 - -/* Integral data type used for ares_socklen_t. */ -#define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t - -/* The size of `ares_socklen_t', as computed by sizeof. */ -#define CARES_SIZEOF_ARES_SOCKLEN_T 4 - -/* Data type definition of ares_socklen_t. */ -typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t; - -#endif /* __CARES_BUILD_H */ diff --git a/c-ares/config_linux/ares_build.h b/c-ares/config_linux/ares_build.h deleted file mode 100644 index ecceded2..00000000 --- a/c-ares/config_linux/ares_build.h +++ /dev/null @@ -1,112 +0,0 @@ -/* ares_build.h. Generated from ares_build.h.in by configure. */ -#ifndef __CARES_BUILD_H -#define __CARES_BUILD_H - -/* $Id$ */ - -/* Copyright (C) 2009 by Daniel Stenberg et al - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, provided - * that the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of M.I.T. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. M.I.T. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - */ - -/* ================================================================ */ -/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ -/* ================================================================ */ - -/* - * NOTE 1: - * ------- - * - * Nothing in this file is intended to be modified or adjusted by the - * c-ares library user nor by the c-ares library builder. - * - * If you think that something actually needs to be changed, adjusted - * or fixed in this file, then, report it on the c-ares development - * mailing list: http://cool.haxx.se/mailman/listinfo/c-ares/ - * - * This header file shall only export symbols which are 'cares' or 'CARES' - * prefixed, otherwise public name space would be polluted. - * - * NOTE 2: - * ------- - * - * Right now you might be staring at file ares_build.h.in or ares_build.h, - * this is due to the following reason: - * - * On systems capable of running the configure script, the configure process - * will overwrite the distributed ares_build.h file with one that is suitable - * and specific to the library being configured and built, which is generated - * from the ares_build.h.in template file. - * - */ - -/* ================================================================ */ -/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ -/* ================================================================ */ - -#ifdef CARES_SIZEOF_LONG -# error "CARES_SIZEOF_LONG shall not be defined except in ares_build.h" - Error Compilation_aborted_CARES_SIZEOF_LONG_already_defined -#endif - -#ifdef CARES_TYPEOF_ARES_SOCKLEN_T -# error "CARES_TYPEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h" - Error Compilation_aborted_CARES_TYPEOF_ARES_SOCKLEN_T_already_defined -#endif - -#ifdef CARES_SIZEOF_ARES_SOCKLEN_T -# error "CARES_SIZEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h" - Error Compilation_aborted_CARES_SIZEOF_ARES_SOCKLEN_T_already_defined -#endif - -/* ================================================================ */ -/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */ -/* ================================================================ */ - -/* Configure process defines this to 1 when it finds out that system */ -/* header file ws2tcpip.h must be included by the external interface. */ -/* #undef CARES_PULL_WS2TCPIP_H */ -#ifdef CARES_PULL_WS2TCPIP_H -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# endif -# include -# include -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/types.h must be included by the external interface. */ -#define CARES_PULL_SYS_TYPES_H 1 -#ifdef CARES_PULL_SYS_TYPES_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/socket.h must be included by the external interface. */ -#define CARES_PULL_SYS_SOCKET_H 1 -#ifdef CARES_PULL_SYS_SOCKET_H -# include -#endif - -/* The size of `long', as computed by sizeof. */ -#define CARES_SIZEOF_LONG 4 - -/* Integral data type used for ares_socklen_t. */ -#define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t - -/* The size of `ares_socklen_t', as computed by sizeof. */ -#define CARES_SIZEOF_ARES_SOCKLEN_T 4 - -/* Data type definition of ares_socklen_t. */ -typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t; - -#endif /* __CARES_BUILD_H */ diff --git a/c-ares/config_openbsd/ares_build.h b/c-ares/config_openbsd/ares_build.h deleted file mode 100644 index ecceded2..00000000 --- a/c-ares/config_openbsd/ares_build.h +++ /dev/null @@ -1,112 +0,0 @@ -/* ares_build.h. Generated from ares_build.h.in by configure. */ -#ifndef __CARES_BUILD_H -#define __CARES_BUILD_H - -/* $Id$ */ - -/* Copyright (C) 2009 by Daniel Stenberg et al - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, provided - * that the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of M.I.T. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. M.I.T. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - */ - -/* ================================================================ */ -/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ -/* ================================================================ */ - -/* - * NOTE 1: - * ------- - * - * Nothing in this file is intended to be modified or adjusted by the - * c-ares library user nor by the c-ares library builder. - * - * If you think that something actually needs to be changed, adjusted - * or fixed in this file, then, report it on the c-ares development - * mailing list: http://cool.haxx.se/mailman/listinfo/c-ares/ - * - * This header file shall only export symbols which are 'cares' or 'CARES' - * prefixed, otherwise public name space would be polluted. - * - * NOTE 2: - * ------- - * - * Right now you might be staring at file ares_build.h.in or ares_build.h, - * this is due to the following reason: - * - * On systems capable of running the configure script, the configure process - * will overwrite the distributed ares_build.h file with one that is suitable - * and specific to the library being configured and built, which is generated - * from the ares_build.h.in template file. - * - */ - -/* ================================================================ */ -/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ -/* ================================================================ */ - -#ifdef CARES_SIZEOF_LONG -# error "CARES_SIZEOF_LONG shall not be defined except in ares_build.h" - Error Compilation_aborted_CARES_SIZEOF_LONG_already_defined -#endif - -#ifdef CARES_TYPEOF_ARES_SOCKLEN_T -# error "CARES_TYPEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h" - Error Compilation_aborted_CARES_TYPEOF_ARES_SOCKLEN_T_already_defined -#endif - -#ifdef CARES_SIZEOF_ARES_SOCKLEN_T -# error "CARES_SIZEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h" - Error Compilation_aborted_CARES_SIZEOF_ARES_SOCKLEN_T_already_defined -#endif - -/* ================================================================ */ -/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */ -/* ================================================================ */ - -/* Configure process defines this to 1 when it finds out that system */ -/* header file ws2tcpip.h must be included by the external interface. */ -/* #undef CARES_PULL_WS2TCPIP_H */ -#ifdef CARES_PULL_WS2TCPIP_H -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# endif -# include -# include -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/types.h must be included by the external interface. */ -#define CARES_PULL_SYS_TYPES_H 1 -#ifdef CARES_PULL_SYS_TYPES_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/socket.h must be included by the external interface. */ -#define CARES_PULL_SYS_SOCKET_H 1 -#ifdef CARES_PULL_SYS_SOCKET_H -# include -#endif - -/* The size of `long', as computed by sizeof. */ -#define CARES_SIZEOF_LONG 4 - -/* Integral data type used for ares_socklen_t. */ -#define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t - -/* The size of `ares_socklen_t', as computed by sizeof. */ -#define CARES_SIZEOF_ARES_SOCKLEN_T 4 - -/* Data type definition of ares_socklen_t. */ -typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t; - -#endif /* __CARES_BUILD_H */ diff --git a/c-ares/config_sunos/ares_build.h b/c-ares/config_sunos/ares_build.h deleted file mode 100644 index ecceded2..00000000 --- a/c-ares/config_sunos/ares_build.h +++ /dev/null @@ -1,112 +0,0 @@ -/* ares_build.h. Generated from ares_build.h.in by configure. */ -#ifndef __CARES_BUILD_H -#define __CARES_BUILD_H - -/* $Id$ */ - -/* Copyright (C) 2009 by Daniel Stenberg et al - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, provided - * that the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of M.I.T. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. M.I.T. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - */ - -/* ================================================================ */ -/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ -/* ================================================================ */ - -/* - * NOTE 1: - * ------- - * - * Nothing in this file is intended to be modified or adjusted by the - * c-ares library user nor by the c-ares library builder. - * - * If you think that something actually needs to be changed, adjusted - * or fixed in this file, then, report it on the c-ares development - * mailing list: http://cool.haxx.se/mailman/listinfo/c-ares/ - * - * This header file shall only export symbols which are 'cares' or 'CARES' - * prefixed, otherwise public name space would be polluted. - * - * NOTE 2: - * ------- - * - * Right now you might be staring at file ares_build.h.in or ares_build.h, - * this is due to the following reason: - * - * On systems capable of running the configure script, the configure process - * will overwrite the distributed ares_build.h file with one that is suitable - * and specific to the library being configured and built, which is generated - * from the ares_build.h.in template file. - * - */ - -/* ================================================================ */ -/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ -/* ================================================================ */ - -#ifdef CARES_SIZEOF_LONG -# error "CARES_SIZEOF_LONG shall not be defined except in ares_build.h" - Error Compilation_aborted_CARES_SIZEOF_LONG_already_defined -#endif - -#ifdef CARES_TYPEOF_ARES_SOCKLEN_T -# error "CARES_TYPEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h" - Error Compilation_aborted_CARES_TYPEOF_ARES_SOCKLEN_T_already_defined -#endif - -#ifdef CARES_SIZEOF_ARES_SOCKLEN_T -# error "CARES_SIZEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h" - Error Compilation_aborted_CARES_SIZEOF_ARES_SOCKLEN_T_already_defined -#endif - -/* ================================================================ */ -/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */ -/* ================================================================ */ - -/* Configure process defines this to 1 when it finds out that system */ -/* header file ws2tcpip.h must be included by the external interface. */ -/* #undef CARES_PULL_WS2TCPIP_H */ -#ifdef CARES_PULL_WS2TCPIP_H -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN -# endif -# include -# include -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/types.h must be included by the external interface. */ -#define CARES_PULL_SYS_TYPES_H 1 -#ifdef CARES_PULL_SYS_TYPES_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/socket.h must be included by the external interface. */ -#define CARES_PULL_SYS_SOCKET_H 1 -#ifdef CARES_PULL_SYS_SOCKET_H -# include -#endif - -/* The size of `long', as computed by sizeof. */ -#define CARES_SIZEOF_LONG 4 - -/* Integral data type used for ares_socklen_t. */ -#define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t - -/* The size of `ares_socklen_t', as computed by sizeof. */ -#define CARES_SIZEOF_ARES_SOCKLEN_T 4 - -/* Data type definition of ares_socklen_t. */ -typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t; - -#endif /* __CARES_BUILD_H */ diff --git a/c-ares/config_win32/ares_build.h b/c-ares/config_win32/ares_build.h deleted file mode 100644 index c30ec53b..00000000 --- a/c-ares/config_win32/ares_build.h +++ /dev/null @@ -1,111 +0,0 @@ -/* ares_build.h. Generated from ares_build.h.in by configure. */ -#ifndef __CARES_BUILD_H -#define __CARES_BUILD_H - - -/* Copyright (C) 2009 by Daniel Stenberg et al - * - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, provided - * that the above copyright notice appear in all copies and that both that - * copyright notice and this permission notice appear in supporting - * documentation, and that the name of M.I.T. not be used in advertising or - * publicity pertaining to distribution of the software without specific, - * written prior permission. M.I.T. makes no representations about the - * suitability of this software for any purpose. It is provided "as is" - * without express or implied warranty. - */ - -/* ================================================================ */ -/* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ -/* ================================================================ */ - -/* - * NOTE 1: - * ------- - * - * Nothing in this file is intended to be modified or adjusted by the - * c-ares library user nor by the c-ares library builder. - * - * If you think that something actually needs to be changed, adjusted - * or fixed in this file, then, report it on the c-ares development - * mailing list: http://cool.haxx.se/mailman/listinfo/c-ares/ - * - * This header file shall only export symbols which are 'cares' or 'CARES' - * prefixed, otherwise public name space would be polluted. - * - * NOTE 2: - * ------- - * - * Right now you might be staring at file ares_build.h.in or ares_build.h, - * this is due to the following reason: - * - * On systems capable of running the configure script, the configure process - * will overwrite the distributed ares_build.h file with one that is suitable - * and specific to the library being configured and built, which is generated - * from the ares_build.h.in template file. - * - */ - -/* ================================================================ */ -/* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ -/* ================================================================ */ - -#ifdef CARES_SIZEOF_LONG -# error "CARES_SIZEOF_LONG shall not be defined except in ares_build.h" - Error Compilation_aborted_CARES_SIZEOF_LONG_already_defined -#endif - -#ifdef CARES_TYPEOF_ARES_SOCKLEN_T -# error "CARES_TYPEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h" - Error Compilation_aborted_CARES_TYPEOF_ARES_SOCKLEN_T_already_defined -#endif - -#ifdef CARES_SIZEOF_ARES_SOCKLEN_T -# error "CARES_SIZEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h" - Error Compilation_aborted_CARES_SIZEOF_ARES_SOCKLEN_T_already_defined -#endif - -/* ================================================================ */ -/* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */ -/* ================================================================ */ - -/* Configure process defines this to 1 when it finds out that system */ -/* header file ws2tcpip.h must be included by the external interface. */ -#define CARES_PULL_WS2TCPIP_H 1 -#ifdef CARES_PULL_WS2TCPIP_H -# ifndef WIN32_LEAN_AND_MEAN -# define WIN32_LEAN_AND_MEAN 1 -# endif -# include -# include -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/types.h must be included by the external interface. */ -/* #undef CARES_PULL_SYS_TYPES_H */ -#ifdef CARES_PULL_SYS_TYPES_H -# include -#endif - -/* Configure process defines this to 1 when it finds out that system */ -/* header file sys/socket.h must be included by the external interface. */ -/* #undef CARES_PULL_SYS_SOCKET_H */ -#ifdef CARES_PULL_SYS_SOCKET_H -# include -#endif - -/* The size of `long', as computed by sizeof. */ -#define CARES_SIZEOF_LONG 4 - -/* Integral data type used for ares_socklen_t. */ -#define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t - -/* The size of `ares_socklen_t', as computed by sizeof. */ -#define CARES_SIZEOF_ARES_SOCKLEN_T 4 - -/* Data type definition of ares_socklen_t. */ -typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t; - -#endif /* __CARES_BUILD_H */