2005-12-17 15:37:53 -05:00
|
|
|
#ifndef __SRC_CURL_SETUP_H
|
|
|
|
#define __SRC_CURL_SETUP_H
|
2002-09-03 07:52:59 -04:00
|
|
|
/***************************************************************************
|
2004-12-15 05:33:51 -05:00
|
|
|
* _ _ ____ _
|
|
|
|
* Project ___| | | | _ \| |
|
|
|
|
* / __| | | | |_) | |
|
|
|
|
* | (__| |_| | _ <| |___
|
1999-12-29 09:20:26 -05:00
|
|
|
* \___|\___/|_| \_\_____|
|
|
|
|
*
|
2009-05-01 08:39:40 -04:00
|
|
|
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
1999-12-29 09:20:26 -05:00
|
|
|
*
|
2002-09-03 07:52:59 -04:00
|
|
|
* 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.
|
2004-12-15 05:33:51 -05:00
|
|
|
*
|
2001-01-03 04:29:33 -05:00
|
|
|
* You may opt to use, copy, modify, merge, publish, distribute and/or sell
|
|
|
|
* copies of the Software, and permit persons to whom the Software is
|
2002-09-03 07:52:59 -04:00
|
|
|
* furnished to do so, under the terms of the COPYING file.
|
1999-12-29 09:20:26 -05:00
|
|
|
*
|
2001-01-03 04:29:33 -05:00
|
|
|
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
|
|
|
|
* KIND, either express or implied.
|
1999-12-29 09:20:26 -05:00
|
|
|
*
|
2001-01-03 04:29:33 -05:00
|
|
|
* $Id$
|
2002-09-03 07:52:59 -04:00
|
|
|
***************************************************************************/
|
1999-12-29 09:20:26 -05:00
|
|
|
|
2004-03-02 04:13:28 -05:00
|
|
|
#define CURL_NO_OLDIES
|
|
|
|
|
2007-11-08 13:13:54 -05:00
|
|
|
/*
|
|
|
|
* Define WIN32 when build target is Win32 API
|
|
|
|
*/
|
2005-12-17 15:37:53 -05:00
|
|
|
|
2008-04-22 18:53:53 -04:00
|
|
|
#if (defined(_WIN32) || defined(__WIN32__)) && !defined(WIN32) && !defined(__SYMBIAN32__)
|
2005-04-24 18:25:04 -04:00
|
|
|
#define WIN32
|
|
|
|
#endif
|
1999-12-29 09:20:26 -05:00
|
|
|
|
2005-12-17 15:37:53 -05:00
|
|
|
/*
|
|
|
|
* Include configuration script results or hand-crafted
|
|
|
|
* configuration file for platforms which lack config tool.
|
|
|
|
*/
|
|
|
|
|
1999-12-29 09:20:26 -05:00
|
|
|
#ifdef HAVE_CONFIG_H
|
2009-07-14 09:25:14 -04:00
|
|
|
#include "curl_config.h"
|
1999-12-29 09:20:26 -05:00
|
|
|
#else
|
2005-12-17 15:37:53 -05:00
|
|
|
|
1999-12-29 09:20:26 -05:00
|
|
|
#ifdef WIN32
|
|
|
|
#include "config-win32.h"
|
|
|
|
#endif
|
2005-12-17 15:37:53 -05:00
|
|
|
|
2008-09-04 21:27:24 -04:00
|
|
|
#if defined(macintosh) && defined(__MRC__)
|
|
|
|
# include "config-mac.h"
|
2001-11-29 07:47:41 -05:00
|
|
|
#endif
|
2005-12-17 15:37:53 -05:00
|
|
|
|
2002-04-08 18:44:33 -04:00
|
|
|
#ifdef __riscos__
|
|
|
|
#include "config-riscos.h"
|
|
|
|
#endif
|
2005-12-17 15:37:53 -05:00
|
|
|
|
2007-02-28 09:45:48 -05:00
|
|
|
#ifdef __AMIGA__
|
2004-01-13 03:35:57 -05:00
|
|
|
#include "config-amigaos.h"
|
|
|
|
#endif
|
2005-12-17 15:37:53 -05:00
|
|
|
|
2008-04-22 18:53:53 -04:00
|
|
|
#ifdef __SYMBIAN32__
|
|
|
|
#include "config-symbian.h"
|
|
|
|
#endif
|
|
|
|
|
2006-04-07 17:50:47 -04:00
|
|
|
#ifdef TPF
|
|
|
|
#include "config-tpf.h"
|
|
|
|
#endif
|
|
|
|
|
2005-12-17 15:37:53 -05:00
|
|
|
#endif /* HAVE_CONFIG_H */
|
1999-12-29 09:20:26 -05:00
|
|
|
|
2008-07-26 23:16:37 -04:00
|
|
|
/*
|
2008-07-30 04:21:25 -04:00
|
|
|
* Tru64 needs _REENTRANT set for a few function prototypes and
|
2008-07-26 23:16:37 -04:00
|
|
|
* 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
|
2003-04-15 10:01:57 -04:00
|
|
|
#endif
|
|
|
|
|
2005-12-16 15:55:07 -05:00
|
|
|
/*
|
|
|
|
* Include header files for windows builds before redefining anything.
|
|
|
|
* Use this preproessor block only to include or exclude windows.h,
|
|
|
|
* winsock2.h, ws2tcpip.h or winsock.h. Any other windows thing belongs
|
2009-10-27 12:56:20 -04:00
|
|
|
* to any other further and independent block. Under Cygwin things work
|
2006-06-08 02:12:30 -04:00
|
|
|
* just as under linux (e.g. <sys/socket.h>) and the winsock headers should
|
2006-08-03 21:13:24 -04:00
|
|
|
* 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.
|
2005-12-16 15:55:07 -05:00
|
|
|
*/
|
|
|
|
|
2006-08-03 21:13:24 -04:00
|
|
|
#ifdef HAVE_WINDOWS_H
|
2005-12-17 15:37:53 -05:00
|
|
|
# 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>
|
2005-12-16 15:55:07 -05:00
|
|
|
# endif
|
2005-12-17 15:37:53 -05:00
|
|
|
# else
|
|
|
|
# ifdef HAVE_WINSOCK_H
|
|
|
|
# include <winsock.h>
|
2005-12-16 15:55:07 -05:00
|
|
|
# endif
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2006-10-18 11:57:49 -04:00
|
|
|
/*
|
|
|
|
* 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
|
|
|
|
|
2009-05-01 08:39:40 -04:00
|
|
|
#ifdef TPF
|
|
|
|
# include <sys/socket.h>
|
|
|
|
/* change which select is used for the curl command line tool */
|
|
|
|
# define select(a,b,c,d,e) tpf_select_bsd(a,b,c,d,e)
|
|
|
|
/* and turn off the progress meter */
|
|
|
|
# define CONF_DEFAULT (0|CONF_NOPROGRESS)
|
|
|
|
#endif
|
2006-10-18 11:57:49 -04:00
|
|
|
|
2003-04-15 10:01:57 -04:00
|
|
|
#include <stdio.h>
|
|
|
|
|
2004-03-03 04:27:18 -05:00
|
|
|
#ifdef __TANDEM
|
|
|
|
#include <floss.h>
|
|
|
|
#endif
|
|
|
|
|
2004-12-15 05:33:51 -05:00
|
|
|
|
1999-12-29 09:20:26 -05:00
|
|
|
#ifndef OS
|
|
|
|
#define OS "unknown"
|
|
|
|
#endif
|
|
|
|
|
2001-09-17 10:10:38 -04:00
|
|
|
#if !defined(fileno) && !defined(WIN32) /* sunos 4 have this as a macro! */
|
1999-12-29 09:20:26 -05:00
|
|
|
int fileno( FILE *stream);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef WIN32
|
|
|
|
#define DIR_CHAR "\\"
|
|
|
|
#define DOT_CHAR "_"
|
|
|
|
#else
|
2000-03-19 14:55:02 -05:00
|
|
|
#ifdef __EMX__
|
|
|
|
/* 20000318 mgs
|
|
|
|
* OS/2 supports leading dots in filenames if the volume is formatted
|
|
|
|
* with JFS or HPFS. */
|
|
|
|
#define DIR_CHAR "\\"
|
|
|
|
#define DOT_CHAR "."
|
|
|
|
#else
|
|
|
|
|
2003-05-21 04:08:48 -04:00
|
|
|
#ifdef DJGPP
|
2003-07-05 09:13:49 -04:00
|
|
|
#include <tcp.h>
|
|
|
|
#ifdef word
|
|
|
|
#undef word
|
|
|
|
#endif
|
2003-05-21 04:08:48 -04:00
|
|
|
#define DIR_CHAR "/"
|
|
|
|
#define DOT_CHAR "_"
|
|
|
|
#else
|
|
|
|
|
1999-12-29 09:20:26 -05:00
|
|
|
#define DIR_CHAR "/"
|
|
|
|
#define DOT_CHAR "."
|
|
|
|
|
2003-05-21 04:08:48 -04:00
|
|
|
#endif /* !DJGPP */
|
|
|
|
#endif /* !__EMX__ */
|
|
|
|
#endif /* !WIN32 */
|
1999-12-29 09:20:26 -05:00
|
|
|
|
2002-04-08 18:44:33 -04:00
|
|
|
#ifdef __riscos__
|
|
|
|
#define USE_ENVIRONMENT
|
|
|
|
#endif
|
|
|
|
|
2003-10-05 11:05:04 -04:00
|
|
|
#ifdef __BEOS__
|
|
|
|
#define typedef_bool
|
|
|
|
#endif
|
|
|
|
|
2007-06-30 19:45:57 -04:00
|
|
|
#if (defined(NETWARE) && !defined(__NOVELL_LIBC__))
|
|
|
|
#include <sys/timeval.h>
|
|
|
|
#endif
|
|
|
|
|
2006-04-07 17:50:47 -04:00
|
|
|
#ifndef UNPRINTABLE_CHAR
|
|
|
|
/* define what to use for unprintable characters */
|
|
|
|
#define UNPRINTABLE_CHAR '.'
|
|
|
|
#endif
|
|
|
|
|
2006-07-11 13:02:06 -04:00
|
|
|
#ifndef HAVE_STRDUP
|
|
|
|
#include "strdup.h"
|
|
|
|
#define strdup(ptr) curlx_strdup(ptr)
|
|
|
|
#endif
|
|
|
|
|
2006-10-17 23:41:19 -04:00
|
|
|
/*
|
|
|
|
* Include macros and defines that should only be processed once.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __SETUP_ONCE_H
|
|
|
|
#include "setup_once.h"
|
2006-10-17 17:32:56 -04:00
|
|
|
#endif
|
|
|
|
|
2005-12-17 15:37:53 -05:00
|
|
|
#endif /* __SRC_CURL_SETUP_H */
|