1 /* include/curl/curlbuild.h. Generated from curlbuild.h.in by configure. */ 2 #ifndef __CURL_CURLBUILD_H 3 #define __CURL_CURLBUILD_H 4 /*************************************************************************** 5 * _ _ ____ _ 6 * Project ___| | | | _ \| | 7 * / __| | | | |_) | | 8 * | (__| |_| | _ <| |___ 9 * \___|\___/|_| \_\_____| 10 * 11 * Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al. 12 * 13 * This software is licensed as described in the file COPYING, which 14 * you should have received as part of this distribution. The terms 15 * are also available at http://curl.haxx.se/docs/copyright.html. 16 * 17 * You may opt to use, copy, modify, merge, publish, distribute and/or sell 18 * copies of the Software, and permit persons to whom the Software is 19 * furnished to do so, under the terms of the COPYING file. 20 * 21 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY 22 * KIND, either express or implied. 23 * 24 * $Id: curlbuild.h.in,v 1.8 2009-04-29 15:15:38 yangtse Exp $ 25 ***************************************************************************/ 26 27 /* ================================================================ */ 28 /* NOTES FOR CONFIGURE CAPABLE SYSTEMS */ 29 /* ================================================================ */ 30 31 /* 32 * NOTE 1: 33 * ------- 34 * 35 * Nothing in this file is intended to be modified or adjusted by the 36 * curl library user nor by the curl library builder. 37 * 38 * If you think that something actually needs to be changed, adjusted 39 * or fixed in this file, then, report it on the libcurl development 40 * mailing list: http://cool.haxx.se/mailman/listinfo/curl-library/ 41 * 42 * This header file shall only export symbols which are 'curl' or 'CURL' 43 * prefixed, otherwise public name space would be polluted. 44 * 45 * NOTE 2: 46 * ------- 47 * 48 * Right now you might be staring at file include/curl/curlbuild.h.in or 49 * at file include/curl/curlbuild.h, this is due to the following reason: 50 * 51 * On systems capable of running the configure script, the configure process 52 * will overwrite the distributed include/curl/curlbuild.h file with one that 53 * is suitable and specific to the library being configured and built, which 54 * is generated from the include/curl/curlbuild.h.in template file. 55 * 56 */ 57 58 /* ================================================================ */ 59 /* DEFINITION OF THESE SYMBOLS SHALL NOT TAKE PLACE ANYWHERE ELSE */ 60 /* ================================================================ */ 61 62 #ifdef CURL_SIZEOF_LONG 63 # error "CURL_SIZEOF_LONG shall not be defined except in curlbuild.h" 64 Error Compilation_aborted_CURL_SIZEOF_LONG_already_defined 65 #endif 66 67 #ifdef CURL_TYPEOF_CURL_SOCKLEN_T 68 # error "CURL_TYPEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" 69 Error Compilation_aborted_CURL_TYPEOF_CURL_SOCKLEN_T_already_defined 70 #endif 71 72 #ifdef CURL_SIZEOF_CURL_SOCKLEN_T 73 # error "CURL_SIZEOF_CURL_SOCKLEN_T shall not be defined except in curlbuild.h" 74 Error Compilation_aborted_CURL_SIZEOF_CURL_SOCKLEN_T_already_defined 75 #endif 76 77 #ifdef CURL_TYPEOF_CURL_OFF_T 78 # error "CURL_TYPEOF_CURL_OFF_T shall not be defined except in curlbuild.h" 79 Error Compilation_aborted_CURL_TYPEOF_CURL_OFF_T_already_defined 80 #endif 81 82 #ifdef CURL_FORMAT_CURL_OFF_T 83 # error "CURL_FORMAT_CURL_OFF_T shall not be defined except in curlbuild.h" 84 Error Compilation_aborted_CURL_FORMAT_CURL_OFF_T_already_defined 85 #endif 86 87 #ifdef CURL_FORMAT_CURL_OFF_TU 88 # error "CURL_FORMAT_CURL_OFF_TU shall not be defined except in curlbuild.h" 89 Error Compilation_aborted_CURL_FORMAT_CURL_OFF_TU_already_defined 90 #endif 91 92 #ifdef CURL_FORMAT_OFF_T 93 # error "CURL_FORMAT_OFF_T shall not be defined except in curlbuild.h" 94 Error Compilation_aborted_CURL_FORMAT_OFF_T_already_defined 95 #endif 96 97 #ifdef CURL_SIZEOF_CURL_OFF_T 98 # error "CURL_SIZEOF_CURL_OFF_T shall not be defined except in curlbuild.h" 99 Error Compilation_aborted_CURL_SIZEOF_CURL_OFF_T_already_defined 100 #endif 101 102 #ifdef CURL_SUFFIX_CURL_OFF_T 103 # error "CURL_SUFFIX_CURL_OFF_T shall not be defined except in curlbuild.h" 104 Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_T_already_defined 105 #endif 106 107 #ifdef CURL_SUFFIX_CURL_OFF_TU 108 # error "CURL_SUFFIX_CURL_OFF_TU shall not be defined except in curlbuild.h" 109 Error Compilation_aborted_CURL_SUFFIX_CURL_OFF_TU_already_defined 110 #endif 111 112 /* ================================================================ */ 113 /* EXTERNAL INTERFACE SETTINGS FOR CONFIGURE CAPABLE SYSTEMS ONLY */ 114 /* ================================================================ */ 115 116 /* Configure process defines this to 1 when it finds out that system */ 117 /* header file ws2tcpip.h must be included by the external interface. */ 118 /* #undef CURL_PULL_WS2TCPIP_H */ 119 #ifdef CURL_PULL_WS2TCPIP_H 120 # ifndef WIN32_LEAN_AND_MEAN 121 # define WIN32_LEAN_AND_MEAN 122 # endif 123 # include <windows.h> 124 # include <winsock2.h> 125 # include <ws2tcpip.h> 126 #endif 127 128 /* Configure process defines this to 1 when it finds out that system */ 129 /* header file sys/types.h must be included by the external interface. */ 130 #define CURL_PULL_SYS_TYPES_H 1 131 #ifdef CURL_PULL_SYS_TYPES_H 132 # include <sys/types.h> 133 #endif 134 135 /* Configure process defines this to 1 when it finds out that system */ 136 /* header file stdint.h must be included by the external interface. */ 137 /* #undef CURL_PULL_STDINT_H */ 138 #ifdef CURL_PULL_STDINT_H 139 # include <stdint.h> 140 #endif 141 142 /* Configure process defines this to 1 when it finds out that system */ 143 /* header file inttypes.h must be included by the external interface. */ 144 /* #undef CURL_PULL_INTTYPES_H */ 145 #ifdef CURL_PULL_INTTYPES_H 146 # include <inttypes.h> 147 #endif 148 149 /* Configure process defines this to 1 when it finds out that system */ 150 /* header file sys/socket.h must be included by the external interface. */ 151 #define CURL_PULL_SYS_SOCKET_H 1 152 #ifdef CURL_PULL_SYS_SOCKET_H 153 # include <sys/socket.h> 154 #endif 155 156 /* The size of `long', as computed by sizeof. */ 157 #if defined(_M_X64) || (defined(__x86_64__) && !defined(__ILP32__)) || \ 158 defined(__aarch64__) || (defined(__mips__) && _MIPS_SIM == _ABI64) || \ 159 defined(__powerpc64__) || defined(__s390x__) || defined(__LP64__) 160 #define CURL_SIZEOF_LONG 8 161 #else 162 #define CURL_SIZEOF_LONG 4 163 #endif 164 165 /* Integral data type used for curl_socklen_t. */ 166 #define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t 167 168 /* The size of `curl_socklen_t', as computed by sizeof. */ 169 #define CURL_SIZEOF_CURL_SOCKLEN_T 4 170 171 /* Data type definition of curl_socklen_t. */ 172 typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t; 173 174 /* Signed integral data type used for curl_off_t. */ 175 #if defined(_M_X64) || (defined(__x86_64__) && !defined(__ILP32__)) || \ 176 defined(__aarch64__) 177 #define CURL_TYPEOF_CURL_OFF_T long 178 #else 179 #define CURL_TYPEOF_CURL_OFF_T int64_t 180 #endif 181 182 /* Data type definition of curl_off_t. */ 183 typedef CURL_TYPEOF_CURL_OFF_T curl_off_t; 184 185 /* curl_off_t formatting string directive without "%" conversion specifier. */ 186 #define CURL_FORMAT_CURL_OFF_T "ld" 187 188 /* unsigned curl_off_t formatting string without "%" conversion specifier. */ 189 #define CURL_FORMAT_CURL_OFF_TU "lu" 190 191 /* curl_off_t formatting string directive with "%" conversion specifier. */ 192 #define CURL_FORMAT_OFF_T "%ld" 193 194 /* The size of `curl_off_t', as computed by sizeof. */ 195 #define CURL_SIZEOF_CURL_OFF_T 8 196 197 /* curl_off_t constant suffix. */ 198 #define CURL_SUFFIX_CURL_OFF_T L 199 200 /* unsigned curl_off_t constant suffix. */ 201 #define CURL_SUFFIX_CURL_OFF_TU UL 202 203 #endif /* __CURL_CURLBUILD_H */ 204