"Fossies" - the Fresh Open Source Software Archive

Member "curl-7.66.0/include/curl/system.h" (9 Sep 2019, 18528 Bytes) of package /linux/www/curl-7.66.0.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. For more information about "system.h" see the Fossies "Dox" file reference documentation and the latest Fossies "Diffs" side-by-side code changes report: 7.65.3_vs_7.66.0.

    1 #ifndef CURLINC_SYSTEM_H
    2 #define CURLINC_SYSTEM_H
    3 /***************************************************************************
    4  *                                  _   _ ____  _
    5  *  Project                     ___| | | |  _ \| |
    6  *                             / __| | | | |_) | |
    7  *                            | (__| |_| |  _ <| |___
    8  *                             \___|\___/|_| \_\_____|
    9  *
   10  * Copyright (C) 1998 - 2019, Daniel Stenberg, <daniel@haxx.se>, et al.
   11  *
   12  * This software is licensed as described in the file COPYING, which
   13  * you should have received as part of this distribution. The terms
   14  * are also available at https://curl.haxx.se/docs/copyright.html.
   15  *
   16  * You may opt to use, copy, modify, merge, publish, distribute and/or sell
   17  * copies of the Software, and permit persons to whom the Software is
   18  * furnished to do so, under the terms of the COPYING file.
   19  *
   20  * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
   21  * KIND, either express or implied.
   22  *
   23  ***************************************************************************/
   24 
   25 /*
   26  * Try to keep one section per platform, compiler and architecture, otherwise,
   27  * if an existing section is reused for a different one and later on the
   28  * original is adjusted, probably the piggybacking one can be adversely
   29  * changed.
   30  *
   31  * In order to differentiate between platforms/compilers/architectures use
   32  * only compiler built in predefined preprocessor symbols.
   33  *
   34  * curl_off_t
   35  * ----------
   36  *
   37  * For any given platform/compiler curl_off_t must be typedef'ed to a 64-bit
   38  * wide signed integral data type. The width of this data type must remain
   39  * constant and independent of any possible large file support settings.
   40  *
   41  * As an exception to the above, curl_off_t shall be typedef'ed to a 32-bit
   42  * wide signed integral data type if there is no 64-bit type.
   43  *
   44  * As a general rule, curl_off_t shall not be mapped to off_t. This rule shall
   45  * only be violated if off_t is the only 64-bit data type available and the
   46  * size of off_t is independent of large file support settings. Keep your
   47  * build on the safe side avoiding an off_t gating.  If you have a 64-bit
   48  * off_t then take for sure that another 64-bit data type exists, dig deeper
   49  * and you will find it.
   50  *
   51  */
   52 
   53 #if defined(__DJGPP__) || defined(__GO32__)
   54 #  if defined(__DJGPP__) && (__DJGPP__ > 1)
   55 #    define CURL_TYPEOF_CURL_OFF_T     long long
   56 #    define CURL_FORMAT_CURL_OFF_T     "lld"
   57 #    define CURL_FORMAT_CURL_OFF_TU    "llu"
   58 #    define CURL_SUFFIX_CURL_OFF_T     LL
   59 #    define CURL_SUFFIX_CURL_OFF_TU    ULL
   60 #  else
   61 #    define CURL_TYPEOF_CURL_OFF_T     long
   62 #    define CURL_FORMAT_CURL_OFF_T     "ld"
   63 #    define CURL_FORMAT_CURL_OFF_TU    "lu"
   64 #    define CURL_SUFFIX_CURL_OFF_T     L
   65 #    define CURL_SUFFIX_CURL_OFF_TU    UL
   66 #  endif
   67 #  define CURL_TYPEOF_CURL_SOCKLEN_T int
   68 
   69 #elif defined(__SALFORDC__)
   70 #  define CURL_TYPEOF_CURL_OFF_T     long
   71 #  define CURL_FORMAT_CURL_OFF_T     "ld"
   72 #  define CURL_FORMAT_CURL_OFF_TU    "lu"
   73 #  define CURL_SUFFIX_CURL_OFF_T     L
   74 #  define CURL_SUFFIX_CURL_OFF_TU    UL
   75 #  define CURL_TYPEOF_CURL_SOCKLEN_T int
   76 
   77 #elif defined(__BORLANDC__)
   78 #  if (__BORLANDC__ < 0x520)
   79 #    define CURL_TYPEOF_CURL_OFF_T     long
   80 #    define CURL_FORMAT_CURL_OFF_T     "ld"
   81 #    define CURL_FORMAT_CURL_OFF_TU    "lu"
   82 #    define CURL_SUFFIX_CURL_OFF_T     L
   83 #    define CURL_SUFFIX_CURL_OFF_TU    UL
   84 #  else
   85 #    define CURL_TYPEOF_CURL_OFF_T     __int64
   86 #    define CURL_FORMAT_CURL_OFF_T     "I64d"
   87 #    define CURL_FORMAT_CURL_OFF_TU    "I64u"
   88 #    define CURL_SUFFIX_CURL_OFF_T     i64
   89 #    define CURL_SUFFIX_CURL_OFF_TU    ui64
   90 #  endif
   91 #  define CURL_TYPEOF_CURL_SOCKLEN_T int
   92 
   93 #elif defined(__TURBOC__)
   94 #  define CURL_TYPEOF_CURL_OFF_T     long
   95 #  define CURL_FORMAT_CURL_OFF_T     "ld"
   96 #  define CURL_FORMAT_CURL_OFF_TU    "lu"
   97 #  define CURL_SUFFIX_CURL_OFF_T     L
   98 #  define CURL_SUFFIX_CURL_OFF_TU    UL
   99 #  define CURL_TYPEOF_CURL_SOCKLEN_T int
  100 
  101 #elif defined(__WATCOMC__)
  102 #  if defined(__386__)
  103 #    define CURL_TYPEOF_CURL_OFF_T     __int64
  104 #    define CURL_FORMAT_CURL_OFF_T     "I64d"
  105 #    define CURL_FORMAT_CURL_OFF_TU    "I64u"
  106 #    define CURL_SUFFIX_CURL_OFF_T     i64
  107 #    define CURL_SUFFIX_CURL_OFF_TU    ui64
  108 #  else
  109 #    define CURL_TYPEOF_CURL_OFF_T     long
  110 #    define CURL_FORMAT_CURL_OFF_T     "ld"
  111 #    define CURL_FORMAT_CURL_OFF_TU    "lu"
  112 #    define CURL_SUFFIX_CURL_OFF_T     L
  113 #    define CURL_SUFFIX_CURL_OFF_TU    UL
  114 #  endif
  115 #  define CURL_TYPEOF_CURL_SOCKLEN_T int
  116 
  117 #elif defined(__POCC__)
  118 #  if (__POCC__ < 280)
  119 #    define CURL_TYPEOF_CURL_OFF_T     long
  120 #    define CURL_FORMAT_CURL_OFF_T     "ld"
  121 #    define CURL_FORMAT_CURL_OFF_TU    "lu"
  122 #    define CURL_SUFFIX_CURL_OFF_T     L
  123 #    define CURL_SUFFIX_CURL_OFF_TU    UL
  124 #  elif defined(_MSC_VER)
  125 #    define CURL_TYPEOF_CURL_OFF_T     __int64
  126 #    define CURL_FORMAT_CURL_OFF_T     "I64d"
  127 #    define CURL_FORMAT_CURL_OFF_TU    "I64u"
  128 #    define CURL_SUFFIX_CURL_OFF_T     i64
  129 #    define CURL_SUFFIX_CURL_OFF_TU    ui64
  130 #  else
  131 #    define CURL_TYPEOF_CURL_OFF_T     long long
  132 #    define CURL_FORMAT_CURL_OFF_T     "lld"
  133 #    define CURL_FORMAT_CURL_OFF_TU    "llu"
  134 #    define CURL_SUFFIX_CURL_OFF_T     LL
  135 #    define CURL_SUFFIX_CURL_OFF_TU    ULL
  136 #  endif
  137 #  define CURL_TYPEOF_CURL_SOCKLEN_T int
  138 
  139 #elif defined(__LCC__)
  140 #  define CURL_TYPEOF_CURL_OFF_T     long
  141 #  define CURL_FORMAT_CURL_OFF_T     "ld"
  142 #  define CURL_FORMAT_CURL_OFF_TU    "lu"
  143 #  define CURL_SUFFIX_CURL_OFF_T     L
  144 #  define CURL_SUFFIX_CURL_OFF_TU    UL
  145 #  define CURL_TYPEOF_CURL_SOCKLEN_T int
  146 
  147 #elif defined(__SYMBIAN32__)
  148 #  if defined(__EABI__)  /* Treat all ARM compilers equally */
  149 #    define CURL_TYPEOF_CURL_OFF_T     long long
  150 #    define CURL_FORMAT_CURL_OFF_T     "lld"
  151 #    define CURL_FORMAT_CURL_OFF_TU    "llu"
  152 #    define CURL_SUFFIX_CURL_OFF_T     LL
  153 #    define CURL_SUFFIX_CURL_OFF_TU    ULL
  154 #  elif defined(__CW32__)
  155 #    pragma longlong on
  156 #    define CURL_TYPEOF_CURL_OFF_T     long long
  157 #    define CURL_FORMAT_CURL_OFF_T     "lld"
  158 #    define CURL_FORMAT_CURL_OFF_TU    "llu"
  159 #    define CURL_SUFFIX_CURL_OFF_T     LL
  160 #    define CURL_SUFFIX_CURL_OFF_TU    ULL
  161 #  elif defined(__VC32__)
  162 #    define CURL_TYPEOF_CURL_OFF_T     __int64
  163 #    define CURL_FORMAT_CURL_OFF_T     "lld"
  164 #    define CURL_FORMAT_CURL_OFF_TU    "llu"
  165 #    define CURL_SUFFIX_CURL_OFF_T     LL
  166 #    define CURL_SUFFIX_CURL_OFF_TU    ULL
  167 #  endif
  168 #  define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int
  169 
  170 #elif defined(__MWERKS__)
  171 #  define CURL_TYPEOF_CURL_OFF_T     long long
  172 #  define CURL_FORMAT_CURL_OFF_T     "lld"
  173 #  define CURL_FORMAT_CURL_OFF_TU    "llu"
  174 #  define CURL_SUFFIX_CURL_OFF_T     LL
  175 #  define CURL_SUFFIX_CURL_OFF_TU    ULL
  176 #  define CURL_TYPEOF_CURL_SOCKLEN_T int
  177 
  178 #elif defined(_WIN32_WCE)
  179 #  define CURL_TYPEOF_CURL_OFF_T     __int64
  180 #  define CURL_FORMAT_CURL_OFF_T     "I64d"
  181 #  define CURL_FORMAT_CURL_OFF_TU    "I64u"
  182 #  define CURL_SUFFIX_CURL_OFF_T     i64
  183 #  define CURL_SUFFIX_CURL_OFF_TU    ui64
  184 #  define CURL_TYPEOF_CURL_SOCKLEN_T int
  185 
  186 #elif defined(__MINGW32__)
  187 #  define CURL_TYPEOF_CURL_OFF_T     long long
  188 #  define CURL_FORMAT_CURL_OFF_T     "I64d"
  189 #  define CURL_FORMAT_CURL_OFF_TU    "I64u"
  190 #  define CURL_SUFFIX_CURL_OFF_T     LL
  191 #  define CURL_SUFFIX_CURL_OFF_TU    ULL
  192 #  define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
  193 #  define CURL_PULL_SYS_TYPES_H      1
  194 #  define CURL_PULL_WS2TCPIP_H       1
  195 
  196 #elif defined(__VMS)
  197 #  if defined(__VAX)
  198 #    define CURL_TYPEOF_CURL_OFF_T     long
  199 #    define CURL_FORMAT_CURL_OFF_T     "ld"
  200 #    define CURL_FORMAT_CURL_OFF_TU    "lu"
  201 #    define CURL_SUFFIX_CURL_OFF_T     L
  202 #    define CURL_SUFFIX_CURL_OFF_TU    UL
  203 #  else
  204 #    define CURL_TYPEOF_CURL_OFF_T     long long
  205 #    define CURL_FORMAT_CURL_OFF_T     "lld"
  206 #    define CURL_FORMAT_CURL_OFF_TU    "llu"
  207 #    define CURL_SUFFIX_CURL_OFF_T     LL
  208 #    define CURL_SUFFIX_CURL_OFF_TU    ULL
  209 #  endif
  210 #  define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int
  211 
  212 #elif defined(__OS400__)
  213 #  if defined(__ILEC400__)
  214 #    define CURL_TYPEOF_CURL_OFF_T     long long
  215 #    define CURL_FORMAT_CURL_OFF_T     "lld"
  216 #    define CURL_FORMAT_CURL_OFF_TU    "llu"
  217 #    define CURL_SUFFIX_CURL_OFF_T     LL
  218 #    define CURL_SUFFIX_CURL_OFF_TU    ULL
  219 #    define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
  220 #    define CURL_PULL_SYS_TYPES_H      1
  221 #    define CURL_PULL_SYS_SOCKET_H     1
  222 #  endif
  223 
  224 #elif defined(__MVS__)
  225 #  if defined(__IBMC__) || defined(__IBMCPP__)
  226 #    if defined(_ILP32)
  227 #    elif defined(_LP64)
  228 #    endif
  229 #    if defined(_LONG_LONG)
  230 #      define CURL_TYPEOF_CURL_OFF_T     long long
  231 #      define CURL_FORMAT_CURL_OFF_T     "lld"
  232 #      define CURL_FORMAT_CURL_OFF_TU    "llu"
  233 #      define CURL_SUFFIX_CURL_OFF_T     LL
  234 #      define CURL_SUFFIX_CURL_OFF_TU    ULL
  235 #    elif defined(_LP64)
  236 #      define CURL_TYPEOF_CURL_OFF_T     long
  237 #      define CURL_FORMAT_CURL_OFF_T     "ld"
  238 #      define CURL_FORMAT_CURL_OFF_TU    "lu"
  239 #      define CURL_SUFFIX_CURL_OFF_T     L
  240 #      define CURL_SUFFIX_CURL_OFF_TU    UL
  241 #    else
  242 #      define CURL_TYPEOF_CURL_OFF_T     long
  243 #      define CURL_FORMAT_CURL_OFF_T     "ld"
  244 #      define CURL_FORMAT_CURL_OFF_TU    "lu"
  245 #      define CURL_SUFFIX_CURL_OFF_T     L
  246 #      define CURL_SUFFIX_CURL_OFF_TU    UL
  247 #    endif
  248 #    define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
  249 #    define CURL_PULL_SYS_TYPES_H      1
  250 #    define CURL_PULL_SYS_SOCKET_H     1
  251 #  endif
  252 
  253 #elif defined(__370__)
  254 #  if defined(__IBMC__) || defined(__IBMCPP__)
  255 #    if defined(_ILP32)
  256 #    elif defined(_LP64)
  257 #    endif
  258 #    if defined(_LONG_LONG)
  259 #      define CURL_TYPEOF_CURL_OFF_T     long long
  260 #      define CURL_FORMAT_CURL_OFF_T     "lld"
  261 #      define CURL_FORMAT_CURL_OFF_TU    "llu"
  262 #      define CURL_SUFFIX_CURL_OFF_T     LL
  263 #      define CURL_SUFFIX_CURL_OFF_TU    ULL
  264 #    elif defined(_LP64)
  265 #      define CURL_TYPEOF_CURL_OFF_T     long
  266 #      define CURL_FORMAT_CURL_OFF_T     "ld"
  267 #      define CURL_FORMAT_CURL_OFF_TU    "lu"
  268 #      define CURL_SUFFIX_CURL_OFF_T     L
  269 #      define CURL_SUFFIX_CURL_OFF_TU    UL
  270 #    else
  271 #      define CURL_TYPEOF_CURL_OFF_T     long
  272 #      define CURL_FORMAT_CURL_OFF_T     "ld"
  273 #      define CURL_FORMAT_CURL_OFF_TU    "lu"
  274 #      define CURL_SUFFIX_CURL_OFF_T     L
  275 #      define CURL_SUFFIX_CURL_OFF_TU    UL
  276 #    endif
  277 #    define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
  278 #    define CURL_PULL_SYS_TYPES_H      1
  279 #    define CURL_PULL_SYS_SOCKET_H     1
  280 #  endif
  281 
  282 #elif defined(TPF)
  283 #  define CURL_TYPEOF_CURL_OFF_T     long
  284 #  define CURL_FORMAT_CURL_OFF_T     "ld"
  285 #  define CURL_FORMAT_CURL_OFF_TU    "lu"
  286 #  define CURL_SUFFIX_CURL_OFF_T     L
  287 #  define CURL_SUFFIX_CURL_OFF_TU    UL
  288 #  define CURL_TYPEOF_CURL_SOCKLEN_T int
  289 
  290 #elif defined(__TINYC__) /* also known as tcc */
  291 
  292 #  define CURL_TYPEOF_CURL_OFF_T     long long
  293 #  define CURL_FORMAT_CURL_OFF_T     "lld"
  294 #  define CURL_FORMAT_CURL_OFF_TU    "llu"
  295 #  define CURL_SUFFIX_CURL_OFF_T     LL
  296 #  define CURL_SUFFIX_CURL_OFF_TU    ULL
  297 #  define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
  298 #  define CURL_PULL_SYS_TYPES_H      1
  299 #  define CURL_PULL_SYS_SOCKET_H     1
  300 
  301 #elif defined(__SUNPRO_C) || defined(__SUNPRO_CC) /* Oracle Solaris Studio */
  302 #  if !defined(__LP64) && (defined(__ILP32) ||                          \
  303                            defined(__i386) ||                           \
  304                            defined(__sparcv8) ||                        \
  305                            defined(__sparcv8plus))
  306 #    define CURL_TYPEOF_CURL_OFF_T     long long
  307 #    define CURL_FORMAT_CURL_OFF_T     "lld"
  308 #    define CURL_FORMAT_CURL_OFF_TU    "llu"
  309 #    define CURL_SUFFIX_CURL_OFF_T     LL
  310 #    define CURL_SUFFIX_CURL_OFF_TU    ULL
  311 #  elif defined(__LP64) || \
  312         defined(__amd64) || defined(__sparcv9)
  313 #    define CURL_TYPEOF_CURL_OFF_T     long
  314 #    define CURL_FORMAT_CURL_OFF_T     "ld"
  315 #    define CURL_FORMAT_CURL_OFF_TU    "lu"
  316 #    define CURL_SUFFIX_CURL_OFF_T     L
  317 #    define CURL_SUFFIX_CURL_OFF_TU    UL
  318 #  endif
  319 #  define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
  320 #  define CURL_PULL_SYS_TYPES_H      1
  321 #  define CURL_PULL_SYS_SOCKET_H     1
  322 
  323 #elif defined(__xlc__) /* IBM xlc compiler */
  324 #  if !defined(_LP64)
  325 #    define CURL_TYPEOF_CURL_OFF_T     long long
  326 #    define CURL_FORMAT_CURL_OFF_T     "lld"
  327 #    define CURL_FORMAT_CURL_OFF_TU    "llu"
  328 #    define CURL_SUFFIX_CURL_OFF_T     LL
  329 #    define CURL_SUFFIX_CURL_OFF_TU    ULL
  330 #  else
  331 #    define CURL_TYPEOF_CURL_OFF_T     long
  332 #    define CURL_FORMAT_CURL_OFF_T     "ld"
  333 #    define CURL_FORMAT_CURL_OFF_TU    "lu"
  334 #    define CURL_SUFFIX_CURL_OFF_T     L
  335 #    define CURL_SUFFIX_CURL_OFF_TU    UL
  336 #  endif
  337 #  define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
  338 #  define CURL_PULL_SYS_TYPES_H      1
  339 #  define CURL_PULL_SYS_SOCKET_H     1
  340 
  341 /* ===================================== */
  342 /*    KEEP MSVC THE PENULTIMATE ENTRY    */
  343 /* ===================================== */
  344 
  345 #elif defined(_MSC_VER)
  346 #  if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64)
  347 #    define CURL_TYPEOF_CURL_OFF_T     __int64
  348 #    define CURL_FORMAT_CURL_OFF_T     "I64d"
  349 #    define CURL_FORMAT_CURL_OFF_TU    "I64u"
  350 #    define CURL_SUFFIX_CURL_OFF_T     i64
  351 #    define CURL_SUFFIX_CURL_OFF_TU    ui64
  352 #  else
  353 #    define CURL_TYPEOF_CURL_OFF_T     long
  354 #    define CURL_FORMAT_CURL_OFF_T     "ld"
  355 #    define CURL_FORMAT_CURL_OFF_TU    "lu"
  356 #    define CURL_SUFFIX_CURL_OFF_T     L
  357 #    define CURL_SUFFIX_CURL_OFF_TU    UL
  358 #  endif
  359 #  define CURL_TYPEOF_CURL_SOCKLEN_T int
  360 
  361 /* ===================================== */
  362 /*    KEEP GENERIC GCC THE LAST ENTRY    */
  363 /* ===================================== */
  364 
  365 #elif defined(__GNUC__) && !defined(_SCO_DS)
  366 #  if !defined(__LP64__) &&                                             \
  367   (defined(__ILP32__) || defined(__i386__) || defined(__hppa__) ||      \
  368    defined(__ppc__) || defined(__powerpc__) || defined(__arm__) ||      \
  369    defined(__sparc__) || defined(__mips__) || defined(__sh__) ||        \
  370    defined(__XTENSA__) ||                                               \
  371    (defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ == 4)  ||               \
  372    (defined(__LONG_MAX__) && __LONG_MAX__ == 2147483647L))
  373 #    define CURL_TYPEOF_CURL_OFF_T     long long
  374 #    define CURL_FORMAT_CURL_OFF_T     "lld"
  375 #    define CURL_FORMAT_CURL_OFF_TU    "llu"
  376 #    define CURL_SUFFIX_CURL_OFF_T     LL
  377 #    define CURL_SUFFIX_CURL_OFF_TU    ULL
  378 #  elif defined(__LP64__) || \
  379         defined(__x86_64__) || defined(__ppc64__) || defined(__sparc64__) || \
  380         (defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ == 8) || \
  381         (defined(__LONG_MAX__) && __LONG_MAX__ == 9223372036854775807L)
  382 #    define CURL_TYPEOF_CURL_OFF_T     long
  383 #    define CURL_FORMAT_CURL_OFF_T     "ld"
  384 #    define CURL_FORMAT_CURL_OFF_TU    "lu"
  385 #    define CURL_SUFFIX_CURL_OFF_T     L
  386 #    define CURL_SUFFIX_CURL_OFF_TU    UL
  387 #  endif
  388 #  define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t
  389 #  define CURL_PULL_SYS_TYPES_H      1
  390 #  define CURL_PULL_SYS_SOCKET_H     1
  391 
  392 #else
  393 /* generic "safe guess" on old 32 bit style */
  394 # define CURL_TYPEOF_CURL_OFF_T     long
  395 # define CURL_FORMAT_CURL_OFF_T     "ld"
  396 # define CURL_FORMAT_CURL_OFF_TU    "lu"
  397 # define CURL_SUFFIX_CURL_OFF_T     L
  398 # define CURL_SUFFIX_CURL_OFF_TU    UL
  399 # define CURL_TYPEOF_CURL_SOCKLEN_T int
  400 #endif
  401 
  402 #ifdef _AIX
  403 /* AIX needs <sys/poll.h> */
  404 #define CURL_PULL_SYS_POLL_H
  405 #endif
  406 
  407 
  408 /* CURL_PULL_WS2TCPIP_H is defined above when inclusion of header file  */
  409 /* ws2tcpip.h is required here to properly make type definitions below. */
  410 #ifdef CURL_PULL_WS2TCPIP_H
  411 #  include <winsock2.h>
  412 #  include <windows.h>
  413 #  include <ws2tcpip.h>
  414 #endif
  415 
  416 /* CURL_PULL_SYS_TYPES_H is defined above when inclusion of header file  */
  417 /* sys/types.h is required here to properly make type definitions below. */
  418 #ifdef CURL_PULL_SYS_TYPES_H
  419 #  include <sys/types.h>
  420 #endif
  421 
  422 /* CURL_PULL_SYS_SOCKET_H is defined above when inclusion of header file  */
  423 /* sys/socket.h is required here to properly make type definitions below. */
  424 #ifdef CURL_PULL_SYS_SOCKET_H
  425 #  include <sys/socket.h>
  426 #endif
  427 
  428 /* CURL_PULL_SYS_POLL_H is defined above when inclusion of header file    */
  429 /* sys/poll.h is required here to properly make type definitions below.   */
  430 #ifdef CURL_PULL_SYS_POLL_H
  431 #  include <sys/poll.h>
  432 #endif
  433 
  434 /* Data type definition of curl_socklen_t. */
  435 #ifdef CURL_TYPEOF_CURL_SOCKLEN_T
  436   typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t;
  437 #endif
  438 
  439 /* Data type definition of curl_off_t. */
  440 
  441 #ifdef CURL_TYPEOF_CURL_OFF_T
  442   typedef CURL_TYPEOF_CURL_OFF_T curl_off_t;
  443 #endif
  444 
  445 /*
  446  * CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow
  447  * these to be visible and exported by the external libcurl interface API,
  448  * while also making them visible to the library internals, simply including
  449  * curl_setup.h, without actually needing to include curl.h internally.
  450  * If some day this section would grow big enough, all this should be moved
  451  * to its own header file.
  452  */
  453 
  454 /*
  455  * Figure out if we can use the ## preprocessor operator, which is supported
  456  * by ISO/ANSI C and C++. Some compilers support it without setting __STDC__
  457  * or  __cplusplus so we need to carefully check for them too.
  458  */
  459 
  460 #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \
  461   defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \
  462   defined(__POCC__) || defined(__SALFORDC__) || defined(__HIGHC__) || \
  463   defined(__ILEC400__)
  464   /* This compiler is believed to have an ISO compatible preprocessor */
  465 #define CURL_ISOCPP
  466 #else
  467   /* This compiler is believed NOT to have an ISO compatible preprocessor */
  468 #undef CURL_ISOCPP
  469 #endif
  470 
  471 /*
  472  * Macros for minimum-width signed and unsigned curl_off_t integer constants.
  473  */
  474 
  475 #if defined(__BORLANDC__) && (__BORLANDC__ == 0x0551)
  476 #  define CURLINC_OFF_T_C_HLPR2(x) x
  477 #  define CURLINC_OFF_T_C_HLPR1(x) CURLINC_OFF_T_C_HLPR2(x)
  478 #  define CURL_OFF_T_C(Val)  CURLINC_OFF_T_C_HLPR1(Val) ## \
  479                              CURLINC_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_T)
  480 #  define CURL_OFF_TU_C(Val) CURLINC_OFF_T_C_HLPR1(Val) ## \
  481                              CURLINC_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_TU)
  482 #else
  483 #  ifdef CURL_ISOCPP
  484 #    define CURLINC_OFF_T_C_HLPR2(Val,Suffix) Val ## Suffix
  485 #  else
  486 #    define CURLINC_OFF_T_C_HLPR2(Val,Suffix) Val/**/Suffix
  487 #  endif
  488 #  define CURLINC_OFF_T_C_HLPR1(Val,Suffix) CURLINC_OFF_T_C_HLPR2(Val,Suffix)
  489 #  define CURL_OFF_T_C(Val)  CURLINC_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_T)
  490 #  define CURL_OFF_TU_C(Val) CURLINC_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_TU)
  491 #endif
  492 
  493 #endif /* CURLINC_SYSTEM_H */