25 #if defined(__INTEL_COMPILER) && defined(__unix__) 27 #ifdef HAVE_NETINET_IN_H 28 # include <netinet/in.h> 30 #ifdef HAVE_ARPA_INET_H 31 # include <arpa/inet.h> 36 #define BUILDING_WARNLESS_C 1 40 #define CURL_MASK_SCHAR 0x7F 41 #define CURL_MASK_UCHAR 0xFF 43 #if (SIZEOF_SHORT == 2) 44 # define CURL_MASK_SSHORT 0x7FFF 45 # define CURL_MASK_USHORT 0xFFFF 46 #elif (SIZEOF_SHORT == 4) 47 # define CURL_MASK_SSHORT 0x7FFFFFFF 48 # define CURL_MASK_USHORT 0xFFFFFFFF 49 #elif (SIZEOF_SHORT == 8) 50 # define CURL_MASK_SSHORT 0x7FFFFFFFFFFFFFFF 51 # define CURL_MASK_USHORT 0xFFFFFFFFFFFFFFFF 53 # error "SIZEOF_SHORT not defined" 57 # define CURL_MASK_SINT 0x7FFF 58 # define CURL_MASK_UINT 0xFFFF 59 #elif (SIZEOF_INT == 4) 60 # define CURL_MASK_SINT 0x7FFFFFFF 61 # define CURL_MASK_UINT 0xFFFFFFFF 62 #elif (SIZEOF_INT == 8) 63 # define CURL_MASK_SINT 0x7FFFFFFFFFFFFFFF 64 # define CURL_MASK_UINT 0xFFFFFFFFFFFFFFFF 65 #elif (SIZEOF_INT == 16) 66 # define CURL_MASK_SINT 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 67 # define CURL_MASK_UINT 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF 69 # error "SIZEOF_INT not defined" 72 #if (SIZEOF_LONG == 2) 73 # define CURL_MASK_SLONG 0x7FFFL 74 # define CURL_MASK_ULONG 0xFFFFUL 75 #elif (SIZEOF_LONG == 4) 76 # define CURL_MASK_SLONG 0x7FFFFFFFL 77 # define CURL_MASK_ULONG 0xFFFFFFFFUL 78 #elif (SIZEOF_LONG == 8) 79 # define CURL_MASK_SLONG 0x7FFFFFFFFFFFFFFFL 80 # define CURL_MASK_ULONG 0xFFFFFFFFFFFFFFFFUL 81 #elif (SIZEOF_LONG == 16) 82 # define CURL_MASK_SLONG 0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFL 83 # define CURL_MASK_ULONG 0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFUL 85 # error "SIZEOF_LONG not defined" 88 #if (SIZEOF_CURL_OFF_T == 2) 89 # define CURL_MASK_SCOFFT CURL_OFF_T_C(0x7FFF) 90 # define CURL_MASK_UCOFFT CURL_OFF_TU_C(0xFFFF) 91 #elif (SIZEOF_CURL_OFF_T == 4) 92 # define CURL_MASK_SCOFFT CURL_OFF_T_C(0x7FFFFFFF) 93 # define CURL_MASK_UCOFFT CURL_OFF_TU_C(0xFFFFFFFF) 94 #elif (SIZEOF_CURL_OFF_T == 8) 95 # define CURL_MASK_SCOFFT CURL_OFF_T_C(0x7FFFFFFFFFFFFFFF) 96 # define CURL_MASK_UCOFFT CURL_OFF_TU_C(0xFFFFFFFFFFFFFFFF) 97 #elif (SIZEOF_CURL_OFF_T == 16) 98 # define CURL_MASK_SCOFFT CURL_OFF_T_C(0x7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) 99 # define CURL_MASK_UCOFFT CURL_OFF_TU_C(0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF) 101 # error "SIZEOF_CURL_OFF_T not defined" 104 #if (SIZEOF_SIZE_T == SIZEOF_SHORT) 105 # define CURL_MASK_SSIZE_T CURL_MASK_SSHORT 106 # define CURL_MASK_USIZE_T CURL_MASK_USHORT 107 #elif (SIZEOF_SIZE_T == SIZEOF_INT) 108 # define CURL_MASK_SSIZE_T CURL_MASK_SINT 109 # define CURL_MASK_USIZE_T CURL_MASK_UINT 110 #elif (SIZEOF_SIZE_T == SIZEOF_LONG) 111 # define CURL_MASK_SSIZE_T CURL_MASK_SLONG 112 # define CURL_MASK_USIZE_T CURL_MASK_ULONG 113 #elif (SIZEOF_SIZE_T == SIZEOF_CURL_OFF_T) 114 # define CURL_MASK_SSIZE_T CURL_MASK_SCOFFT 115 # define CURL_MASK_USIZE_T CURL_MASK_UCOFFT 117 # error "SIZEOF_SIZE_T not defined" 126 #ifdef __INTEL_COMPILER 127 # pragma warning(push) 128 # pragma warning(disable:810) 131 DEBUGASSERT(ulnum <= (
unsigned long) CURL_MASK_USHORT);
132 return (
unsigned short)(ulnum & (
unsigned long) CURL_MASK_USHORT);
134 #ifdef __INTEL_COMPILER 135 # pragma warning(pop) 145 #ifdef __INTEL_COMPILER 146 # pragma warning(push) 147 # pragma warning(disable:810) 151 return (
unsigned char)(ulnum & (
unsigned long) CURL_MASK_UCHAR);
153 #ifdef __INTEL_COMPILER 154 # pragma warning(pop) 164 #ifdef __INTEL_COMPILER 165 # pragma warning(push) 166 # pragma warning(disable:810) 169 DEBUGASSERT(ulnum <= (
unsigned long) CURL_MASK_SINT);
170 return (
int)(ulnum & (
unsigned long) CURL_MASK_SINT);
172 #ifdef __INTEL_COMPILER 173 # pragma warning(pop) 183 #ifdef __INTEL_COMPILER 184 # pragma warning(push) 185 # pragma warning(disable:810) 186 #elif defined(_MSC_VER) 187 # pragma warning(push) 188 # pragma warning(disable:4310) 194 #if defined(__INTEL_COMPILER) || defined(_MSC_VER) 195 # pragma warning(pop) 205 #ifdef __INTEL_COMPILER 206 # pragma warning(push) 207 # pragma warning(disable:810) 211 return (
int)(uznum & (
size_t) CURL_MASK_SINT);
213 #ifdef __INTEL_COMPILER 214 # pragma warning(pop) 224 #ifdef __INTEL_COMPILER 225 # pragma warning(push) 226 # pragma warning(disable:810) 229 #if (SIZEOF_LONG < SIZEOF_SIZE_T) 232 return (
unsigned long)(uznum & (
size_t) CURL_MASK_ULONG);
234 #ifdef __INTEL_COMPILER 235 # pragma warning(pop) 245 #ifdef __INTEL_COMPILER 246 # pragma warning(push) 247 # pragma warning(disable:810) 250 #if (SIZEOF_INT < SIZEOF_SIZE_T) 253 return (
unsigned int)(uznum & (
size_t) CURL_MASK_UINT);
255 #ifdef __INTEL_COMPILER 256 # pragma warning(pop) 266 #ifdef __INTEL_COMPILER 267 # pragma warning(push) 268 # pragma warning(disable:810) 272 #if (SIZEOF_INT < SIZEOF_LONG) 273 DEBUGASSERT((
unsigned long) slnum <= (
unsigned long) CURL_MASK_SINT);
275 return (
int)(slnum & (long) CURL_MASK_SINT);
277 #ifdef __INTEL_COMPILER 278 # pragma warning(pop) 288 #ifdef __INTEL_COMPILER 289 # pragma warning(push) 290 # pragma warning(disable:810) 294 #if (SIZEOF_INT < SIZEOF_LONG) 295 DEBUGASSERT((
unsigned long) slnum <= (
unsigned long) CURL_MASK_UINT);
297 return (
unsigned int)(slnum & (long) CURL_MASK_UINT);
299 #ifdef __INTEL_COMPILER 300 # pragma warning(pop) 310 #ifdef __INTEL_COMPILER 311 # pragma warning(push) 312 # pragma warning(disable:810) 316 DEBUGASSERT((
unsigned long) slnum <= (
unsigned long) CURL_MASK_USHORT);
317 return (
unsigned short)(slnum & (long) CURL_MASK_USHORT);
319 #ifdef __INTEL_COMPILER 320 # pragma warning(pop) 330 #ifdef __INTEL_COMPILER 331 # pragma warning(push) 332 # pragma warning(disable:810) 338 #ifdef __INTEL_COMPILER 339 # pragma warning(pop) 349 #ifdef __INTEL_COMPILER 350 # pragma warning(push) 351 # pragma warning(disable:810) 357 #ifdef __INTEL_COMPILER 358 # pragma warning(pop) 368 #ifdef __INTEL_COMPILER 369 # pragma warning(push) 370 # pragma warning(disable:810) 374 #if (SIZEOF_INT < SIZEOF_SIZE_T) 375 DEBUGASSERT((
size_t) sznum <= (
size_t) CURL_MASK_SINT);
377 return (
int)(sznum & (
ssize_t) CURL_MASK_SINT);
379 #ifdef __INTEL_COMPILER 380 # pragma warning(pop) 390 #ifdef __INTEL_COMPILER 391 # pragma warning(push) 392 # pragma warning(disable:810) 395 DEBUGASSERT(uinum <= (
unsigned int) CURL_MASK_USHORT);
396 return (
unsigned short) (uinum & (
unsigned int) CURL_MASK_USHORT);
398 #ifdef __INTEL_COMPILER 399 # pragma warning(pop) 409 #ifdef __INTEL_COMPILER 410 # pragma warning(push) 411 # pragma warning(disable:810) 415 return (
unsigned char) (uinum & (
unsigned int) CURL_MASK_UCHAR);
417 #ifdef __INTEL_COMPILER 418 # pragma warning(pop) 428 #ifdef __INTEL_COMPILER 429 # pragma warning(push) 430 # pragma warning(disable:810) 433 DEBUGASSERT(uinum <= (
unsigned int) CURL_MASK_SINT);
434 return (
int) (uinum & (
unsigned int) CURL_MASK_SINT);
436 #ifdef __INTEL_COMPILER 437 # pragma warning(pop) 447 #ifdef __INTEL_COMPILER 448 # pragma warning(push) 449 # pragma warning(disable:810) 453 return (
size_t) sinum;
455 #ifdef __INTEL_COMPILER 456 # pragma warning(pop) 482 #if defined(WIN32) || defined(_WIN32) 484 ssize_t curlx_read(
int fd,
void *
buf,
size_t count)
489 ssize_t curlx_write(
int fd,
const void *
buf,
size_t count)
496 #if defined(__INTEL_COMPILER) && defined(__unix__) 498 int curlx_FD_ISSET(
int fd, fd_set *fdset)
500 #pragma warning(push) 501 #pragma warning(disable:1469) 502 return FD_ISSET(fd, fdset);
506 void curlx_FD_SET(
int fd, fd_set *fdset)
508 #pragma warning(push) 509 #pragma warning(disable:1469) 514 void curlx_FD_ZERO(fd_set *fdset)
516 #pragma warning(push) 517 #pragma warning(disable:593) 522 unsigned short curlx_htons(
unsigned short usnum)
524 #if (__INTEL_COMPILER == 910) && defined(__i386__) 525 return (
unsigned short)(((usnum << 8) & 0xFF00) | ((usnum >> 8) & 0x00FF));
527 #pragma warning(push) 528 #pragma warning(disable:810) 534 unsigned short curlx_ntohs(
unsigned short usnum)
536 #if (__INTEL_COMPILER == 910) && defined(__i386__) 537 return (
unsigned short)(((usnum << 8) & 0xFF00) | ((usnum >> 8) & 0x00FF));
539 #pragma warning(push) 540 #pragma warning(disable:810) #define CURL_MASK_SSIZE_T
int curlx_sltosi(long slnum)
size_t curlx_sitouz(int sinum)
unsigned char curlx_ultouc(unsigned long ulnum)
int curlx_uitosi(unsigned int uinum)
int curlx_uztosi(size_t uznum)
ssize_t curlx_uztosz(size_t uznum)
unsigned short curlx_ultous(unsigned long ulnum)
int curlx_ultosi(unsigned long ulnum)
unsigned short curlx_sltous(long slnum)
unsigned char curlx_uitouc(unsigned int uinum)
curl_off_t curlx_uztoso(size_t uznum)
unsigned long curlx_uztoul(size_t uznum)
curl_easy_setopt expects a curl_off_t argument for this option curl_easy_setopt expects a curl_write_callback argument for this option curl_easy_setopt expects a curl_ioctl_callback argument for this option curl_easy_setopt expects a curl_opensocket_callback argument for this option curl_easy_setopt expects a curl_debug_callback argument for this option curl_easy_setopt expects a curl_conv_callback argument for this option curl_easy_setopt expects a private data pointer as argument for this option curl_easy_setopt expects a FILE *argument for this option curl_easy_setopt expects a struct curl_httppost *argument for this option curl_easy_setopt expects a struct curl_slist *argument for this option curl_easy_getinfo expects a pointer to char *for this info curl_easy_getinfo expects a pointer to double for this info curl_easy_getinfo expects a pointer to struct curl_tlssessioninfo *for this info curl_easy_getinfo expects a pointer to curl_socket_t for this info size_t
CURL_TYPEOF_CURL_OFF_T curl_off_t
unsigned int curlx_uztoui(size_t uznum)
unsigned short curlx_uitous(unsigned int uinum)
int curlx_sztosi(ssize_t sznum)
unsigned int curlx_sltoui(long slnum)
size_t curlx_sotouz(curl_off_t sonum)
#define CURL_MASK_USIZE_T