2012-12-28 19:03:09 +08:00
|
|
|
#ifndef HEADER_CURL_SETUP_ONCE_H
|
|
|
|
#define HEADER_CURL_SETUP_ONCE_H
|
2006-07-28 22:19:02 +08:00
|
|
|
/***************************************************************************
|
|
|
|
* _ _ ____ _
|
|
|
|
* Project ___| | | | _ \| |
|
|
|
|
* / __| | | | |_) | |
|
|
|
|
* | (__| |_| | _ <| |___
|
|
|
|
* \___|\___/|_| \_\_____|
|
|
|
|
*
|
2023-01-02 20:51:48 +08:00
|
|
|
* Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
|
2006-07-28 22:19:02 +08:00
|
|
|
*
|
|
|
|
* This software is licensed as described in the file COPYING, which
|
|
|
|
* you should have received as part of this distribution. The terms
|
2020-11-04 21:02:01 +08:00
|
|
|
* are also available at https://curl.se/docs/copyright.html.
|
2006-07-28 22:19:02 +08:00
|
|
|
*
|
|
|
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
|
|
* copies of the Software, and permit persons to whom the Software is
|
|
|
|
* furnished to do so, under the terms of the COPYING file.
|
|
|
|
*
|
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
|
|
|
*
|
|
|
|
* SPDX-License-Identifier: curl
|
2022-05-17 17:16:50 +08:00
|
|
|
*
|
2006-07-28 22:19:02 +08:00
|
|
|
***************************************************************************/
|
|
|
|
|
|
|
|
|
2007-02-18 08:34:37 +08:00
|
|
|
/*
|
|
|
|
* Inclusion of common header files.
|
|
|
|
*/
|
|
|
|
|
2007-02-20 20:12:27 +08:00
|
|
|
#include <stdio.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
#include <stdarg.h>
|
configure: include <time.h> unconditionally
In 2682e5f5, several instances of AC_HEADER_TIME were removed since
it is a deprecated autoconf macro. However, this was the macro that
defined TIME_WITH_SYS_TIME, which was used to indicate that <time.h>
can be included alongside <sys/time.h>. TIME_WITH_SYS_TIME is still
used in the configure test body and since it is no longer defined,
<time.h> is *not* included on systems that have <sys/time.h>.
In particular, at least on musl libc and glibc, <sys/time.h> does
not implicitly include <time.h> and does not declare clock_gettime,
gmtime_r, or localtime_r. This causes configure to fail to detect
those functions.
The AC_HEADER_TIME macro deprecation text says
> All current systems provide time.h; it need not be checked for.
> Not all systems provide sys/time.h, but those that do, all allow
> you to include it and time.h simultaneously.
So, to fix this issue, simply include <time.h> unconditionally when
testing for time-related functions and in libcurl, and don't bother
checking for it.
Closes #6859
2021-04-07 15:32:47 +08:00
|
|
|
#include <time.h>
|
2007-02-18 08:34:37 +08:00
|
|
|
#include <errno.h>
|
|
|
|
|
2007-02-20 20:12:27 +08:00
|
|
|
#ifdef HAVE_SYS_TYPES_H
|
|
|
|
#include <sys/types.h>
|
|
|
|
#endif
|
|
|
|
|
2009-04-21 18:26:58 +08:00
|
|
|
#ifdef NEED_MALLOC_H
|
|
|
|
#include <malloc.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef NEED_MEMORY_H
|
|
|
|
#include <memory.h>
|
|
|
|
#endif
|
|
|
|
|
2007-02-20 20:12:27 +08:00
|
|
|
#ifdef HAVE_SYS_STAT_H
|
|
|
|
#include <sys/stat.h>
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef HAVE_SYS_TIME_H
|
|
|
|
#include <sys/time.h>
|
|
|
|
#endif
|
|
|
|
|
2023-11-22 00:54:49 +08:00
|
|
|
#ifdef _WIN32
|
2007-02-20 20:12:27 +08:00
|
|
|
#include <io.h>
|
|
|
|
#include <fcntl.h>
|
|
|
|
#endif
|
|
|
|
|
2012-04-14 21:41:38 +08:00
|
|
|
#if defined(HAVE_STDBOOL_H) && defined(HAVE_BOOL_T)
|
2007-02-22 10:51:54 +08:00
|
|
|
#include <stdbool.h>
|
|
|
|
#endif
|
|
|
|
|
2012-12-15 00:38:18 +08:00
|
|
|
#ifdef HAVE_UNISTD_H
|
|
|
|
#include <unistd.h>
|
|
|
|
#endif
|
|
|
|
|
2023-03-14 19:57:31 +08:00
|
|
|
#ifdef USE_WOLFSSL
|
2023-11-06 10:17:39 +08:00
|
|
|
#include <stdint.h>
|
2023-03-14 19:57:31 +08:00
|
|
|
#endif
|
|
|
|
|
2023-05-09 18:10:40 +08:00
|
|
|
#ifdef USE_SCHANNEL
|
|
|
|
/* Must set this before <schannel.h> is included directly or indirectly by
|
|
|
|
another Windows header. */
|
|
|
|
# define SCHANNEL_USE_BLACKLISTS 1
|
|
|
|
#endif
|
|
|
|
|
2012-12-15 02:39:22 +08:00
|
|
|
#ifdef __hpux
|
|
|
|
# if !defined(_XOPEN_SOURCE_EXTENDED) || defined(_KERNEL)
|
|
|
|
# ifdef _APP32_64BIT_OFF_T
|
|
|
|
# define OLD_APP32_64BIT_OFF_T _APP32_64BIT_OFF_T
|
|
|
|
# undef _APP32_64BIT_OFF_T
|
|
|
|
# else
|
|
|
|
# undef OLD_APP32_64BIT_OFF_T
|
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2012-12-15 00:38:18 +08:00
|
|
|
#ifdef HAVE_SYS_SOCKET_H
|
|
|
|
#include <sys/socket.h>
|
|
|
|
#endif
|
|
|
|
|
2022-09-26 17:45:18 +08:00
|
|
|
#include "functypes.h"
|
|
|
|
|
2012-12-15 02:39:22 +08:00
|
|
|
#ifdef __hpux
|
|
|
|
# if !defined(_XOPEN_SOURCE_EXTENDED) || defined(_KERNEL)
|
|
|
|
# ifdef OLD_APP32_64BIT_OFF_T
|
|
|
|
# define _APP32_64BIT_OFF_T OLD_APP32_64BIT_OFF_T
|
|
|
|
# undef OLD_APP32_64BIT_OFF_T
|
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2007-02-20 20:12:27 +08:00
|
|
|
/*
|
|
|
|
* Definition of timeval struct for platforms that don't have it.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef HAVE_STRUCT_TIMEVAL
|
|
|
|
struct timeval {
|
|
|
|
long tv_sec;
|
|
|
|
long tv_usec;
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2007-02-18 08:34:37 +08:00
|
|
|
|
2006-07-28 22:19:02 +08:00
|
|
|
/*
|
|
|
|
* If we have the MSG_NOSIGNAL define, make sure we use
|
2007-01-27 09:56:20 +08:00
|
|
|
* it as the fourth argument of function send()
|
2006-07-28 22:19:02 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef HAVE_MSG_NOSIGNAL
|
|
|
|
#define SEND_4TH_ARG MSG_NOSIGNAL
|
|
|
|
#else
|
|
|
|
#define SEND_4TH_ARG 0
|
2006-08-30 00:26:41 +08:00
|
|
|
#endif
|
2006-07-28 22:19:02 +08:00
|
|
|
|
|
|
|
|
2007-09-06 06:01:57 +08:00
|
|
|
#if defined(__minix)
|
|
|
|
/* Minix doesn't support recv on TCP sockets */
|
|
|
|
#define sread(x,y,z) (ssize_t)read((RECV_TYPE_ARG1)(x), \
|
|
|
|
(RECV_TYPE_ARG2)(y), \
|
|
|
|
(RECV_TYPE_ARG3)(z))
|
|
|
|
|
|
|
|
#elif defined(HAVE_RECV)
|
2006-07-28 22:19:02 +08:00
|
|
|
/*
|
|
|
|
* The definitions for the return type and arguments types
|
|
|
|
* of functions recv() and send() belong and come from the
|
|
|
|
* configuration file. Do not define them in any other place.
|
|
|
|
*
|
|
|
|
* HAVE_RECV is defined if you have a function named recv()
|
|
|
|
* which is used to read incoming data from sockets. If your
|
|
|
|
* function has another name then don't define HAVE_RECV.
|
|
|
|
*
|
|
|
|
* If HAVE_RECV is defined then RECV_TYPE_ARG1, RECV_TYPE_ARG2,
|
|
|
|
* RECV_TYPE_ARG3, RECV_TYPE_ARG4 and RECV_TYPE_RETV must also
|
|
|
|
* be defined.
|
|
|
|
*
|
|
|
|
* HAVE_SEND is defined if you have a function named send()
|
|
|
|
* which is used to write outgoing data on a connected socket.
|
|
|
|
* If yours has another name then don't define HAVE_SEND.
|
|
|
|
*
|
|
|
|
* If HAVE_SEND is defined then SEND_TYPE_ARG1, SEND_QUAL_ARG2,
|
|
|
|
* SEND_TYPE_ARG2, SEND_TYPE_ARG3, SEND_TYPE_ARG4 and
|
|
|
|
* SEND_TYPE_RETV must also be defined.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define sread(x,y,z) (ssize_t)recv((RECV_TYPE_ARG1)(x), \
|
|
|
|
(RECV_TYPE_ARG2)(y), \
|
|
|
|
(RECV_TYPE_ARG3)(z), \
|
2006-12-17 06:28:08 +08:00
|
|
|
(RECV_TYPE_ARG4)(0))
|
2006-07-28 22:19:02 +08:00
|
|
|
#else /* HAVE_RECV */
|
2006-08-01 01:12:24 +08:00
|
|
|
#ifndef sread
|
|
|
|
/* */
|
|
|
|
Error Missing_definition_of_macro_sread
|
|
|
|
/* */
|
|
|
|
#endif
|
2006-07-28 22:19:02 +08:00
|
|
|
#endif /* HAVE_RECV */
|
|
|
|
|
2007-09-06 06:01:57 +08:00
|
|
|
|
|
|
|
#if defined(__minix)
|
|
|
|
/* Minix doesn't support send on TCP sockets */
|
|
|
|
#define swrite(x,y,z) (ssize_t)write((SEND_TYPE_ARG1)(x), \
|
|
|
|
(SEND_TYPE_ARG2)(y), \
|
|
|
|
(SEND_TYPE_ARG3)(z))
|
|
|
|
|
|
|
|
#elif defined(HAVE_SEND)
|
2006-07-28 22:19:02 +08:00
|
|
|
#define swrite(x,y,z) (ssize_t)send((SEND_TYPE_ARG1)(x), \
|
2017-05-04 14:50:35 +08:00
|
|
|
(SEND_QUAL_ARG2 SEND_TYPE_ARG2)(y), \
|
2006-07-28 22:19:02 +08:00
|
|
|
(SEND_TYPE_ARG3)(z), \
|
|
|
|
(SEND_TYPE_ARG4)(SEND_4TH_ARG))
|
|
|
|
#else /* HAVE_SEND */
|
2006-08-01 01:12:24 +08:00
|
|
|
#ifndef swrite
|
|
|
|
/* */
|
|
|
|
Error Missing_definition_of_macro_swrite
|
|
|
|
/* */
|
|
|
|
#endif
|
2006-07-28 22:19:02 +08:00
|
|
|
#endif /* HAVE_SEND */
|
|
|
|
|
|
|
|
|
2009-06-19 08:41:03 +08:00
|
|
|
/*
|
|
|
|
* Function-like macro definition used to close a socket.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#if defined(HAVE_CLOSESOCKET)
|
|
|
|
# define sclose(x) closesocket((x))
|
|
|
|
#elif defined(HAVE_CLOSESOCKET_CAMEL)
|
|
|
|
# define sclose(x) CloseSocket((x))
|
2013-02-15 09:11:57 +08:00
|
|
|
#elif defined(HAVE_CLOSE_S)
|
|
|
|
# define sclose(x) close_s((x))
|
2012-03-18 06:02:21 +08:00
|
|
|
#elif defined(USE_LWIPSOCK)
|
|
|
|
# define sclose(x) lwip_close((x))
|
2009-06-19 08:41:03 +08:00
|
|
|
#else
|
|
|
|
# define sclose(x) close((x))
|
|
|
|
#endif
|
|
|
|
|
2012-03-18 06:02:21 +08:00
|
|
|
/*
|
|
|
|
* Stack-independent version of fcntl() on sockets:
|
|
|
|
*/
|
|
|
|
#if defined(USE_LWIPSOCK)
|
|
|
|
# define sfcntl lwip_fcntl
|
|
|
|
#else
|
|
|
|
# define sfcntl fcntl
|
|
|
|
#endif
|
|
|
|
|
2012-12-17 09:07:10 +08:00
|
|
|
/*
|
|
|
|
* 'bool' stuff compatible with HP-UX headers.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#if defined(__hpux) && !defined(HAVE_BOOL_T)
|
|
|
|
typedef int bool;
|
|
|
|
# define false 0
|
|
|
|
# define true 1
|
|
|
|
# define HAVE_BOOL_T
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2007-02-22 10:51:54 +08:00
|
|
|
/*
|
2010-05-27 22:58:15 +08:00
|
|
|
* 'bool' exists on platforms with <stdbool.h>, i.e. C99 platforms.
|
|
|
|
* On non-C99 platforms there's no bool, so define an enum for that.
|
|
|
|
* On C99 platforms 'false' and 'true' also exist. Enum uses a
|
|
|
|
* global namespace though, so use bool_false and bool_true.
|
2007-02-22 10:51:54 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef HAVE_BOOL_T
|
2010-05-27 22:58:15 +08:00
|
|
|
typedef enum {
|
|
|
|
bool_false = 0,
|
|
|
|
bool_true = 1
|
|
|
|
} bool;
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Use a define to let 'true' and 'false' use those enums. There
|
|
|
|
* are currently no use of true and false in libcurl proper, but
|
|
|
|
* there are some in the examples. This will cater for any later
|
|
|
|
* code happening to use true and false.
|
|
|
|
*/
|
|
|
|
# define false bool_false
|
|
|
|
# define true bool_true
|
|
|
|
# define HAVE_BOOL_T
|
2007-02-22 10:51:54 +08:00
|
|
|
#endif
|
|
|
|
|
2022-06-01 20:30:55 +08:00
|
|
|
/* the type we use for storing a single boolean bit */
|
|
|
|
#ifdef _MSC_VER
|
|
|
|
typedef bool bit;
|
|
|
|
#define BIT(x) bool x
|
|
|
|
#else
|
|
|
|
typedef unsigned int bit;
|
|
|
|
#define BIT(x) bit x:1
|
|
|
|
#endif
|
2007-02-22 10:51:54 +08:00
|
|
|
|
|
|
|
/*
|
2010-05-27 22:58:15 +08:00
|
|
|
* Redefine TRUE and FALSE too, to catch current use. With this
|
|
|
|
* change, 'bool found = 1' will give a warning on MIPSPro, but
|
|
|
|
* 'bool found = TRUE' will not. Change tested on IRIX/MIPSPro,
|
|
|
|
* AIX 5.1/Xlc, Tru64 5.1/cc, w/make test too.
|
2007-02-22 10:51:54 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef TRUE
|
2010-05-27 22:58:15 +08:00
|
|
|
#define TRUE true
|
2007-02-22 10:51:54 +08:00
|
|
|
#endif
|
|
|
|
#ifndef FALSE
|
2010-05-27 22:58:15 +08:00
|
|
|
#define FALSE false
|
2007-02-22 10:51:54 +08:00
|
|
|
#endif
|
|
|
|
|
2018-01-29 07:58:59 +08:00
|
|
|
#include "curl_ctype.h"
|
2007-02-22 10:51:54 +08:00
|
|
|
|
2007-04-11 19:02:13 +08:00
|
|
|
|
2007-02-02 23:31:32 +08:00
|
|
|
/*
|
|
|
|
* Macro used to include code only in debug builds.
|
|
|
|
*/
|
|
|
|
|
2009-06-10 10:49:42 +08:00
|
|
|
#ifdef DEBUGBUILD
|
2007-02-22 03:03:20 +08:00
|
|
|
#define DEBUGF(x) x
|
2007-02-02 23:31:32 +08:00
|
|
|
#else
|
2019-11-30 16:29:36 +08:00
|
|
|
#define DEBUGF(x) do { } while(0)
|
2007-02-22 03:03:20 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Macro used to include assertion code only in debug builds.
|
|
|
|
*/
|
|
|
|
|
2019-12-24 21:28:32 +08:00
|
|
|
#undef DEBUGASSERT
|
2022-11-28 05:03:39 +08:00
|
|
|
#if defined(DEBUGBUILD)
|
2007-02-22 03:03:20 +08:00
|
|
|
#define DEBUGASSERT(x) assert(x)
|
|
|
|
#else
|
2019-11-30 16:29:36 +08:00
|
|
|
#define DEBUGASSERT(x) do { } while(0)
|
2007-02-02 23:31:32 +08:00
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2007-02-16 00:23:24 +08:00
|
|
|
/*
|
|
|
|
* Macro SOCKERRNO / SET_SOCKERRNO() returns / sets the *socket-related* errno
|
|
|
|
* (or equivalent) on this platform to hide platform details to code using it.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef USE_WINSOCK
|
|
|
|
#define SOCKERRNO ((int)WSAGetLastError())
|
|
|
|
#define SET_SOCKERRNO(x) (WSASetLastError((int)(x)))
|
|
|
|
#else
|
|
|
|
#define SOCKERRNO (errno)
|
|
|
|
#define SET_SOCKERRNO(x) (errno = (x))
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2007-02-17 21:51:24 +08:00
|
|
|
/*
|
|
|
|
* Portable error number symbolic names defined to Winsock error codes.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef USE_WINSOCK
|
2007-04-04 14:06:36 +08:00
|
|
|
#undef EBADF /* override definition in errno.h */
|
|
|
|
#define EBADF WSAEBADF
|
|
|
|
#undef EINTR /* override definition in errno.h */
|
|
|
|
#define EINTR WSAEINTR
|
|
|
|
#undef EINVAL /* override definition in errno.h */
|
|
|
|
#define EINVAL WSAEINVAL
|
2010-05-21 04:40:48 +08:00
|
|
|
#undef EWOULDBLOCK /* override definition in errno.h */
|
2007-02-17 21:51:24 +08:00
|
|
|
#define EWOULDBLOCK WSAEWOULDBLOCK
|
2010-05-21 04:40:48 +08:00
|
|
|
#undef EINPROGRESS /* override definition in errno.h */
|
2007-02-17 21:51:24 +08:00
|
|
|
#define EINPROGRESS WSAEINPROGRESS
|
2010-05-21 04:40:48 +08:00
|
|
|
#undef EALREADY /* override definition in errno.h */
|
2007-02-17 21:51:24 +08:00
|
|
|
#define EALREADY WSAEALREADY
|
2010-05-21 04:40:48 +08:00
|
|
|
#undef ENOTSOCK /* override definition in errno.h */
|
2007-02-17 21:51:24 +08:00
|
|
|
#define ENOTSOCK WSAENOTSOCK
|
2010-05-21 04:40:48 +08:00
|
|
|
#undef EDESTADDRREQ /* override definition in errno.h */
|
2007-02-17 21:51:24 +08:00
|
|
|
#define EDESTADDRREQ WSAEDESTADDRREQ
|
2010-05-21 04:40:48 +08:00
|
|
|
#undef EMSGSIZE /* override definition in errno.h */
|
2007-02-17 21:51:24 +08:00
|
|
|
#define EMSGSIZE WSAEMSGSIZE
|
2010-05-21 04:40:48 +08:00
|
|
|
#undef EPROTOTYPE /* override definition in errno.h */
|
2007-02-17 21:51:24 +08:00
|
|
|
#define EPROTOTYPE WSAEPROTOTYPE
|
2010-05-21 04:40:48 +08:00
|
|
|
#undef ENOPROTOOPT /* override definition in errno.h */
|
2007-02-17 21:51:24 +08:00
|
|
|
#define ENOPROTOOPT WSAENOPROTOOPT
|
2010-05-21 04:40:48 +08:00
|
|
|
#undef EPROTONOSUPPORT /* override definition in errno.h */
|
2007-02-17 21:51:24 +08:00
|
|
|
#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
|
|
|
|
#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
|
2010-05-21 04:40:48 +08:00
|
|
|
#undef EOPNOTSUPP /* override definition in errno.h */
|
2007-02-17 21:51:24 +08:00
|
|
|
#define EOPNOTSUPP WSAEOPNOTSUPP
|
|
|
|
#define EPFNOSUPPORT WSAEPFNOSUPPORT
|
2010-05-21 04:40:48 +08:00
|
|
|
#undef EAFNOSUPPORT /* override definition in errno.h */
|
2007-02-17 21:51:24 +08:00
|
|
|
#define EAFNOSUPPORT WSAEAFNOSUPPORT
|
2010-05-21 04:40:48 +08:00
|
|
|
#undef EADDRINUSE /* override definition in errno.h */
|
2007-02-17 21:51:24 +08:00
|
|
|
#define EADDRINUSE WSAEADDRINUSE
|
2010-05-21 04:40:48 +08:00
|
|
|
#undef EADDRNOTAVAIL /* override definition in errno.h */
|
2007-02-17 21:51:24 +08:00
|
|
|
#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
|
2010-05-21 04:40:48 +08:00
|
|
|
#undef ENETDOWN /* override definition in errno.h */
|
2007-02-17 21:51:24 +08:00
|
|
|
#define ENETDOWN WSAENETDOWN
|
2010-05-21 04:40:48 +08:00
|
|
|
#undef ENETUNREACH /* override definition in errno.h */
|
2007-02-17 21:51:24 +08:00
|
|
|
#define ENETUNREACH WSAENETUNREACH
|
2010-05-21 04:40:48 +08:00
|
|
|
#undef ENETRESET /* override definition in errno.h */
|
2007-02-17 21:51:24 +08:00
|
|
|
#define ENETRESET WSAENETRESET
|
2010-05-21 04:40:48 +08:00
|
|
|
#undef ECONNABORTED /* override definition in errno.h */
|
2007-02-17 21:51:24 +08:00
|
|
|
#define ECONNABORTED WSAECONNABORTED
|
2010-05-21 04:40:48 +08:00
|
|
|
#undef ECONNRESET /* override definition in errno.h */
|
2007-02-17 21:51:24 +08:00
|
|
|
#define ECONNRESET WSAECONNRESET
|
2010-05-21 04:40:48 +08:00
|
|
|
#undef ENOBUFS /* override definition in errno.h */
|
2007-02-17 21:51:24 +08:00
|
|
|
#define ENOBUFS WSAENOBUFS
|
2010-05-21 04:40:48 +08:00
|
|
|
#undef EISCONN /* override definition in errno.h */
|
2007-02-17 21:51:24 +08:00
|
|
|
#define EISCONN WSAEISCONN
|
2010-05-21 04:40:48 +08:00
|
|
|
#undef ENOTCONN /* override definition in errno.h */
|
2007-02-17 21:51:24 +08:00
|
|
|
#define ENOTCONN WSAENOTCONN
|
|
|
|
#define ESHUTDOWN WSAESHUTDOWN
|
|
|
|
#define ETOOMANYREFS WSAETOOMANYREFS
|
2010-05-21 04:40:48 +08:00
|
|
|
#undef ETIMEDOUT /* override definition in errno.h */
|
2007-02-17 21:51:24 +08:00
|
|
|
#define ETIMEDOUT WSAETIMEDOUT
|
2010-05-21 04:40:48 +08:00
|
|
|
#undef ECONNREFUSED /* override definition in errno.h */
|
2007-02-17 21:51:24 +08:00
|
|
|
#define ECONNREFUSED WSAECONNREFUSED
|
2010-05-21 04:40:48 +08:00
|
|
|
#undef ELOOP /* override definition in errno.h */
|
2007-02-17 21:51:24 +08:00
|
|
|
#define ELOOP WSAELOOP
|
2007-02-18 08:34:37 +08:00
|
|
|
#ifndef ENAMETOOLONG /* possible previous definition in errno.h */
|
2007-02-17 21:51:24 +08:00
|
|
|
#define ENAMETOOLONG WSAENAMETOOLONG
|
2007-02-18 08:34:37 +08:00
|
|
|
#endif
|
2007-02-17 21:51:24 +08:00
|
|
|
#define EHOSTDOWN WSAEHOSTDOWN
|
2010-05-21 04:40:48 +08:00
|
|
|
#undef EHOSTUNREACH /* override definition in errno.h */
|
2007-02-17 21:51:24 +08:00
|
|
|
#define EHOSTUNREACH WSAEHOSTUNREACH
|
2007-02-18 08:34:37 +08:00
|
|
|
#ifndef ENOTEMPTY /* possible previous definition in errno.h */
|
2007-02-17 21:51:24 +08:00
|
|
|
#define ENOTEMPTY WSAENOTEMPTY
|
2007-02-18 08:34:37 +08:00
|
|
|
#endif
|
2007-02-17 21:51:24 +08:00
|
|
|
#define EPROCLIM WSAEPROCLIM
|
|
|
|
#define EUSERS WSAEUSERS
|
|
|
|
#define EDQUOT WSAEDQUOT
|
|
|
|
#define ESTALE WSAESTALE
|
|
|
|
#define EREMOTE WSAEREMOTE
|
|
|
|
#endif
|
|
|
|
|
2007-04-25 11:00:10 +08:00
|
|
|
/*
|
|
|
|
* Macro argv_item_t hides platform details to code using it.
|
|
|
|
*/
|
|
|
|
|
2009-12-31 01:59:56 +08:00
|
|
|
#ifdef __VMS
|
2007-04-25 11:00:10 +08:00
|
|
|
#define argv_item_t __char_ptr32
|
2019-04-13 04:59:40 +08:00
|
|
|
#elif defined(_UNICODE)
|
|
|
|
#define argv_item_t wchar_t *
|
2007-04-25 11:00:10 +08:00
|
|
|
#else
|
|
|
|
#define argv_item_t char *
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
2007-10-18 00:58:32 +08:00
|
|
|
/*
|
|
|
|
* We use this ZERO_NULL to avoid picky compiler warnings,
|
|
|
|
* when assigning a NULL pointer to a function pointer var.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#define ZERO_NULL 0
|
|
|
|
|
2011-08-05 21:42:05 +08:00
|
|
|
|
2012-12-28 19:03:09 +08:00
|
|
|
#endif /* HEADER_CURL_SETUP_ONCE_H */
|