possibilities:
- Modify lib/config-win32.h
- - Modify lib/setup.h
+ - Modify lib/curl_setup.h
- Modify lib/Makefile.vc6
- Add defines to Project/Settings/C/C++/General/Preprocessor Definitions
in the vc6libcurl.dsw/vc6libcurl.dsp Visual C++ 6 IDE project.
# might possibly already be installed in the system.
#
# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
# $(top_srcdir)/include is for libcurl's external include files
AM_CPPFLAGS = -I$(top_builddir)/include/curl \
* CURL_ISOCPP and CURL_OFF_T_C definitions are done here in order to allow
* these to be visible and exported by the external libcurl interface API,
* while also making them visible to the library internals, simply including
- * setup.h, without actually needing to include curl.h internally.
+ * curl_setup.h, without actually needing to include curl.h internally.
* If some day this section would grow big enough, all this should be moved
* to its own header file.
*/
# might possibly already be installed in the system.
#
# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
# $(top_srcdir)/include is for libcurl's external include files
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
-# $(top_srcdir)/lib is for libcurl's lib/setup.h and other "private" files
+# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "private" files
# $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
# $(top_srcdir)/ares is for in-tree c-ares's external include files
curl_fnmatch.h wildcard.h fileinfo.h ftplistparser.h strtok.h \
connect.h llist.h hash.h content_encoding.h share.h curl_md4.h \
curl_md5.h http_digest.h http_negotiate.h inet_pton.h amigaos.h \
- strtoofft.h strerror.h inet_ntop.h curlx.h curl_memory.h setup.h \
+ strtoofft.h strerror.h inet_ntop.h curlx.h curl_memory.h curl_setup.h \
transfer.h select.h easyif.h multiif.h parsedate.h sslgen.h gtls.h \
- tftp.h sockaddr.h splay.h strdup.h setup_once.h socks.h ssh.h nssg.h \
+ tftp.h sockaddr.h splay.h strdup.h socks.h ssh.h nssg.h \
curl_base64.h rawstr.h curl_addrinfo.h curl_sspi.h slist.h nonblock.h \
curl_memrchr.h imap.h pop3.h smtp.h pingpong.h rtsp.h curl_threads.h \
warnless.h curl_hmac.h polarssl.h curl_rtmp.h curl_gethostname.h \
gopher.h axtls.h cyassl.h http_proxy.h non-ascii.h asyn.h curl_ntlm.h \
curl_gssapi.h curl_ntlm_wb.h curl_ntlm_core.h curl_ntlm_msgs.h \
curl_sasl.h curl_schannel.h curl_multibyte.h curl_darwinssl.h \
- hostcheck.h bundles.h conncache.h
+ hostcheck.h bundles.h conncache.h curl_setup_once.h
hostip6.c - ipv6-specific functions
The hostip.h is the single united header file for all this. It defines the
- CURLRES_* defines based on the config*.h and setup.h defines.
+ CURLRES_* defines based on the config*.h and curl_setup.h defines.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#if defined(__AMIGA__) && !defined(__ixemul__)
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#if defined(__AMIGA__) && !defined(__ixemul__)
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_LIMITS_H
#include <limits.h>
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "curl_addrinfo.h"
struct addrinfo;
* but sslgen.c should ever call or use these functions.
*/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_AXTLS
#include <axTLS/ssl.h>
/* Base64 encoding/decoding */
-#include "setup.h"
+#include "curl_setup.h"
#define _MPRINTF_REPLACE /* use our functions only */
#include <curl/mprintf.h>
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include <curl/curl.h>
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include <curl/curl.h>
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h> /* <netinet/tcp.h> may need it */
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "nonblock.h" /* for curlx_nonblock(), formerly Curl_nonblock() */
#include "sockaddr.h"
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_LIBZ
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
/*
* Comma-separated list all supported Content-Encodings ('identity' is implied)
****/
-#include "setup.h"
+#include "curl_setup.h"
#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_COOKIES)
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include <curl/curl.h>
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include <curl/curl.h>
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
* TLS/SSL layer. No code but sslgen.c should ever call or use these functions.
*/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_DARWINSSL
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_DARWINSSL
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "curl_fnmatch.h"
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "curl_gethostname.h"
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_GSSAPI
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "urldata.h"
#ifdef HAVE_GSSAPI
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
/* NSS crypto library does not provide the MD4 hash algorithm, so that we have
* a local implementation of it */
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "curl_memrchr.h"
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_MEMRCHR
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#if defined(USE_WIN32_IDN) || (defined(USE_WINDOWS_SSPI) && defined(UNICODE))
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#if defined(USE_WIN32_IDN) || (defined(USE_WINDOWS_SSPI) && defined(UNICODE))
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_NTLM
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_NTLM
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#if defined(USE_NTLM) && !defined(USE_WINDOWS_SSPI)
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#if defined(USE_NTLM) && !defined(USE_WINDOWS_SSPI)
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_NTLM
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_NTLM
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#if defined(USE_NTLM) && defined(NTLM_WB_ENABLED)
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#if defined(USE_NTLM) && defined(NTLM_WB_ENABLED)
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include <curl/curl.h>
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_LIBRTMP
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include <curl/curl.h>
#include "urldata.h"
* http://msdn.microsoft.com/en-us/library/windows/desktop/aa380161.aspx
*/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_SCHANNEL
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_SCHANNEL
--- /dev/null
+#ifndef HEADER_CURL_SETUP_H
+#define HEADER_CURL_SETUP_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at http://curl.haxx.se/docs/copyright.html.
+ *
+ * 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.
+ *
+ ***************************************************************************/
+
+/*
+ * Define WIN32 when build target is Win32 API
+ */
+
+#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) && \
+ !defined(__SYMBIAN32__)
+#define WIN32
+#endif
+
+/*
+ * Include configuration script results or hand-crafted
+ * configuration file for platforms which lack config tool.
+ */
+
+#ifdef HAVE_CONFIG_H
+
+#include "curl_config.h"
+
+#else /* HAVE_CONFIG_H */
+
+#ifdef _WIN32_WCE
+# include "config-win32ce.h"
+#else
+# ifdef WIN32
+# include "config-win32.h"
+# endif
+#endif
+
+#if defined(macintosh) && defined(__MRC__)
+# include "config-mac.h"
+#endif
+
+#ifdef __riscos__
+# include "config-riscos.h"
+#endif
+
+#ifdef __AMIGA__
+# include "config-amigaos.h"
+#endif
+
+#ifdef __SYMBIAN32__
+# include "config-symbian.h"
+#endif
+
+#ifdef __OS400__
+# include "config-os400.h"
+#endif
+
+#ifdef TPF
+# include "config-tpf.h"
+#endif
+
+#ifdef __VXWORKS__
+# include "config-vxworks.h"
+#endif
+
+#endif /* HAVE_CONFIG_H */
+
+/* ================================================================ */
+/* Definition of preprocessor macros/symbols which modify compiler */
+/* behavior or generated code characteristics must be done here, */
+/* as appropriate, before any system header file is included. It is */
+/* also possible to have them defined in the config file included */
+/* before this point. As a result of all this we frown inclusion of */
+/* system header files in our config files, avoid this at any cost. */
+/* ================================================================ */
+
+/*
+ * AIX 4.3 and newer needs _THREAD_SAFE defined to build
+ * proper reentrant code. Others may also need it.
+ */
+
+#ifdef NEED_THREAD_SAFE
+# ifndef _THREAD_SAFE
+# define _THREAD_SAFE
+# endif
+#endif
+
+/*
+ * Tru64 needs _REENTRANT set for a few function prototypes and
+ * things to appear in the system header files. Unixware needs it
+ * to build proper reentrant code. Others may also need it.
+ */
+
+#ifdef NEED_REENTRANT
+# ifndef _REENTRANT
+# define _REENTRANT
+# endif
+#endif
+
+/* ================================================================ */
+/* If you need to include a system header file for your platform, */
+/* please, do it beyond the point further indicated in this file. */
+/* ================================================================ */
+
+/*
+ * libcurl's external interface definitions are also used internally,
+ * and might also include required system header files to define them.
+ */
+
+#include <curl/curlbuild.h>
+
+/*
+ * Compile time sanity checks must also be done when building the library.
+ */
+
+#include <curl/curlrules.h>
+
+/*
+ * Ensure that no one is using the old SIZEOF_CURL_OFF_T macro
+ */
+
+#ifdef SIZEOF_CURL_OFF_T
+# error "SIZEOF_CURL_OFF_T shall not be defined!"
+ Error Compilation_aborted_SIZEOF_CURL_OFF_T_shall_not_be_defined
+#endif
+
+/*
+ * Set up internal curl_off_t formatting string directives for
+ * exclusive use with libcurl's internal *printf functions.
+ */
+
+#ifdef FORMAT_OFF_T
+# error "FORMAT_OFF_T shall not be defined before this point!"
+ Error Compilation_aborted_FORMAT_OFF_T_already_defined
+#endif
+
+#ifdef FORMAT_OFF_TU
+# error "FORMAT_OFF_TU shall not be defined before this point!"
+ Error Compilation_aborted_FORMAT_OFF_TU_already_defined
+#endif
+
+#if (CURL_SIZEOF_CURL_OFF_T > CURL_SIZEOF_LONG)
+# define FORMAT_OFF_T "lld"
+# define FORMAT_OFF_TU "llu"
+#else
+# define FORMAT_OFF_T "ld"
+# define FORMAT_OFF_TU "lu"
+#endif
+
+/*
+ * Disable other protocols when http is the only one desired.
+ */
+
+#ifdef HTTP_ONLY
+# ifndef CURL_DISABLE_TFTP
+# define CURL_DISABLE_TFTP
+# endif
+# ifndef CURL_DISABLE_FTP
+# define CURL_DISABLE_FTP
+# endif
+# ifndef CURL_DISABLE_LDAP
+# define CURL_DISABLE_LDAP
+# endif
+# ifndef CURL_DISABLE_TELNET
+# define CURL_DISABLE_TELNET
+# endif
+# ifndef CURL_DISABLE_DICT
+# define CURL_DISABLE_DICT
+# endif
+# ifndef CURL_DISABLE_FILE
+# define CURL_DISABLE_FILE
+# endif
+# ifndef CURL_DISABLE_RTSP
+# define CURL_DISABLE_RTSP
+# endif
+# ifndef CURL_DISABLE_POP3
+# define CURL_DISABLE_POP3
+# endif
+# ifndef CURL_DISABLE_IMAP
+# define CURL_DISABLE_IMAP
+# endif
+# ifndef CURL_DISABLE_SMTP
+# define CURL_DISABLE_SMTP
+# endif
+# ifndef CURL_DISABLE_RTSP
+# define CURL_DISABLE_RTSP
+# endif
+# ifndef CURL_DISABLE_RTMP
+# define CURL_DISABLE_RTMP
+# endif
+# ifndef CURL_DISABLE_GOPHER
+# define CURL_DISABLE_GOPHER
+# endif
+#endif
+
+/*
+ * When http is disabled rtsp is not supported.
+ */
+
+#if defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_RTSP)
+# define CURL_DISABLE_RTSP
+#endif
+
+/* ================================================================ */
+/* No system header file shall be included in this file before this */
+/* point. The only allowed ones are those included from curlbuild.h */
+/* ================================================================ */
+
+/*
+ * OS/400 setup file includes some system headers.
+ */
+
+#ifdef __OS400__
+# include "setup-os400.h"
+#endif
+
+/*
+ * Include header files for windows builds before redefining anything.
+ * Use this preprocessor block only to include or exclude windows.h,
+ * winsock2.h, ws2tcpip.h or winsock.h. Any other windows thing belongs
+ * to any other further and independent block. Under Cygwin things work
+ * just as under linux (e.g. <sys/socket.h>) and the winsock headers should
+ * never be included when __CYGWIN__ is defined. configure script takes
+ * care of this, not defining HAVE_WINDOWS_H, HAVE_WINSOCK_H, HAVE_WINSOCK2_H,
+ * neither HAVE_WS2TCPIP_H when __CYGWIN__ is defined.
+ */
+
+#ifdef HAVE_WINDOWS_H
+# if defined(UNICODE) && !defined(_UNICODE)
+# define _UNICODE
+# endif
+# if defined(_UNICODE) && !defined(UNICODE)
+# define UNICODE
+# endif
+# ifndef WIN32_LEAN_AND_MEAN
+# define WIN32_LEAN_AND_MEAN
+# endif
+# include <windows.h>
+# ifdef HAVE_WINSOCK2_H
+# include <winsock2.h>
+# ifdef HAVE_WS2TCPIP_H
+# include <ws2tcpip.h>
+# endif
+# else
+# ifdef HAVE_WINSOCK_H
+# include <winsock.h>
+# endif
+# endif
+# include <tchar.h>
+#endif
+
+/*
+ * Define USE_WINSOCK to 2 if we have and use WINSOCK2 API, else
+ * define USE_WINSOCK to 1 if we have and use WINSOCK API, else
+ * undefine USE_WINSOCK.
+ */
+
+#undef USE_WINSOCK
+
+#ifdef HAVE_WINSOCK2_H
+# define USE_WINSOCK 2
+#else
+# ifdef HAVE_WINSOCK_H
+# define USE_WINSOCK 1
+# endif
+#endif
+
+#ifdef USE_LWIPSOCK
+# include <lwip/init.h>
+# include <lwip/sockets.h>
+# include <lwip/netdb.h>
+#endif
+
+#ifdef HAVE_EXTRA_STRICMP_H
+# include <extra/stricmp.h>
+#endif
+
+#ifdef HAVE_EXTRA_STRDUP_H
+# include <extra/strdup.h>
+#endif
+
+#ifdef TPF
+# include <strings.h> /* for bzero, strcasecmp, and strncasecmp */
+# include <string.h> /* for strcpy and strlen */
+# include <stdlib.h> /* for rand and srand */
+# include <sys/socket.h> /* for select and ioctl*/
+# include <netdb.h> /* for in_addr_t definition */
+# include <tpf/sysapi.h> /* for tpf_process_signals */
+ /* change which select is used for libcurl */
+# define select(a,b,c,d,e) tpf_select_libcurl(a,b,c,d,e)
+#endif
+
+#ifdef __VXWORKS__
+# include <sockLib.h> /* for generic BSD socket functions */
+# include <ioLib.h> /* for basic I/O interface functions */
+#endif
+
+#ifdef __AMIGA__
+# ifndef __ixemul__
+# include <exec/types.h>
+# include <exec/execbase.h>
+# include <proto/exec.h>
+# include <proto/dos.h>
+# define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
+# endif
+#endif
+
+#include <stdio.h>
+#ifdef HAVE_ASSERT_H
+#include <assert.h>
+#endif
+
+#ifdef __TANDEM /* for nsr-tandem-nsk systems */
+#include <floss.h>
+#endif
+
+#ifndef STDC_HEADERS /* no standard C headers! */
+#include <curl/stdcheaders.h>
+#endif
+
+#ifdef __POCC__
+# include <sys/types.h>
+# include <unistd.h>
+# define sys_nerr EILSEQ
+#endif
+
+/*
+ * Salford-C kludge section (mostly borrowed from wxWidgets).
+ */
+#ifdef __SALFORDC__
+ #pragma suppress 353 /* Possible nested comments */
+ #pragma suppress 593 /* Define not used */
+ #pragma suppress 61 /* enum has no name */
+ #pragma suppress 106 /* unnamed, unused parameter */
+ #include <clib.h>
+#endif
+
+/*
+ * Large file (>2Gb) support using WIN32 functions.
+ */
+
+#ifdef USE_WIN32_LARGE_FILES
+# include <io.h>
+# include <sys/types.h>
+# include <sys/stat.h>
+# undef lseek
+# define lseek(fdes,offset,whence) _lseeki64(fdes, offset, whence)
+# define fstat(fdes,stp) _fstati64(fdes, stp)
+# define stat(fname,stp) _stati64(fname, stp)
+# define struct_stat struct _stati64
+# define LSEEK_ERROR (__int64)-1
+#endif
+
+/*
+ * Small file (<2Gb) support using WIN32 functions.
+ */
+
+#ifdef USE_WIN32_SMALL_FILES
+# include <io.h>
+# include <sys/types.h>
+# include <sys/stat.h>
+# ifndef _WIN32_WCE
+# undef lseek
+# define lseek(fdes,offset,whence) _lseek(fdes, (long)offset, whence)
+# define fstat(fdes,stp) _fstat(fdes, stp)
+# define stat(fname,stp) _stat(fname, stp)
+# define struct_stat struct _stat
+# endif
+# define LSEEK_ERROR (long)-1
+#endif
+
+#ifndef struct_stat
+# define struct_stat struct stat
+#endif
+
+#ifndef LSEEK_ERROR
+# define LSEEK_ERROR (off_t)-1
+#endif
+
+/*
+ * Default sizeof(off_t) in case it hasn't been defined in config file.
+ */
+
+#ifndef SIZEOF_OFF_T
+# if defined(__VMS) && !defined(__VAX)
+# if defined(_LARGEFILE)
+# define SIZEOF_OFF_T 8
+# endif
+# elif defined(__OS400__) && defined(__ILEC400__)
+# if defined(_LARGE_FILES)
+# define SIZEOF_OFF_T 8
+# endif
+# elif defined(__MVS__) && defined(__IBMC__)
+# if defined(_LP64) || defined(_LARGE_FILES)
+# define SIZEOF_OFF_T 8
+# endif
+# elif defined(__370__) && defined(__IBMC__)
+# if defined(_LP64) || defined(_LARGE_FILES)
+# define SIZEOF_OFF_T 8
+# endif
+# endif
+# ifndef SIZEOF_OFF_T
+# define SIZEOF_OFF_T 4
+# endif
+#endif
+
+/*
+ * Arg 2 type for gethostname in case it hasn't been defined in config file.
+ */
+
+#ifndef GETHOSTNAME_TYPE_ARG2
+# ifdef USE_WINSOCK
+# define GETHOSTNAME_TYPE_ARG2 int
+# else
+# define GETHOSTNAME_TYPE_ARG2 size_t
+# endif
+#endif
+
+/* Below we define some functions. They should
+
+ 4. set the SIGALRM signal timeout
+ 5. set dir/file naming defines
+ */
+
+#ifdef WIN32
+
+# define DIR_CHAR "\\"
+# define DOT_CHAR "_"
+
+#else /* WIN32 */
+
+# ifdef MSDOS /* Watt-32 */
+
+# include <sys/ioctl.h>
+# define select(n,r,w,x,t) select_s(n,r,w,x,t)
+# define ioctl(x,y,z) ioctlsocket(x,y,(char *)(z))
+# include <tcp.h>
+# ifdef word
+# undef word
+# endif
+# ifdef byte
+# undef byte
+# endif
+
+# endif /* MSDOS */
+
+# ifdef __minix
+ /* Minix 3 versions up to at least 3.1.3 are missing these prototypes */
+ extern char * strtok_r(char *s, const char *delim, char **last);
+ extern struct tm * gmtime_r(const time_t * const timep, struct tm *tmp);
+# endif
+
+# define DIR_CHAR "/"
+# ifndef DOT_CHAR
+# define DOT_CHAR "."
+# endif
+
+# ifdef MSDOS
+# undef DOT_CHAR
+# define DOT_CHAR "_"
+# endif
+
+# ifndef fileno /* sunos 4 have this as a macro! */
+ int fileno( FILE *stream);
+# endif
+
+#endif /* WIN32 */
+
+/*
+ * msvc 6.0 requires PSDK in order to have INET6_ADDRSTRLEN
+ * defined in ws2tcpip.h as well as to provide IPv6 support.
+ */
+
+#if defined(_MSC_VER) && !defined(__POCC__)
+# if !defined(HAVE_WS2TCPIP_H) || \
+ ((_MSC_VER < 1300) && !defined(INET6_ADDRSTRLEN))
+# undef HAVE_GETADDRINFO_THREADSAFE
+# undef HAVE_FREEADDRINFO
+# undef HAVE_GETADDRINFO
+# undef HAVE_GETNAMEINFO
+# undef ENABLE_IPV6
+# endif
+#endif
+
+/* ---------------------------------------------------------------- */
+/* resolver specialty compile-time defines */
+/* CURLRES_* defines to use in the host*.c sources */
+/* ---------------------------------------------------------------- */
+
+/*
+ * lcc-win32 doesn't have _beginthreadex(), lacks threads support.
+ */
+
+#if defined(__LCC__) && defined(WIN32)
+# undef USE_THREADS_POSIX
+# undef USE_THREADS_WIN32
+#endif
+
+/*
+ * MSVC threads support requires a multi-threaded runtime library.
+ * _beginthreadex() is not available in single-threaded ones.
+ */
+
+#if defined(_MSC_VER) && !defined(__POCC__) && !defined(_MT)
+# undef USE_THREADS_POSIX
+# undef USE_THREADS_WIN32
+#endif
+
+/*
+ * Mutually exclusive CURLRES_* definitions.
+ */
+
+#ifdef USE_ARES
+# define CURLRES_ASYNCH
+# define CURLRES_ARES
+/* now undef the stock libc functions just to avoid them being used */
+# undef HAVE_GETADDRINFO
+# undef HAVE_GETHOSTBYNAME
+#elif defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32)
+# define CURLRES_ASYNCH
+# define CURLRES_THREADED
+#else
+# define CURLRES_SYNCH
+#endif
+
+#ifdef ENABLE_IPV6
+# define CURLRES_IPV6
+#else
+# define CURLRES_IPV4
+#endif
+
+/* ---------------------------------------------------------------- */
+
+/*
+ * When using WINSOCK, TELNET protocol requires WINSOCK2 API.
+ */
+
+#if defined(USE_WINSOCK) && (USE_WINSOCK != 2)
+# define CURL_DISABLE_TELNET 1
+#endif
+
+/*
+ * msvc 6.0 does not have struct sockaddr_storage and
+ * does not define IPPROTO_ESP in winsock2.h. But both
+ * are available if PSDK is properly installed.
+ */
+
+#if defined(_MSC_VER) && !defined(__POCC__)
+# if !defined(HAVE_WINSOCK2_H) || ((_MSC_VER < 1300) && !defined(IPPROTO_ESP))
+# undef HAVE_STRUCT_SOCKADDR_STORAGE
+# endif
+#endif
+
+/*
+ * Intentionally fail to build when using msvc 6.0 without PSDK installed.
+ * The brave of heart can circumvent this, defining ALLOW_MSVC6_WITHOUT_PSDK
+ * in lib/config-win32.h although absolutely discouraged and unsupported.
+ */
+
+#if defined(_MSC_VER) && !defined(__POCC__)
+# if !defined(HAVE_WINDOWS_H) || ((_MSC_VER < 1300) && !defined(_FILETIME_))
+# if !defined(ALLOW_MSVC6_WITHOUT_PSDK)
+# error MSVC 6.0 requires "February 2003 Platform SDK" a.k.a. \
+ "Windows Server 2003 PSDK"
+# else
+# define CURL_DISABLE_LDAP 1
+# endif
+# endif
+#endif
+
+#ifdef NETWARE
+int netware_init(void);
+#ifndef __NOVELL_LIBC__
+#include <sys/bsdskt.h>
+#include <sys/timeval.h>
+#endif
+#endif
+
+#if defined(HAVE_LIBIDN) && defined(HAVE_TLD_H)
+/* The lib was present and the tld.h header (which is missing in libidn 0.3.X
+ but we only work with libidn 0.4.1 or later) */
+#define USE_LIBIDN
+#endif
+
+#ifndef SIZEOF_TIME_T
+/* assume default size of time_t to be 32 bit */
+#define SIZEOF_TIME_T 4
+#endif
+
+#define LIBIDN_REQUIRED_VERSION "0.4.1"
+
+#if defined(USE_GNUTLS) || defined(USE_SSLEAY) || defined(USE_NSS) || \
+ defined(USE_QSOSSL) || defined(USE_POLARSSL) || defined(USE_AXTLS) || \
+ defined(USE_CYASSL) || defined(USE_SCHANNEL) || \
+ defined(USE_DARWINSSL)
+#define USE_SSL /* SSL support has been enabled */
+#endif
+
+#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
+#define USE_HTTP_NEGOTIATE
+#endif
+
+/* Single point where USE_NTLM definition might be done */
+#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_NTLM)
+#if defined(USE_SSLEAY) || defined(USE_WINDOWS_SSPI) || \
+ defined(USE_GNUTLS) || defined(USE_NSS) || defined(USE_DARWINSSL)
+#define USE_NTLM
+#endif
+#endif
+
+/* non-configure builds may define CURL_WANTS_CA_BUNDLE_ENV */
+#if defined(CURL_WANTS_CA_BUNDLE_ENV) && !defined(CURL_CA_BUNDLE)
+#define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE")
+#endif
+
+/*
+ * Provide a mechanism to silence picky compilers, such as gcc 4.6+.
+ * Parameters should of course normally not be unused, but for example when
+ * we have multiple implementations of the same interface it may happen.
+ */
+
+#if defined(__GNUC__) && ((__GNUC__ >= 3) || \
+ ((__GNUC__ == 2) && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ >= 7)))
+# define UNUSED_PARAM __attribute__((__unused__))
+#else
+# define UNUSED_PARAM /*NOTHING*/
+#endif
+
+/*
+ * Include macros and defines that should only be processed once.
+ */
+
+#include "curl_setup_once.h"
+
+/*
+ * Definition of our NOP statement Object-like macro
+ */
+
+#ifndef Curl_nop_stmt
+# define Curl_nop_stmt do { } WHILE_FALSE
+#endif
+
+/*
+ * Ensure that Winsock and lwIP TCP/IP stacks are not mixed.
+ */
+
+#if defined(__LWIP_OPT_H__)
+# if defined(SOCKET) || \
+ defined(USE_WINSOCK) || \
+ defined(HAVE_WINSOCK_H) || \
+ defined(HAVE_WINSOCK2_H) || \
+ defined(HAVE_WS2TCPIP_H)
+# error "Winsock and lwIP TCP/IP stack definitions shall not coexist!"
+# endif
+#endif
+
+/*
+ * Portable symbolic names for Winsock shutdown() mode flags.
+ */
+
+#ifdef USE_WINSOCK
+# define SHUT_RD 0x00
+# define SHUT_WR 0x01
+# define SHUT_RDWR 0x02
+#endif
+
+/* Define S_ISREG if not defined by system headers, f.e. MSVC */
+#if !defined(S_ISREG) && defined(S_IFMT) && defined(S_IFREG)
+#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
+#endif
+
+#endif /* HEADER_CURL_SETUP_H */
--- /dev/null
+#ifndef HEADER_CURL_SETUP_ONCE_H
+#define HEADER_CURL_SETUP_ONCE_H
+/***************************************************************************
+ * _ _ ____ _
+ * Project ___| | | | _ \| |
+ * / __| | | | |_) | |
+ * | (__| |_| | _ <| |___
+ * \___|\___/|_| \_\_____|
+ *
+ * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
+ *
+ * This software is licensed as described in the file COPYING, which
+ * you should have received as part of this distribution. The terms
+ * are also available at http://curl.haxx.se/docs/copyright.html.
+ *
+ * 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.
+ *
+ ***************************************************************************/
+
+
+/*
+ * Inclusion of common header files.
+ */
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <stdarg.h>
+#include <ctype.h>
+
+#ifdef HAVE_ERRNO_H
+#include <errno.h>
+#endif
+
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#ifdef NEED_MALLOC_H
+#include <malloc.h>
+#endif
+
+#ifdef NEED_MEMORY_H
+#include <memory.h>
+#endif
+
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#endif
+
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#ifdef TIME_WITH_SYS_TIME
+#include <time.h>
+#endif
+#else
+#ifdef HAVE_TIME_H
+#include <time.h>
+#endif
+#endif
+
+#ifdef WIN32
+#include <io.h>
+#include <fcntl.h>
+#endif
+
+#if defined(HAVE_STDBOOL_H) && defined(HAVE_BOOL_T)
+#include <stdbool.h>
+#endif
+
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
+#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
+
+#ifdef HAVE_SYS_SOCKET_H
+#include <sys/socket.h>
+#endif
+
+#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
+
+
+/*
+ * Definition of timeval struct for platforms that don't have it.
+ */
+
+#ifndef HAVE_STRUCT_TIMEVAL
+struct timeval {
+ long tv_sec;
+ long tv_usec;
+};
+#endif
+
+
+/*
+ * If we have the MSG_NOSIGNAL define, make sure we use
+ * it as the fourth argument of function send()
+ */
+
+#ifdef HAVE_MSG_NOSIGNAL
+#define SEND_4TH_ARG MSG_NOSIGNAL
+#else
+#define SEND_4TH_ARG 0
+#endif
+
+
+#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)
+/*
+ * 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.
+ */
+
+#if !defined(RECV_TYPE_ARG1) || \
+ !defined(RECV_TYPE_ARG2) || \
+ !defined(RECV_TYPE_ARG3) || \
+ !defined(RECV_TYPE_ARG4) || \
+ !defined(RECV_TYPE_RETV)
+ /* */
+ Error Missing_definition_of_return_and_arguments_types_of_recv
+ /* */
+#else
+#define sread(x,y,z) (ssize_t)recv((RECV_TYPE_ARG1)(x), \
+ (RECV_TYPE_ARG2)(y), \
+ (RECV_TYPE_ARG3)(z), \
+ (RECV_TYPE_ARG4)(0))
+#endif
+#else /* HAVE_RECV */
+#ifndef sread
+ /* */
+ Error Missing_definition_of_macro_sread
+ /* */
+#endif
+#endif /* HAVE_RECV */
+
+
+#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)
+#if !defined(SEND_TYPE_ARG1) || \
+ !defined(SEND_QUAL_ARG2) || \
+ !defined(SEND_TYPE_ARG2) || \
+ !defined(SEND_TYPE_ARG3) || \
+ !defined(SEND_TYPE_ARG4) || \
+ !defined(SEND_TYPE_RETV)
+ /* */
+ Error Missing_definition_of_return_and_arguments_types_of_send
+ /* */
+#else
+#define swrite(x,y,z) (ssize_t)send((SEND_TYPE_ARG1)(x), \
+ (SEND_TYPE_ARG2)(y), \
+ (SEND_TYPE_ARG3)(z), \
+ (SEND_TYPE_ARG4)(SEND_4TH_ARG))
+#endif
+#else /* HAVE_SEND */
+#ifndef swrite
+ /* */
+ Error Missing_definition_of_macro_swrite
+ /* */
+#endif
+#endif /* HAVE_SEND */
+
+
+#if 0
+#if defined(HAVE_RECVFROM)
+/*
+ * Currently recvfrom is only used on udp sockets.
+ */
+#if !defined(RECVFROM_TYPE_ARG1) || \
+ !defined(RECVFROM_TYPE_ARG2) || \
+ !defined(RECVFROM_TYPE_ARG3) || \
+ !defined(RECVFROM_TYPE_ARG4) || \
+ !defined(RECVFROM_TYPE_ARG5) || \
+ !defined(RECVFROM_TYPE_ARG6) || \
+ !defined(RECVFROM_TYPE_RETV)
+ /* */
+ Error Missing_definition_of_return_and_arguments_types_of_recvfrom
+ /* */
+#else
+#define sreadfrom(s,b,bl,f,fl) (ssize_t)recvfrom((RECVFROM_TYPE_ARG1) (s), \
+ (RECVFROM_TYPE_ARG2 *)(b), \
+ (RECVFROM_TYPE_ARG3) (bl), \
+ (RECVFROM_TYPE_ARG4) (0), \
+ (RECVFROM_TYPE_ARG5 *)(f), \
+ (RECVFROM_TYPE_ARG6 *)(fl))
+#endif
+#else /* HAVE_RECVFROM */
+#ifndef sreadfrom
+ /* */
+ Error Missing_definition_of_macro_sreadfrom
+ /* */
+#endif
+#endif /* HAVE_RECVFROM */
+
+
+#ifdef RECVFROM_TYPE_ARG6_IS_VOID
+# define RECVFROM_ARG6_T int
+#else
+# define RECVFROM_ARG6_T RECVFROM_TYPE_ARG6
+#endif
+#endif /* if 0 */
+
+
+/*
+ * 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))
+#elif defined(USE_LWIPSOCK)
+# define sclose(x) lwip_close((x))
+#else
+# define sclose(x) close((x))
+#endif
+
+/*
+ * Stack-independent version of fcntl() on sockets:
+ */
+#if defined(USE_LWIPSOCK)
+# define sfcntl lwip_fcntl
+#else
+# define sfcntl fcntl
+#endif
+
+/*
+ * Uppercase macro versions of ANSI/ISO is*() functions/macros which
+ * avoid negative number inputs with argument byte codes > 127.
+ */
+
+#define ISSPACE(x) (isspace((int) ((unsigned char)x)))
+#define ISDIGIT(x) (isdigit((int) ((unsigned char)x)))
+#define ISALNUM(x) (isalnum((int) ((unsigned char)x)))
+#define ISXDIGIT(x) (isxdigit((int) ((unsigned char)x)))
+#define ISGRAPH(x) (isgraph((int) ((unsigned char)x)))
+#define ISALPHA(x) (isalpha((int) ((unsigned char)x)))
+#define ISPRINT(x) (isprint((int) ((unsigned char)x)))
+#define ISUPPER(x) (isupper((int) ((unsigned char)x)))
+#define ISLOWER(x) (islower((int) ((unsigned char)x)))
+#define ISASCII(x) (isascii((int) ((unsigned char)x)))
+
+#define ISBLANK(x) (int)((((unsigned char)x) == ' ') || \
+ (((unsigned char)x) == '\t'))
+
+#define TOLOWER(x) (tolower((int) ((unsigned char)x)))
+
+
+/*
+ * '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
+
+
+/*
+ * '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.
+ */
+
+#ifndef HAVE_BOOL_T
+ 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
+#endif
+
+
+/*
+ * 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.
+ */
+
+#ifndef TRUE
+#define TRUE true
+#endif
+#ifndef FALSE
+#define FALSE false
+#endif
+
+
+/*
+ * Macro WHILE_FALSE may be used to build single-iteration do-while loops,
+ * avoiding compiler warnings. Mostly intended for other macro definitions.
+ */
+
+#define WHILE_FALSE while(0)
+
+#if defined(_MSC_VER) && !defined(__POCC__)
+# undef WHILE_FALSE
+# if (_MSC_VER < 1500)
+# define WHILE_FALSE while(1, 0)
+# else
+# define WHILE_FALSE \
+__pragma(warning(push)) \
+__pragma(warning(disable:4127)) \
+while(0) \
+__pragma(warning(pop))
+# endif
+#endif
+
+
+/*
+ * Typedef to 'int' if sig_atomic_t is not an available 'typedefed' type.
+ */
+
+#ifndef HAVE_SIG_ATOMIC_T
+typedef int sig_atomic_t;
+#define HAVE_SIG_ATOMIC_T
+#endif
+
+
+/*
+ * Convenience SIG_ATOMIC_T definition
+ */
+
+#ifdef HAVE_SIG_ATOMIC_T_VOLATILE
+#define SIG_ATOMIC_T static sig_atomic_t
+#else
+#define SIG_ATOMIC_T static volatile sig_atomic_t
+#endif
+
+
+/*
+ * Default return type for signal handlers.
+ */
+
+#ifndef RETSIGTYPE
+#define RETSIGTYPE void
+#endif
+
+
+/*
+ * Macro used to include code only in debug builds.
+ */
+
+#ifdef DEBUGBUILD
+#define DEBUGF(x) x
+#else
+#define DEBUGF(x) do { } WHILE_FALSE
+#endif
+
+
+/*
+ * Macro used to include assertion code only in debug builds.
+ */
+
+#if defined(DEBUGBUILD) && defined(HAVE_ASSERT_H)
+#define DEBUGASSERT(x) assert(x)
+#else
+#define DEBUGASSERT(x) do { } WHILE_FALSE
+#endif
+
+
+/*
+ * 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
+
+
+/*
+ * Macro ERRNO / SET_ERRNO() returns / sets the NOT *socket-related* errno
+ * (or equivalent) on this platform to hide platform details to code using it.
+ */
+
+#ifdef WIN32
+#define ERRNO ((int)GetLastError())
+#define SET_ERRNO(x) (SetLastError((DWORD)(x)))
+#else
+#define ERRNO (errno)
+#define SET_ERRNO(x) (errno = (x))
+#endif
+
+
+/*
+ * Portable error number symbolic names defined to Winsock error codes.
+ */
+
+#ifdef USE_WINSOCK
+#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
+#undef EWOULDBLOCK /* override definition in errno.h */
+#define EWOULDBLOCK WSAEWOULDBLOCK
+#undef EINPROGRESS /* override definition in errno.h */
+#define EINPROGRESS WSAEINPROGRESS
+#undef EALREADY /* override definition in errno.h */
+#define EALREADY WSAEALREADY
+#undef ENOTSOCK /* override definition in errno.h */
+#define ENOTSOCK WSAENOTSOCK
+#undef EDESTADDRREQ /* override definition in errno.h */
+#define EDESTADDRREQ WSAEDESTADDRREQ
+#undef EMSGSIZE /* override definition in errno.h */
+#define EMSGSIZE WSAEMSGSIZE
+#undef EPROTOTYPE /* override definition in errno.h */
+#define EPROTOTYPE WSAEPROTOTYPE
+#undef ENOPROTOOPT /* override definition in errno.h */
+#define ENOPROTOOPT WSAENOPROTOOPT
+#undef EPROTONOSUPPORT /* override definition in errno.h */
+#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
+#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
+#undef EOPNOTSUPP /* override definition in errno.h */
+#define EOPNOTSUPP WSAEOPNOTSUPP
+#define EPFNOSUPPORT WSAEPFNOSUPPORT
+#undef EAFNOSUPPORT /* override definition in errno.h */
+#define EAFNOSUPPORT WSAEAFNOSUPPORT
+#undef EADDRINUSE /* override definition in errno.h */
+#define EADDRINUSE WSAEADDRINUSE
+#undef EADDRNOTAVAIL /* override definition in errno.h */
+#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
+#undef ENETDOWN /* override definition in errno.h */
+#define ENETDOWN WSAENETDOWN
+#undef ENETUNREACH /* override definition in errno.h */
+#define ENETUNREACH WSAENETUNREACH
+#undef ENETRESET /* override definition in errno.h */
+#define ENETRESET WSAENETRESET
+#undef ECONNABORTED /* override definition in errno.h */
+#define ECONNABORTED WSAECONNABORTED
+#undef ECONNRESET /* override definition in errno.h */
+#define ECONNRESET WSAECONNRESET
+#undef ENOBUFS /* override definition in errno.h */
+#define ENOBUFS WSAENOBUFS
+#undef EISCONN /* override definition in errno.h */
+#define EISCONN WSAEISCONN
+#undef ENOTCONN /* override definition in errno.h */
+#define ENOTCONN WSAENOTCONN
+#define ESHUTDOWN WSAESHUTDOWN
+#define ETOOMANYREFS WSAETOOMANYREFS
+#undef ETIMEDOUT /* override definition in errno.h */
+#define ETIMEDOUT WSAETIMEDOUT
+#undef ECONNREFUSED /* override definition in errno.h */
+#define ECONNREFUSED WSAECONNREFUSED
+#undef ELOOP /* override definition in errno.h */
+#define ELOOP WSAELOOP
+#ifndef ENAMETOOLONG /* possible previous definition in errno.h */
+#define ENAMETOOLONG WSAENAMETOOLONG
+#endif
+#define EHOSTDOWN WSAEHOSTDOWN
+#undef EHOSTUNREACH /* override definition in errno.h */
+#define EHOSTUNREACH WSAEHOSTUNREACH
+#ifndef ENOTEMPTY /* possible previous definition in errno.h */
+#define ENOTEMPTY WSAENOTEMPTY
+#endif
+#define EPROCLIM WSAEPROCLIM
+#define EUSERS WSAEUSERS
+#define EDQUOT WSAEDQUOT
+#define ESTALE WSAESTALE
+#define EREMOTE WSAEREMOTE
+#endif
+
+
+/*
+ * Actually use __32_getpwuid() on 64-bit VMS builds for getpwuid()
+ */
+
+#if defined(__VMS) && \
+ defined(__INITIAL_POINTER_SIZE) && (__INITIAL_POINTER_SIZE == 64)
+#define getpwuid __32_getpwuid
+#endif
+
+
+/*
+ * Macro argv_item_t hides platform details to code using it.
+ */
+
+#ifdef __VMS
+#define argv_item_t __char_ptr32
+#else
+#define argv_item_t char *
+#endif
+
+
+/*
+ * We use this ZERO_NULL to avoid picky compiler warnings,
+ * when assigning a NULL pointer to a function pointer var.
+ */
+
+#define ZERO_NULL 0
+
+
+#endif /* HEADER_CURL_SETUP_ONCE_H */
+
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_WINDOWS_SSPI
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_WINDOWS_SSPI
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#if defined(USE_THREADS_POSIX)
# ifdef HAVE_PTHREAD_H
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#if defined(USE_THREADS_POSIX)
# define CURL_STDCALL
*
*/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_CYASSL
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_CYASSL
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_DICT
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
/* Escape and unescape URL encoding in strings. The functions return a new
* allocated string or NULL if an error occurred. */
-#include "setup.h"
+#include "curl_setup.h"
#include <curl/curl.h>
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_FILE
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "strdup.h"
#include "fileinfo.h"
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include <curl/curl.h>
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_FTP
* 01-29-97 11:32PM <DIR> prog
*/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_FTP
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_FTP
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef __VMS
#include <unixlib.h>
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include <curl/curl.h>
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_GOPHER
* since they were not present in 1.0.X.
*/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_GNUTLS
/*
* Custom push and pull callback functions used by GNU TLS to read and write
* to the socket. These functions are simple wrappers to send() and recv()
- * (although here using the sread/swrite macros as defined by setup_once.h).
+ * (although here using the sread/swrite macros as defined by
+ * curl_setup_once.h).
* We use custom functions rather than the GNU TLS defaults because it allows
* us to get specific about the fourth "flags" argument, and to use arbitrary
* private data with gnutls_transport_set_ptr if we wish.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_GNUTLS
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "hash.h"
#include "llist.h"
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include <stddef.h>
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_CRYPTO_AUTH
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#if defined(USE_SSLEAY) || defined(USE_AXTLS)
/* these two backends use functions from this file */
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
* asyn-thread.c - functions for threaded name resolves
* The hostip.h is the united header file for all this. It defines the
- * CURLRES_* defines based on the config*.h and setup.h defines.
+ * CURLRES_* defines based on the config*.h and curl_setup.h defines.
*/
/* These two symbols are for the global DNS cache */
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "hash.h"
#include "curl_addrinfo.h"
#include "asyn.h"
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_HTTP
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_HTTP
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_CRYPTO_AUTH)
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
typedef enum {
CURLDIGEST_NONE, /* not a digest */
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_GSSAPI
#ifdef HAVE_OLD_GSSMIT
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_WINDOWS_SSPI
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#if !defined(CURL_DISABLE_PROXY) && !defined(CURL_DISABLE_HTTP)
* IDN conversions using Windows kernel32 and normaliz libraries.
*/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_WIN32_IDN
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_NETINET_IN_H
# include <netinet/in.h>
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
bool Curl_if_is_interface_name(const char *interf);
char *Curl_if2ip(int af, const char *interf, char *buf, int buf_size);
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_IMAP
* Original code by Paul Vixie. "curlified" by Gisle Vanem.
*/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef HAVE_INET_NTOP
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
char *Curl_inet_ntop(int af, const void *addr, char *buf, size_t size);
* SOFTWARE.
*/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef HAVE_INET_PTON
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
int Curl_inet_pton(int, const char *, void *);
*
*/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_FTP
#ifdef HAVE_KRB4
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. */
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_FTP
#ifdef HAVE_GSSAPI
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#if !defined(CURL_DISABLE_LDAP) && !defined(USE_OPENLDAP)
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "llist.h"
#include "curl_memory.h"
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include <stddef.h>
typedef void (*curl_llist_dtor)(void *, void *);
documentation and/or software.
*/
-#include "setup.h"
+#include "curl_setup.h"
/* NSS crypto library does not provide the MD4 hash algorithm, so that we have
* a local implementation of it */
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_CRYPTO_AUTH
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef CURLDEBUG
* as well as the library. Do not mix with library internals!
*/
-#include "setup.h"
+#include "curl_setup.h"
#include <curl/curl.h>
* page at http://daniel.haxx.se/trio/
*/
-#include "setup.h"
+#include "curl_setup.h"
#if defined(DJGPP) && (DJGPP_MINOR < 4)
#undef _MPRINTF_REPLACE /* don't use x_was_used() here */
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include <curl/curl.h>
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_PWD_H
#include <pwd.h>
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef CURL_DOES_CONVERSIONS
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef CURL_DOES_CONVERSIONS
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_SYS_IOCTL_H
#include <sys/ioctl.h>
* but sslgen.c should ever call or use these functions.
*/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_NSS
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_NSS
/*
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef NETWARE /* Novell NetWare */
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef NETWARE /* Novell NetWare */
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#if !defined(CURL_DISABLE_LDAP) && defined(USE_OPENLDAP)
*/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_LIMITS_H
#include <limits.h>
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "urldata.h"
#include "sendf.h"
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#if !defined(CURL_DISABLE_IMAP) || !defined(CURL_DISABLE_FTP) || \
!defined(CURL_DISABLE_POP3) || !defined(CURL_DISABLE_SMTP)
*
*/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_POLARSSL
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_POLARSSL
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_POP3
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "urldata.h"
#include "sendf.h"
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_QSOSSL
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
/*
* This header should only be needed to get included by sslgen.c and qssl.c
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "rawstr.h"
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_RTSP
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. */
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_FTP
#if defined(HAVE_KRB4) || defined(HAVE_GSSAPI)
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_SYS_POLL_H
#include <sys/poll.h>
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include <curl/curl.h>
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
CURLcode Curl_sendf(curl_socket_t sockfd, struct connectdata *,
const char *fmt, ...);
+++ /dev/null
-#ifndef HEADER_CURL_SETUP_H
-#define HEADER_CURL_SETUP_H
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
- *
- * This software is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
- *
- * 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.
- *
- ***************************************************************************/
-
-/*
- * Define WIN32 when build target is Win32 API
- */
-
-#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) && \
- !defined(__SYMBIAN32__)
-#define WIN32
-#endif
-
-/*
- * Include configuration script results or hand-crafted
- * configuration file for platforms which lack config tool.
- */
-
-#ifdef HAVE_CONFIG_H
-
-#include "curl_config.h"
-
-#else /* HAVE_CONFIG_H */
-
-#ifdef _WIN32_WCE
-# include "config-win32ce.h"
-#else
-# ifdef WIN32
-# include "config-win32.h"
-# endif
-#endif
-
-#if defined(macintosh) && defined(__MRC__)
-# include "config-mac.h"
-#endif
-
-#ifdef __riscos__
-# include "config-riscos.h"
-#endif
-
-#ifdef __AMIGA__
-# include "config-amigaos.h"
-#endif
-
-#ifdef __SYMBIAN32__
-# include "config-symbian.h"
-#endif
-
-#ifdef __OS400__
-# include "config-os400.h"
-#endif
-
-#ifdef TPF
-# include "config-tpf.h"
-#endif
-
-#ifdef __VXWORKS__
-# include "config-vxworks.h"
-#endif
-
-#endif /* HAVE_CONFIG_H */
-
-/* ================================================================ */
-/* Definition of preprocessor macros/symbols which modify compiler */
-/* behavior or generated code characteristics must be done here, */
-/* as appropriate, before any system header file is included. It is */
-/* also possible to have them defined in the config file included */
-/* before this point. As a result of all this we frown inclusion of */
-/* system header files in our config files, avoid this at any cost. */
-/* ================================================================ */
-
-/*
- * AIX 4.3 and newer needs _THREAD_SAFE defined to build
- * proper reentrant code. Others may also need it.
- */
-
-#ifdef NEED_THREAD_SAFE
-# ifndef _THREAD_SAFE
-# define _THREAD_SAFE
-# endif
-#endif
-
-/*
- * Tru64 needs _REENTRANT set for a few function prototypes and
- * things to appear in the system header files. Unixware needs it
- * to build proper reentrant code. Others may also need it.
- */
-
-#ifdef NEED_REENTRANT
-# ifndef _REENTRANT
-# define _REENTRANT
-# endif
-#endif
-
-/* ================================================================ */
-/* If you need to include a system header file for your platform, */
-/* please, do it beyond the point further indicated in this file. */
-/* ================================================================ */
-
-/*
- * libcurl's external interface definitions are also used internally,
- * and might also include required system header files to define them.
- */
-
-#include <curl/curlbuild.h>
-
-/*
- * Compile time sanity checks must also be done when building the library.
- */
-
-#include <curl/curlrules.h>
-
-/*
- * Ensure that no one is using the old SIZEOF_CURL_OFF_T macro
- */
-
-#ifdef SIZEOF_CURL_OFF_T
-# error "SIZEOF_CURL_OFF_T shall not be defined!"
- Error Compilation_aborted_SIZEOF_CURL_OFF_T_shall_not_be_defined
-#endif
-
-/*
- * Set up internal curl_off_t formatting string directives for
- * exclusive use with libcurl's internal *printf functions.
- */
-
-#ifdef FORMAT_OFF_T
-# error "FORMAT_OFF_T shall not be defined before this point!"
- Error Compilation_aborted_FORMAT_OFF_T_already_defined
-#endif
-
-#ifdef FORMAT_OFF_TU
-# error "FORMAT_OFF_TU shall not be defined before this point!"
- Error Compilation_aborted_FORMAT_OFF_TU_already_defined
-#endif
-
-#if (CURL_SIZEOF_CURL_OFF_T > CURL_SIZEOF_LONG)
-# define FORMAT_OFF_T "lld"
-# define FORMAT_OFF_TU "llu"
-#else
-# define FORMAT_OFF_T "ld"
-# define FORMAT_OFF_TU "lu"
-#endif
-
-/*
- * Disable other protocols when http is the only one desired.
- */
-
-#ifdef HTTP_ONLY
-# ifndef CURL_DISABLE_TFTP
-# define CURL_DISABLE_TFTP
-# endif
-# ifndef CURL_DISABLE_FTP
-# define CURL_DISABLE_FTP
-# endif
-# ifndef CURL_DISABLE_LDAP
-# define CURL_DISABLE_LDAP
-# endif
-# ifndef CURL_DISABLE_TELNET
-# define CURL_DISABLE_TELNET
-# endif
-# ifndef CURL_DISABLE_DICT
-# define CURL_DISABLE_DICT
-# endif
-# ifndef CURL_DISABLE_FILE
-# define CURL_DISABLE_FILE
-# endif
-# ifndef CURL_DISABLE_RTSP
-# define CURL_DISABLE_RTSP
-# endif
-# ifndef CURL_DISABLE_POP3
-# define CURL_DISABLE_POP3
-# endif
-# ifndef CURL_DISABLE_IMAP
-# define CURL_DISABLE_IMAP
-# endif
-# ifndef CURL_DISABLE_SMTP
-# define CURL_DISABLE_SMTP
-# endif
-# ifndef CURL_DISABLE_RTSP
-# define CURL_DISABLE_RTSP
-# endif
-# ifndef CURL_DISABLE_RTMP
-# define CURL_DISABLE_RTMP
-# endif
-# ifndef CURL_DISABLE_GOPHER
-# define CURL_DISABLE_GOPHER
-# endif
-#endif
-
-/*
- * When http is disabled rtsp is not supported.
- */
-
-#if defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_RTSP)
-# define CURL_DISABLE_RTSP
-#endif
-
-/* ================================================================ */
-/* No system header file shall be included in this file before this */
-/* point. The only allowed ones are those included from curlbuild.h */
-/* ================================================================ */
-
-/*
- * OS/400 setup file includes some system headers.
- */
-
-#ifdef __OS400__
-# include "setup-os400.h"
-#endif
-
-/*
- * Include header files for windows builds before redefining anything.
- * Use this preprocessor block only to include or exclude windows.h,
- * winsock2.h, ws2tcpip.h or winsock.h. Any other windows thing belongs
- * to any other further and independent block. Under Cygwin things work
- * just as under linux (e.g. <sys/socket.h>) and the winsock headers should
- * never be included when __CYGWIN__ is defined. configure script takes
- * care of this, not defining HAVE_WINDOWS_H, HAVE_WINSOCK_H, HAVE_WINSOCK2_H,
- * neither HAVE_WS2TCPIP_H when __CYGWIN__ is defined.
- */
-
-#ifdef HAVE_WINDOWS_H
-# if defined(UNICODE) && !defined(_UNICODE)
-# define _UNICODE
-# endif
-# if defined(_UNICODE) && !defined(UNICODE)
-# define UNICODE
-# endif
-# ifndef WIN32_LEAN_AND_MEAN
-# define WIN32_LEAN_AND_MEAN
-# endif
-# include <windows.h>
-# ifdef HAVE_WINSOCK2_H
-# include <winsock2.h>
-# ifdef HAVE_WS2TCPIP_H
-# include <ws2tcpip.h>
-# endif
-# else
-# ifdef HAVE_WINSOCK_H
-# include <winsock.h>
-# endif
-# endif
-# include <tchar.h>
-#endif
-
-/*
- * Define USE_WINSOCK to 2 if we have and use WINSOCK2 API, else
- * define USE_WINSOCK to 1 if we have and use WINSOCK API, else
- * undefine USE_WINSOCK.
- */
-
-#undef USE_WINSOCK
-
-#ifdef HAVE_WINSOCK2_H
-# define USE_WINSOCK 2
-#else
-# ifdef HAVE_WINSOCK_H
-# define USE_WINSOCK 1
-# endif
-#endif
-
-#ifdef USE_LWIPSOCK
-# include <lwip/init.h>
-# include <lwip/sockets.h>
-# include <lwip/netdb.h>
-#endif
-
-#ifdef HAVE_EXTRA_STRICMP_H
-# include <extra/stricmp.h>
-#endif
-
-#ifdef HAVE_EXTRA_STRDUP_H
-# include <extra/strdup.h>
-#endif
-
-#ifdef TPF
-# include <strings.h> /* for bzero, strcasecmp, and strncasecmp */
-# include <string.h> /* for strcpy and strlen */
-# include <stdlib.h> /* for rand and srand */
-# include <sys/socket.h> /* for select and ioctl*/
-# include <netdb.h> /* for in_addr_t definition */
-# include <tpf/sysapi.h> /* for tpf_process_signals */
- /* change which select is used for libcurl */
-# define select(a,b,c,d,e) tpf_select_libcurl(a,b,c,d,e)
-#endif
-
-#ifdef __VXWORKS__
-# include <sockLib.h> /* for generic BSD socket functions */
-# include <ioLib.h> /* for basic I/O interface functions */
-#endif
-
-#ifdef __AMIGA__
-# ifndef __ixemul__
-# include <exec/types.h>
-# include <exec/execbase.h>
-# include <proto/exec.h>
-# include <proto/dos.h>
-# define select(a,b,c,d,e) WaitSelect(a,b,c,d,e,0)
-# endif
-#endif
-
-#include <stdio.h>
-#ifdef HAVE_ASSERT_H
-#include <assert.h>
-#endif
-
-#ifdef __TANDEM /* for nsr-tandem-nsk systems */
-#include <floss.h>
-#endif
-
-#ifndef STDC_HEADERS /* no standard C headers! */
-#include <curl/stdcheaders.h>
-#endif
-
-#ifdef __POCC__
-# include <sys/types.h>
-# include <unistd.h>
-# define sys_nerr EILSEQ
-#endif
-
-/*
- * Salford-C kludge section (mostly borrowed from wxWidgets).
- */
-#ifdef __SALFORDC__
- #pragma suppress 353 /* Possible nested comments */
- #pragma suppress 593 /* Define not used */
- #pragma suppress 61 /* enum has no name */
- #pragma suppress 106 /* unnamed, unused parameter */
- #include <clib.h>
-#endif
-
-/*
- * Large file (>2Gb) support using WIN32 functions.
- */
-
-#ifdef USE_WIN32_LARGE_FILES
-# include <io.h>
-# include <sys/types.h>
-# include <sys/stat.h>
-# undef lseek
-# define lseek(fdes,offset,whence) _lseeki64(fdes, offset, whence)
-# define fstat(fdes,stp) _fstati64(fdes, stp)
-# define stat(fname,stp) _stati64(fname, stp)
-# define struct_stat struct _stati64
-# define LSEEK_ERROR (__int64)-1
-#endif
-
-/*
- * Small file (<2Gb) support using WIN32 functions.
- */
-
-#ifdef USE_WIN32_SMALL_FILES
-# include <io.h>
-# include <sys/types.h>
-# include <sys/stat.h>
-# ifndef _WIN32_WCE
-# undef lseek
-# define lseek(fdes,offset,whence) _lseek(fdes, (long)offset, whence)
-# define fstat(fdes,stp) _fstat(fdes, stp)
-# define stat(fname,stp) _stat(fname, stp)
-# define struct_stat struct _stat
-# endif
-# define LSEEK_ERROR (long)-1
-#endif
-
-#ifndef struct_stat
-# define struct_stat struct stat
-#endif
-
-#ifndef LSEEK_ERROR
-# define LSEEK_ERROR (off_t)-1
-#endif
-
-/*
- * Default sizeof(off_t) in case it hasn't been defined in config file.
- */
-
-#ifndef SIZEOF_OFF_T
-# if defined(__VMS) && !defined(__VAX)
-# if defined(_LARGEFILE)
-# define SIZEOF_OFF_T 8
-# endif
-# elif defined(__OS400__) && defined(__ILEC400__)
-# if defined(_LARGE_FILES)
-# define SIZEOF_OFF_T 8
-# endif
-# elif defined(__MVS__) && defined(__IBMC__)
-# if defined(_LP64) || defined(_LARGE_FILES)
-# define SIZEOF_OFF_T 8
-# endif
-# elif defined(__370__) && defined(__IBMC__)
-# if defined(_LP64) || defined(_LARGE_FILES)
-# define SIZEOF_OFF_T 8
-# endif
-# endif
-# ifndef SIZEOF_OFF_T
-# define SIZEOF_OFF_T 4
-# endif
-#endif
-
-/*
- * Arg 2 type for gethostname in case it hasn't been defined in config file.
- */
-
-#ifndef GETHOSTNAME_TYPE_ARG2
-# ifdef USE_WINSOCK
-# define GETHOSTNAME_TYPE_ARG2 int
-# else
-# define GETHOSTNAME_TYPE_ARG2 size_t
-# endif
-#endif
-
-/* Below we define some functions. They should
-
- 4. set the SIGALRM signal timeout
- 5. set dir/file naming defines
- */
-
-#ifdef WIN32
-
-# define DIR_CHAR "\\"
-# define DOT_CHAR "_"
-
-#else /* WIN32 */
-
-# ifdef MSDOS /* Watt-32 */
-
-# include <sys/ioctl.h>
-# define select(n,r,w,x,t) select_s(n,r,w,x,t)
-# define ioctl(x,y,z) ioctlsocket(x,y,(char *)(z))
-# include <tcp.h>
-# ifdef word
-# undef word
-# endif
-# ifdef byte
-# undef byte
-# endif
-
-# endif /* MSDOS */
-
-# ifdef __minix
- /* Minix 3 versions up to at least 3.1.3 are missing these prototypes */
- extern char * strtok_r(char *s, const char *delim, char **last);
- extern struct tm * gmtime_r(const time_t * const timep, struct tm *tmp);
-# endif
-
-# define DIR_CHAR "/"
-# ifndef DOT_CHAR
-# define DOT_CHAR "."
-# endif
-
-# ifdef MSDOS
-# undef DOT_CHAR
-# define DOT_CHAR "_"
-# endif
-
-# ifndef fileno /* sunos 4 have this as a macro! */
- int fileno( FILE *stream);
-# endif
-
-#endif /* WIN32 */
-
-/*
- * msvc 6.0 requires PSDK in order to have INET6_ADDRSTRLEN
- * defined in ws2tcpip.h as well as to provide IPv6 support.
- */
-
-#if defined(_MSC_VER) && !defined(__POCC__)
-# if !defined(HAVE_WS2TCPIP_H) || \
- ((_MSC_VER < 1300) && !defined(INET6_ADDRSTRLEN))
-# undef HAVE_GETADDRINFO_THREADSAFE
-# undef HAVE_FREEADDRINFO
-# undef HAVE_GETADDRINFO
-# undef HAVE_GETNAMEINFO
-# undef ENABLE_IPV6
-# endif
-#endif
-
-/* ---------------------------------------------------------------- */
-/* resolver specialty compile-time defines */
-/* CURLRES_* defines to use in the host*.c sources */
-/* ---------------------------------------------------------------- */
-
-/*
- * lcc-win32 doesn't have _beginthreadex(), lacks threads support.
- */
-
-#if defined(__LCC__) && defined(WIN32)
-# undef USE_THREADS_POSIX
-# undef USE_THREADS_WIN32
-#endif
-
-/*
- * MSVC threads support requires a multi-threaded runtime library.
- * _beginthreadex() is not available in single-threaded ones.
- */
-
-#if defined(_MSC_VER) && !defined(__POCC__) && !defined(_MT)
-# undef USE_THREADS_POSIX
-# undef USE_THREADS_WIN32
-#endif
-
-/*
- * Mutually exclusive CURLRES_* definitions.
- */
-
-#ifdef USE_ARES
-# define CURLRES_ASYNCH
-# define CURLRES_ARES
-/* now undef the stock libc functions just to avoid them being used */
-# undef HAVE_GETADDRINFO
-# undef HAVE_GETHOSTBYNAME
-#elif defined(USE_THREADS_POSIX) || defined(USE_THREADS_WIN32)
-# define CURLRES_ASYNCH
-# define CURLRES_THREADED
-#else
-# define CURLRES_SYNCH
-#endif
-
-#ifdef ENABLE_IPV6
-# define CURLRES_IPV6
-#else
-# define CURLRES_IPV4
-#endif
-
-/* ---------------------------------------------------------------- */
-
-/*
- * When using WINSOCK, TELNET protocol requires WINSOCK2 API.
- */
-
-#if defined(USE_WINSOCK) && (USE_WINSOCK != 2)
-# define CURL_DISABLE_TELNET 1
-#endif
-
-/*
- * msvc 6.0 does not have struct sockaddr_storage and
- * does not define IPPROTO_ESP in winsock2.h. But both
- * are available if PSDK is properly installed.
- */
-
-#if defined(_MSC_VER) && !defined(__POCC__)
-# if !defined(HAVE_WINSOCK2_H) || ((_MSC_VER < 1300) && !defined(IPPROTO_ESP))
-# undef HAVE_STRUCT_SOCKADDR_STORAGE
-# endif
-#endif
-
-/*
- * Intentionally fail to build when using msvc 6.0 without PSDK installed.
- * The brave of heart can circumvent this, defining ALLOW_MSVC6_WITHOUT_PSDK
- * in lib/config-win32.h although absolutely discouraged and unsupported.
- */
-
-#if defined(_MSC_VER) && !defined(__POCC__)
-# if !defined(HAVE_WINDOWS_H) || ((_MSC_VER < 1300) && !defined(_FILETIME_))
-# if !defined(ALLOW_MSVC6_WITHOUT_PSDK)
-# error MSVC 6.0 requires "February 2003 Platform SDK" a.k.a. \
- "Windows Server 2003 PSDK"
-# else
-# define CURL_DISABLE_LDAP 1
-# endif
-# endif
-#endif
-
-#ifdef NETWARE
-int netware_init(void);
-#ifndef __NOVELL_LIBC__
-#include <sys/bsdskt.h>
-#include <sys/timeval.h>
-#endif
-#endif
-
-#if defined(HAVE_LIBIDN) && defined(HAVE_TLD_H)
-/* The lib was present and the tld.h header (which is missing in libidn 0.3.X
- but we only work with libidn 0.4.1 or later) */
-#define USE_LIBIDN
-#endif
-
-#ifndef SIZEOF_TIME_T
-/* assume default size of time_t to be 32 bit */
-#define SIZEOF_TIME_T 4
-#endif
-
-#define LIBIDN_REQUIRED_VERSION "0.4.1"
-
-#if defined(USE_GNUTLS) || defined(USE_SSLEAY) || defined(USE_NSS) || \
- defined(USE_QSOSSL) || defined(USE_POLARSSL) || defined(USE_AXTLS) || \
- defined(USE_CYASSL) || defined(USE_SCHANNEL) || \
- defined(USE_DARWINSSL)
-#define USE_SSL /* SSL support has been enabled */
-#endif
-
-#if defined(HAVE_GSSAPI) || defined(USE_WINDOWS_SSPI)
-#define USE_HTTP_NEGOTIATE
-#endif
-
-/* Single point where USE_NTLM definition might be done */
-#if !defined(CURL_DISABLE_HTTP) && !defined(CURL_DISABLE_NTLM)
-#if defined(USE_SSLEAY) || defined(USE_WINDOWS_SSPI) || \
- defined(USE_GNUTLS) || defined(USE_NSS) || defined(USE_DARWINSSL)
-#define USE_NTLM
-#endif
-#endif
-
-/* non-configure builds may define CURL_WANTS_CA_BUNDLE_ENV */
-#if defined(CURL_WANTS_CA_BUNDLE_ENV) && !defined(CURL_CA_BUNDLE)
-#define CURL_CA_BUNDLE getenv("CURL_CA_BUNDLE")
-#endif
-
-/*
- * Provide a mechanism to silence picky compilers, such as gcc 4.6+.
- * Parameters should of course normally not be unused, but for example when
- * we have multiple implementations of the same interface it may happen.
- */
-
-#if defined(__GNUC__) && ((__GNUC__ >= 3) || \
- ((__GNUC__ == 2) && defined(__GNUC_MINOR__) && (__GNUC_MINOR__ >= 7)))
-# define UNUSED_PARAM __attribute__((__unused__))
-#else
-# define UNUSED_PARAM /*NOTHING*/
-#endif
-
-/*
- * Include macros and defines that should only be processed once.
- */
-
-#ifndef __SETUP_ONCE_H
-#include "setup_once.h"
-#endif
-
-/*
- * Definition of our NOP statement Object-like macro
- */
-
-#ifndef Curl_nop_stmt
-# define Curl_nop_stmt do { } WHILE_FALSE
-#endif
-
-/*
- * Ensure that Winsock and lwIP TCP/IP stacks are not mixed.
- */
-
-#if defined(__LWIP_OPT_H__)
-# if defined(SOCKET) || \
- defined(USE_WINSOCK) || \
- defined(HAVE_WINSOCK_H) || \
- defined(HAVE_WINSOCK2_H) || \
- defined(HAVE_WS2TCPIP_H)
-# error "Winsock and lwIP TCP/IP stack definitions shall not coexist!"
-# endif
-#endif
-
-/*
- * Portable symbolic names for Winsock shutdown() mode flags.
- */
-
-#ifdef USE_WINSOCK
-# define SHUT_RD 0x00
-# define SHUT_WR 0x01
-# define SHUT_RDWR 0x02
-#endif
-
-/* Define S_ISREG if not defined by system headers, f.e. MSVC */
-#if !defined(S_ISREG) && defined(S_IFMT) && defined(S_IFREG)
-#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG)
-#endif
-
-#endif /* HEADER_CURL_SETUP_H */
+++ /dev/null
-#ifndef HEADER_CURL_SETUP_ONCE_H
-#define HEADER_CURL_SETUP_ONCE_H
-/***************************************************************************
- * _ _ ____ _
- * Project ___| | | | _ \| |
- * / __| | | | |_) | |
- * | (__| |_| | _ <| |___
- * \___|\___/|_| \_\_____|
- *
- * Copyright (C) 1998 - 2012, Daniel Stenberg, <daniel@haxx.se>, et al.
- *
- * This software is licensed as described in the file COPYING, which
- * you should have received as part of this distribution. The terms
- * are also available at http://curl.haxx.se/docs/copyright.html.
- *
- * 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.
- *
- ***************************************************************************/
-
-
-/********************************************************************
- * NOTICE *
- * ======== *
- * *
- * Content of header files lib/setup_once.h and ares/setup_once.h *
- * must be kept in sync. Modify the other one if you change this. *
- * *
- ********************************************************************/
-
-
-/*
- * Inclusion of common header files.
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <stdarg.h>
-#include <ctype.h>
-
-#ifdef HAVE_ERRNO_H
-#include <errno.h>
-#endif
-
-#ifdef HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#ifdef NEED_MALLOC_H
-#include <malloc.h>
-#endif
-
-#ifdef NEED_MEMORY_H
-#include <memory.h>
-#endif
-
-#ifdef HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#ifdef TIME_WITH_SYS_TIME
-#include <time.h>
-#endif
-#else
-#ifdef HAVE_TIME_H
-#include <time.h>
-#endif
-#endif
-
-#ifdef WIN32
-#include <io.h>
-#include <fcntl.h>
-#endif
-
-#if defined(HAVE_STDBOOL_H) && defined(HAVE_BOOL_T)
-#include <stdbool.h>
-#endif
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#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
-
-#ifdef HAVE_SYS_SOCKET_H
-#include <sys/socket.h>
-#endif
-
-#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
-
-
-/*
- * Definition of timeval struct for platforms that don't have it.
- */
-
-#ifndef HAVE_STRUCT_TIMEVAL
-struct timeval {
- long tv_sec;
- long tv_usec;
-};
-#endif
-
-
-/*
- * If we have the MSG_NOSIGNAL define, make sure we use
- * it as the fourth argument of function send()
- */
-
-#ifdef HAVE_MSG_NOSIGNAL
-#define SEND_4TH_ARG MSG_NOSIGNAL
-#else
-#define SEND_4TH_ARG 0
-#endif
-
-
-#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)
-/*
- * 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.
- */
-
-#if !defined(RECV_TYPE_ARG1) || \
- !defined(RECV_TYPE_ARG2) || \
- !defined(RECV_TYPE_ARG3) || \
- !defined(RECV_TYPE_ARG4) || \
- !defined(RECV_TYPE_RETV)
- /* */
- Error Missing_definition_of_return_and_arguments_types_of_recv
- /* */
-#else
-#define sread(x,y,z) (ssize_t)recv((RECV_TYPE_ARG1)(x), \
- (RECV_TYPE_ARG2)(y), \
- (RECV_TYPE_ARG3)(z), \
- (RECV_TYPE_ARG4)(0))
-#endif
-#else /* HAVE_RECV */
-#ifndef sread
- /* */
- Error Missing_definition_of_macro_sread
- /* */
-#endif
-#endif /* HAVE_RECV */
-
-
-#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)
-#if !defined(SEND_TYPE_ARG1) || \
- !defined(SEND_QUAL_ARG2) || \
- !defined(SEND_TYPE_ARG2) || \
- !defined(SEND_TYPE_ARG3) || \
- !defined(SEND_TYPE_ARG4) || \
- !defined(SEND_TYPE_RETV)
- /* */
- Error Missing_definition_of_return_and_arguments_types_of_send
- /* */
-#else
-#define swrite(x,y,z) (ssize_t)send((SEND_TYPE_ARG1)(x), \
- (SEND_TYPE_ARG2)(y), \
- (SEND_TYPE_ARG3)(z), \
- (SEND_TYPE_ARG4)(SEND_4TH_ARG))
-#endif
-#else /* HAVE_SEND */
-#ifndef swrite
- /* */
- Error Missing_definition_of_macro_swrite
- /* */
-#endif
-#endif /* HAVE_SEND */
-
-
-#if 0
-#if defined(HAVE_RECVFROM)
-/*
- * Currently recvfrom is only used on udp sockets.
- */
-#if !defined(RECVFROM_TYPE_ARG1) || \
- !defined(RECVFROM_TYPE_ARG2) || \
- !defined(RECVFROM_TYPE_ARG3) || \
- !defined(RECVFROM_TYPE_ARG4) || \
- !defined(RECVFROM_TYPE_ARG5) || \
- !defined(RECVFROM_TYPE_ARG6) || \
- !defined(RECVFROM_TYPE_RETV)
- /* */
- Error Missing_definition_of_return_and_arguments_types_of_recvfrom
- /* */
-#else
-#define sreadfrom(s,b,bl,f,fl) (ssize_t)recvfrom((RECVFROM_TYPE_ARG1) (s), \
- (RECVFROM_TYPE_ARG2 *)(b), \
- (RECVFROM_TYPE_ARG3) (bl), \
- (RECVFROM_TYPE_ARG4) (0), \
- (RECVFROM_TYPE_ARG5 *)(f), \
- (RECVFROM_TYPE_ARG6 *)(fl))
-#endif
-#else /* HAVE_RECVFROM */
-#ifndef sreadfrom
- /* */
- Error Missing_definition_of_macro_sreadfrom
- /* */
-#endif
-#endif /* HAVE_RECVFROM */
-
-
-#ifdef RECVFROM_TYPE_ARG6_IS_VOID
-# define RECVFROM_ARG6_T int
-#else
-# define RECVFROM_ARG6_T RECVFROM_TYPE_ARG6
-#endif
-#endif /* if 0 */
-
-
-/*
- * 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))
-#elif defined(USE_LWIPSOCK)
-# define sclose(x) lwip_close((x))
-#else
-# define sclose(x) close((x))
-#endif
-
-/*
- * Stack-independent version of fcntl() on sockets:
- */
-#if defined(USE_LWIPSOCK)
-# define sfcntl lwip_fcntl
-#else
-# define sfcntl fcntl
-#endif
-
-/*
- * Uppercase macro versions of ANSI/ISO is*() functions/macros which
- * avoid negative number inputs with argument byte codes > 127.
- */
-
-#define ISSPACE(x) (isspace((int) ((unsigned char)x)))
-#define ISDIGIT(x) (isdigit((int) ((unsigned char)x)))
-#define ISALNUM(x) (isalnum((int) ((unsigned char)x)))
-#define ISXDIGIT(x) (isxdigit((int) ((unsigned char)x)))
-#define ISGRAPH(x) (isgraph((int) ((unsigned char)x)))
-#define ISALPHA(x) (isalpha((int) ((unsigned char)x)))
-#define ISPRINT(x) (isprint((int) ((unsigned char)x)))
-#define ISUPPER(x) (isupper((int) ((unsigned char)x)))
-#define ISLOWER(x) (islower((int) ((unsigned char)x)))
-#define ISASCII(x) (isascii((int) ((unsigned char)x)))
-
-#define ISBLANK(x) (int)((((unsigned char)x) == ' ') || \
- (((unsigned char)x) == '\t'))
-
-#define TOLOWER(x) (tolower((int) ((unsigned char)x)))
-
-
-/*
- * '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
-
-
-/*
- * '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.
- */
-
-#ifndef HAVE_BOOL_T
- 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
-#endif
-
-
-/*
- * 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.
- */
-
-#ifndef TRUE
-#define TRUE true
-#endif
-#ifndef FALSE
-#define FALSE false
-#endif
-
-
-/*
- * Macro WHILE_FALSE may be used to build single-iteration do-while loops,
- * avoiding compiler warnings. Mostly intended for other macro definitions.
- */
-
-#define WHILE_FALSE while(0)
-
-#if defined(_MSC_VER) && !defined(__POCC__)
-# undef WHILE_FALSE
-# if (_MSC_VER < 1500)
-# define WHILE_FALSE while(1, 0)
-# else
-# define WHILE_FALSE \
-__pragma(warning(push)) \
-__pragma(warning(disable:4127)) \
-while(0) \
-__pragma(warning(pop))
-# endif
-#endif
-
-
-/*
- * Typedef to 'int' if sig_atomic_t is not an available 'typedefed' type.
- */
-
-#ifndef HAVE_SIG_ATOMIC_T
-typedef int sig_atomic_t;
-#define HAVE_SIG_ATOMIC_T
-#endif
-
-
-/*
- * Convenience SIG_ATOMIC_T definition
- */
-
-#ifdef HAVE_SIG_ATOMIC_T_VOLATILE
-#define SIG_ATOMIC_T static sig_atomic_t
-#else
-#define SIG_ATOMIC_T static volatile sig_atomic_t
-#endif
-
-
-/*
- * Default return type for signal handlers.
- */
-
-#ifndef RETSIGTYPE
-#define RETSIGTYPE void
-#endif
-
-
-/*
- * Macro used to include code only in debug builds.
- */
-
-#ifdef DEBUGBUILD
-#define DEBUGF(x) x
-#else
-#define DEBUGF(x) do { } WHILE_FALSE
-#endif
-
-
-/*
- * Macro used to include assertion code only in debug builds.
- */
-
-#if defined(DEBUGBUILD) && defined(HAVE_ASSERT_H)
-#define DEBUGASSERT(x) assert(x)
-#else
-#define DEBUGASSERT(x) do { } WHILE_FALSE
-#endif
-
-
-/*
- * 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
-
-
-/*
- * Macro ERRNO / SET_ERRNO() returns / sets the NOT *socket-related* errno
- * (or equivalent) on this platform to hide platform details to code using it.
- */
-
-#ifdef WIN32
-#define ERRNO ((int)GetLastError())
-#define SET_ERRNO(x) (SetLastError((DWORD)(x)))
-#else
-#define ERRNO (errno)
-#define SET_ERRNO(x) (errno = (x))
-#endif
-
-
-/*
- * Portable error number symbolic names defined to Winsock error codes.
- */
-
-#ifdef USE_WINSOCK
-#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
-#undef EWOULDBLOCK /* override definition in errno.h */
-#define EWOULDBLOCK WSAEWOULDBLOCK
-#undef EINPROGRESS /* override definition in errno.h */
-#define EINPROGRESS WSAEINPROGRESS
-#undef EALREADY /* override definition in errno.h */
-#define EALREADY WSAEALREADY
-#undef ENOTSOCK /* override definition in errno.h */
-#define ENOTSOCK WSAENOTSOCK
-#undef EDESTADDRREQ /* override definition in errno.h */
-#define EDESTADDRREQ WSAEDESTADDRREQ
-#undef EMSGSIZE /* override definition in errno.h */
-#define EMSGSIZE WSAEMSGSIZE
-#undef EPROTOTYPE /* override definition in errno.h */
-#define EPROTOTYPE WSAEPROTOTYPE
-#undef ENOPROTOOPT /* override definition in errno.h */
-#define ENOPROTOOPT WSAENOPROTOOPT
-#undef EPROTONOSUPPORT /* override definition in errno.h */
-#define EPROTONOSUPPORT WSAEPROTONOSUPPORT
-#define ESOCKTNOSUPPORT WSAESOCKTNOSUPPORT
-#undef EOPNOTSUPP /* override definition in errno.h */
-#define EOPNOTSUPP WSAEOPNOTSUPP
-#define EPFNOSUPPORT WSAEPFNOSUPPORT
-#undef EAFNOSUPPORT /* override definition in errno.h */
-#define EAFNOSUPPORT WSAEAFNOSUPPORT
-#undef EADDRINUSE /* override definition in errno.h */
-#define EADDRINUSE WSAEADDRINUSE
-#undef EADDRNOTAVAIL /* override definition in errno.h */
-#define EADDRNOTAVAIL WSAEADDRNOTAVAIL
-#undef ENETDOWN /* override definition in errno.h */
-#define ENETDOWN WSAENETDOWN
-#undef ENETUNREACH /* override definition in errno.h */
-#define ENETUNREACH WSAENETUNREACH
-#undef ENETRESET /* override definition in errno.h */
-#define ENETRESET WSAENETRESET
-#undef ECONNABORTED /* override definition in errno.h */
-#define ECONNABORTED WSAECONNABORTED
-#undef ECONNRESET /* override definition in errno.h */
-#define ECONNRESET WSAECONNRESET
-#undef ENOBUFS /* override definition in errno.h */
-#define ENOBUFS WSAENOBUFS
-#undef EISCONN /* override definition in errno.h */
-#define EISCONN WSAEISCONN
-#undef ENOTCONN /* override definition in errno.h */
-#define ENOTCONN WSAENOTCONN
-#define ESHUTDOWN WSAESHUTDOWN
-#define ETOOMANYREFS WSAETOOMANYREFS
-#undef ETIMEDOUT /* override definition in errno.h */
-#define ETIMEDOUT WSAETIMEDOUT
-#undef ECONNREFUSED /* override definition in errno.h */
-#define ECONNREFUSED WSAECONNREFUSED
-#undef ELOOP /* override definition in errno.h */
-#define ELOOP WSAELOOP
-#ifndef ENAMETOOLONG /* possible previous definition in errno.h */
-#define ENAMETOOLONG WSAENAMETOOLONG
-#endif
-#define EHOSTDOWN WSAEHOSTDOWN
-#undef EHOSTUNREACH /* override definition in errno.h */
-#define EHOSTUNREACH WSAEHOSTUNREACH
-#ifndef ENOTEMPTY /* possible previous definition in errno.h */
-#define ENOTEMPTY WSAENOTEMPTY
-#endif
-#define EPROCLIM WSAEPROCLIM
-#define EUSERS WSAEUSERS
-#define EDQUOT WSAEDQUOT
-#define ESTALE WSAESTALE
-#define EREMOTE WSAEREMOTE
-#endif
-
-
-/*
- * Actually use __32_getpwuid() on 64-bit VMS builds for getpwuid()
- */
-
-#if defined(__VMS) && \
- defined(__INITIAL_POINTER_SIZE) && (__INITIAL_POINTER_SIZE == 64)
-#define getpwuid __32_getpwuid
-#endif
-
-
-/*
- * Macro argv_item_t hides platform details to code using it.
- */
-
-#ifdef __VMS
-#define argv_item_t __char_ptr32
-#else
-#define argv_item_t char *
-#endif
-
-
-/*
- * We use this ZERO_NULL to avoid picky compiler warnings,
- * when assigning a NULL pointer to a function pointer var.
- */
-
-#define ZERO_NULL 0
-
-
-#endif /* HEADER_CURL_SETUP_ONCE_H */
-
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include <curl/curl.h>
#include "urldata.h"
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include <curl/curl.h>
#include "cookie.h"
#include "urldata.h"
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "curl_memory.h"
#include "slist.h"
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_SMTP
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
struct Curl_sockaddr_storage {
union {
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#if !defined(CURL_DISABLE_PROXY)
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef CURL_DISABLE_PROXY
#define Curl_SOCKS4(a,b,c,d,e,f) CURLE_NOT_BUILT_IN
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_PROXY
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#if defined(USE_WINDOWS_SSPI) && !defined(CURL_DISABLE_PROXY)
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include <curl/curl.h>
#include "urldata.h"
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "timeval.h"
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "splay.h"
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
struct Curl_tree {
struct Curl_tree *smaller; /* smaller node */
/* #define CURL_LIBSSH2_DEBUG */
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_LIBSSH2
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_LIBSSH2_H
#include <libssh2.h>
http://httpd.apache.org/docs-2.0/ssl/ssl_intro.html
*/
-#include "setup.h"
+#include "curl_setup.h"
#include "urldata.h"
#define SSLGEN_C
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef MD5_DIGEST_LENGTH
#define MD5_DIGEST_LENGTH 16 /* fixed size */
* Sampo Kellomaki 1998.
*/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_LIMITS_H
#include <limits.h>
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef USE_SSLEAY
/*
/*
* This file is 'mem-include-scan' clean. See test 1132.
*/
-#include "setup.h"
+#include "curl_setup.h"
#include "strdup.h"
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef HAVE_STRDUP
extern char *curlx_strdup(const char *str);
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_STRINGS_H
#include <strings.h>
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_STRERROR_R
# if (!defined(HAVE_POSIX_STRERROR_R) && \
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef HAVE_STRTOK_R
#include <stddef.h>
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include <stddef.h>
#ifndef HAVE_STRTOK_R
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "strtoofft.h"
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
/*
* Determine which string to integral data type conversion function we use
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_TELNET
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifndef CURL_DISABLE_TFTP
* as well as the library. Do not mix with library internals!
*/
-#include "setup.h"
+#include "curl_setup.h"
struct timeval curlx_tvnow(void);
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "strtoofft.h"
#include "strequal.h"
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
/*
* Prototypes for library-wide functions provided by url.c
/* This file is for lib internal stuff */
-#include "setup.h"
+#include "curl_setup.h"
#define PORT_FTP 21
#define PORT_FTPS 990
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include <curl/curl.h>
#include "urldata.h"
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#if defined(__INTEL_COMPILER) && defined(__unix__)
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "wildcard.h"
#include "llist.h"
#***************************************************************************
# File version for 'aclocal' use. Keep it a single number.
-# serial 8
+# serial 10
dnl Note 1
dnl ------
dnl after this will execute with preprocessor symbol
dnl _REENTRANT defined. This macro also ensures that
dnl the generated config file defines NEED_REENTRANT
-dnl and that in turn setup.h will define _REENTRANT.
+dnl and that in turn curl_setup.h will define _REENTRANT.
dnl Internal macro for CURL_CONFIGURE_REENTRANT.
AC_DEFUN([CURL_CONFIGURE_FROM_NOW_ON_WITH_REENTRANT], [
dnl after this will execute with preprocessor symbol
dnl _THREAD_SAFE defined. This macro also ensures that
dnl the generated config file defines NEED_THREAD_SAFE
-dnl and that in turn setup.h will define _THREAD_SAFE.
+dnl and that in turn curl_setup.h will define _THREAD_SAFE.
dnl Internal macro for CURL_CONFIGURE_THREAD_SAFE.
AC_DEFUN([CURL_CONFIGURE_FROM_NOW_ON_WITH_THREAD_SAFE], [
/* OS/400 additional support. */
#include "curlbuild.h"
-#include "config-os400.h" /* Not setup.h: we only need some defines. */
+#include "config-os400.h" /* Not curl_setup.h: we only need some defines. */
#include <sys/types.h>
#include <sys/socket.h>
source_group("cURL header files" FILES ${CURL_HFILES})
include_directories(
- ${CURL_SOURCE_DIR}/lib # To be able to reach "setup_once.h"
- ${CURL_BINARY_DIR}/lib # To be able to reach "curl_config.h"
+ ${CURL_SOURCE_DIR}/lib # To be able to reach "curl_setup_once.h"
+ ${CURL_BINARY_DIR}/lib # To be able to reach "curl_config.h"
${CURL_BINARY_DIR}/include # To be able to reach "curl/curlbuild.h"
)
# might possibly already be installed in the system.
#
# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
# $(top_srcdir)/include is for libcurl's external include files
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
# $(top_builddir)/src is for curl's generated src/curl_config.h file
-# $(top_srcdir)/lib is for libcurl's lib/setup.h and other "borrowed" files
+# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
# $(top_srcdir)/src is for curl's src/tool_setup.h and "curl-private" files
AM_CPPFLAGS = -I$(top_builddir)/include/curl \
* therefore we must include setup.h before curl.h when building curl.
*/
-#include "setup.h" /* from the lib directory */
+#include "curl_setup.h" /* from the lib directory */
/*
* curl tool certainly uses libcurl's external interface.
string(TOUPPER ${TEST_NAME} UPPER_TEST_NAME)
include_directories(
- ${CURL_SOURCE_DIR}/lib # To be able to reach "setup_once.h"
+ ${CURL_SOURCE_DIR}/lib # To be able to reach "curl_setup_once.h"
${CURL_BINARY_DIR}/lib # To be able to reach "curl_config.h"
${CURL_BINARY_DIR}/include # To be able to reach "curl/curlbuild.h"
)
# might possibly already be installed in the system.
#
# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
# $(top_srcdir)/include is for libcurl's external include files
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
-# $(top_srcdir)/lib is for libcurl's lib/setup.h and other "borrowed" files
+# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
# $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
# $(top_srcdir)/ares is for in-tree c-ares's external include files
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "curl_gethostname.h"
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "sethostname.h"
*
***************************************************************************/
-/* Now include the setup.h file from libcurl's private libdir (the source
+/* Now include the curl_setup.h file from libcurl's private libdir (the source
version, but that might include "curl_config.h" from the build dir so we
need both of them in the include path), so that we get good in-depth
knowledge about the system we're building this on */
#define CURL_NO_OLDIES
-#include "setup.h"
+#include "curl_setup.h"
#include <curl/curl.h>
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
#include "testutil.h"
#include "memdebug.h"
* KIND, either express or implied.
*
***************************************************************************/
-#include "setup.h"
+#include "curl_setup.h"
struct timeval tutil_tvnow(void);
string(TOUPPER ${TEST_NAME} UPPER_TEST_NAME)
include_directories(
- ${CURL_SOURCE_DIR}/lib # To be able to reach "setup_once.h"
- ${CURL_BINARY_DIR}/lib # To be able to reach "curl_config.h"
+ ${CURL_SOURCE_DIR}/lib # To be able to reach "curl_setup_once.h"
+ ${CURL_BINARY_DIR}/lib # To be able to reach "curl_config.h"
${CURL_BINARY_DIR}/include # To be able to reach "curl/curlbuild.h"
)
if(CURL_USE_ARES)
# might possibly already be installed in the system.
#
# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
# $(top_srcdir)/include is for libcurl's external include files
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
-# $(top_srcdir)/lib is for libcurl's lib/setup.h and other "borrowed" files
+# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
# $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
# $(top_srcdir)/ares is for in-tree c-ares's external include files
#define CURL_NO_OLDIES
-#include "setup.h" /* portability help from the lib directory */
+#include "curl_setup.h" /* portability help from the lib directory */
#endif /* HEADER_CURL_SERVER_SETUP_H */
# might possibly already be installed in the system.
#
# $(top_builddir)/include/curl for generated curlbuild.h included from curl.h
-# $(top_builddir)/include for generated curlbuild.h included from lib/setup.h
+# $(top_builddir)/include for generated curlbuild.h inc. from lib/curl_setup.h
# $(top_srcdir)/include is for libcurl's external include files
# $(top_builddir)/lib is for libcurl's generated lib/curl_config.h file
-# $(top_srcdir)/lib is for libcurl's lib/setup.h and other "borrowed" files
+# $(top_srcdir)/lib for libcurl's lib/curl_setup.h and other "borrowed" files
# $(top_builddir)/ares is for in-tree c-ares's generated ares_build.h file
# $(top_srcdir)/ares is for in-tree c-ares's external include files