lh | 9ed821d | 2023-04-07 01:36:19 -0700 | [diff] [blame] | 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_TYPEOF_ARES_SOCKLEN_T |
| 54 | # error "CARES_TYPEOF_ARES_SOCKLEN_T shall not be defined except in ares_build.h" |
| 55 | Error Compilation_aborted_CARES_TYPEOF_ARES_SOCKLEN_T_already_defined |
| 56 | #endif |
| 57 | |
| 58 | /* ================================================================ */ |
| 59 | /* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */ |
| 60 | /* ================================================================ */ |
| 61 | |
| 62 | /* Configure process defines this to 1 when it finds out that system */ |
| 63 | /* header file ws2tcpip.h must be included by the external interface. */ |
| 64 | #undef CARES_PULL_WS2TCPIP_H |
| 65 | #ifdef CARES_PULL_WS2TCPIP_H |
| 66 | # ifndef WIN32_LEAN_AND_MEAN |
| 67 | # define WIN32_LEAN_AND_MEAN |
| 68 | # endif |
| 69 | # include <windows.h> |
| 70 | # include <winsock2.h> |
| 71 | # include <ws2tcpip.h> |
| 72 | #endif |
| 73 | |
| 74 | /* Configure process defines this to 1 when it finds out that system */ |
| 75 | /* header file sys/types.h must be included by the external interface. */ |
| 76 | #undef CARES_PULL_SYS_TYPES_H |
| 77 | #ifdef CARES_PULL_SYS_TYPES_H |
| 78 | # include <sys/types.h> |
| 79 | #endif |
| 80 | |
| 81 | /* Configure process defines this to 1 when it finds out that system */ |
| 82 | /* header file sys/socket.h must be included by the external interface. */ |
| 83 | #undef CARES_PULL_SYS_SOCKET_H |
| 84 | #ifdef CARES_PULL_SYS_SOCKET_H |
| 85 | # include <sys/socket.h> |
| 86 | #endif |
| 87 | |
| 88 | /* Integral data type used for ares_socklen_t. */ |
| 89 | #undef CARES_TYPEOF_ARES_SOCKLEN_T |
| 90 | |
| 91 | /* Data type definition of ares_socklen_t. */ |
| 92 | typedef CARES_TYPEOF_ARES_SOCKLEN_T ares_socklen_t; |
| 93 | |
| 94 | #endif /* __CARES_BUILD_H */ |