mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 23:58:49 -05:00
Fix Pelles C Win32 target compilation issues
This commit is contained in:
parent
6a37135f4d
commit
b2f4308980
@ -25,13 +25,18 @@
|
|||||||
/* ---------------------------------------------------------------- */
|
/* ---------------------------------------------------------------- */
|
||||||
|
|
||||||
/* Define if you have the <getopt.h> header file. */
|
/* Define if you have the <getopt.h> header file. */
|
||||||
#if defined(__MINGW32__)
|
#if defined(__MINGW32__) || defined(__POCC__)
|
||||||
#define HAVE_GETOPT_H 1
|
#define HAVE_GETOPT_H 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define if you have the <limits.h> header file. */
|
/* Define if you have the <limits.h> header file. */
|
||||||
#define HAVE_LIMITS_H 1
|
#define HAVE_LIMITS_H 1
|
||||||
|
|
||||||
|
/* Define if you have the <process.h> header file. */
|
||||||
|
#ifndef __SALFORDC__
|
||||||
|
#define HAVE_PROCESS_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define if you have the <signal.h> header file. */
|
/* Define if you have the <signal.h> header file. */
|
||||||
#define HAVE_SIGNAL_H 1
|
#define HAVE_SIGNAL_H 1
|
||||||
|
|
||||||
@ -41,9 +46,6 @@
|
|||||||
/* Define if you have the <time.h> header file. */
|
/* Define if you have the <time.h> header file. */
|
||||||
#define HAVE_TIME_H 1
|
#define HAVE_TIME_H 1
|
||||||
|
|
||||||
/* Define if you have the <process.h> header file. */
|
|
||||||
#define HAVE_PROCESS_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <unistd.h> header file. */
|
/* Define if you have the <unistd.h> header file. */
|
||||||
#if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__LCC__) || \
|
#if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__LCC__) || \
|
||||||
defined(__POCC__)
|
defined(__POCC__)
|
||||||
@ -57,10 +59,14 @@
|
|||||||
#define HAVE_WINSOCK_H 1
|
#define HAVE_WINSOCK_H 1
|
||||||
|
|
||||||
/* Define if you have the <winsock2.h> header file. */
|
/* Define if you have the <winsock2.h> header file. */
|
||||||
|
#ifndef __SALFORDC__
|
||||||
#define HAVE_WINSOCK2_H 1
|
#define HAVE_WINSOCK2_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define if you have the <ws2tcpip.h> header file. */
|
/* Define if you have the <ws2tcpip.h> header file. */
|
||||||
|
#ifndef __SALFORDC__
|
||||||
#define HAVE_WS2TCPIP_H 1
|
#define HAVE_WS2TCPIP_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- */
|
/* ---------------------------------------------------------------- */
|
||||||
/* OTHER HEADER INFO */
|
/* OTHER HEADER INFO */
|
||||||
@ -79,6 +85,9 @@
|
|||||||
/* FUNCTIONS */
|
/* FUNCTIONS */
|
||||||
/* ---------------------------------------------------------------- */
|
/* ---------------------------------------------------------------- */
|
||||||
|
|
||||||
|
/* Define if you have the gethostname function. */
|
||||||
|
#define HAVE_GETHOSTNAME 1
|
||||||
|
|
||||||
/* Define if you have the ioctlsocket function. */
|
/* Define if you have the ioctlsocket function. */
|
||||||
#define HAVE_IOCTLSOCKET 1
|
#define HAVE_IOCTLSOCKET 1
|
||||||
|
|
||||||
@ -100,9 +109,6 @@
|
|||||||
/* Define if you have the strnicmp function. */
|
/* Define if you have the strnicmp function. */
|
||||||
#define HAVE_STRNICMP 1
|
#define HAVE_STRNICMP 1
|
||||||
|
|
||||||
/* Define if you have the gethostname function. */
|
|
||||||
#define HAVE_GETHOSTNAME 1
|
|
||||||
|
|
||||||
/* Define if you have the recv function. */
|
/* Define if you have the recv function. */
|
||||||
#define HAVE_RECV 1
|
#define HAVE_RECV 1
|
||||||
|
|
||||||
@ -197,14 +203,16 @@
|
|||||||
|
|
||||||
/* Define ssize_t if it is not an available 'typedefed' type */
|
/* Define ssize_t if it is not an available 'typedefed' type */
|
||||||
#ifndef _SSIZE_T_DEFINED
|
#ifndef _SSIZE_T_DEFINED
|
||||||
#if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || defined(__POCC__) || \
|
# if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || \
|
||||||
defined(__MINGW32__)
|
defined(__POCC__) || \
|
||||||
#elif defined(_WIN64)
|
defined(__MINGW32__)
|
||||||
#define ssize_t __int64
|
# elif defined(_WIN64)
|
||||||
#else
|
# define _SSIZE_T_DEFINED
|
||||||
#define ssize_t int
|
# define ssize_t __int64
|
||||||
#endif
|
# else
|
||||||
#define _SSIZE_T_DEFINED
|
# define _SSIZE_T_DEFINED
|
||||||
|
# define ssize_t int
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- */
|
/* ---------------------------------------------------------------- */
|
||||||
@ -215,7 +223,9 @@
|
|||||||
#define HAVE_STRUCT_ADDRINFO 1
|
#define HAVE_STRUCT_ADDRINFO 1
|
||||||
|
|
||||||
/* Define this if you have struct sockaddr_storage */
|
/* Define this if you have struct sockaddr_storage */
|
||||||
|
#ifndef __SALFORDC__
|
||||||
#define HAVE_STRUCT_SOCKADDR_STORAGE 1
|
#define HAVE_STRUCT_SOCKADDR_STORAGE 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define this if you have struct timeval */
|
/* Define this if you have struct timeval */
|
||||||
#define HAVE_STRUCT_TIMEVAL 1
|
#define HAVE_STRUCT_TIMEVAL 1
|
||||||
@ -260,10 +270,25 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Availability of freeaddrinfo, getaddrinfo and getnameinfo functions is quite */
|
/* When no build target is specified Pelles C 5.00 and later default build
|
||||||
/* convoluted, compiler dependant and in some cases even build target dependat. */
|
target is Windows Vista. We override default target to be Windows 2000. */
|
||||||
|
#if defined(__POCC__) && (__POCC__ >= 500)
|
||||||
|
# ifndef _WIN32_WINNT
|
||||||
|
# define _WIN32_WINNT 0x0500
|
||||||
|
# endif
|
||||||
|
# ifndef WINVER
|
||||||
|
# define WINVER 0x0500
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Availability of freeaddrinfo, getaddrinfo and getnameinfo functions is
|
||||||
|
quite convoluted, compiler dependent and even build target dependent. */
|
||||||
#if defined(HAVE_WS2TCPIP_H)
|
#if defined(HAVE_WS2TCPIP_H)
|
||||||
# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
|
# if defined(__POCC__)
|
||||||
|
# define HAVE_FREEADDRINFO 1
|
||||||
|
# define HAVE_GETADDRINFO 1
|
||||||
|
# define HAVE_GETNAMEINFO 1
|
||||||
|
# elif defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
|
||||||
# define HAVE_FREEADDRINFO 1
|
# define HAVE_FREEADDRINFO 1
|
||||||
# define HAVE_GETADDRINFO 1
|
# define HAVE_GETADDRINFO 1
|
||||||
# define HAVE_GETNAMEINFO 1
|
# define HAVE_GETNAMEINFO 1
|
||||||
@ -274,6 +299,15 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__POCC__)
|
||||||
|
# ifndef _MSC_VER
|
||||||
|
# error Microsoft extensions /Ze compiler option is required
|
||||||
|
# endif
|
||||||
|
# ifndef __POCC__OLDNAMES
|
||||||
|
# error Compatibility names /Go compiler option is required
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- */
|
/* ---------------------------------------------------------------- */
|
||||||
/* IPV6 COMPATIBILITY */
|
/* IPV6 COMPATIBILITY */
|
||||||
/* ---------------------------------------------------------------- */
|
/* ---------------------------------------------------------------- */
|
||||||
|
@ -147,6 +147,12 @@
|
|||||||
|
|
||||||
#endif /* HAVE_CONFIG_H */
|
#endif /* HAVE_CONFIG_H */
|
||||||
|
|
||||||
|
#ifdef __POCC__
|
||||||
|
# include <sys/types.h>
|
||||||
|
# include <unistd.h>
|
||||||
|
# define ESRCH 3
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Recent autoconf versions define these symbols in ares_config.h. We don't
|
* Recent autoconf versions define these symbols in ares_config.h. We don't
|
||||||
* want them (since they collide with the libcurl ones when we build
|
* want them (since they collide with the libcurl ones when we build
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@ -72,4 +72,10 @@ BOOL amiga_init()
|
|||||||
ADD2EXIT(amiga_cleanup,-50);
|
ADD2EXIT(amiga_cleanup,-50);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#else /* __AMIGA__ */
|
||||||
|
|
||||||
|
#ifdef __POCC__
|
||||||
|
# pragma warn(disable:2024) /* Disable warning #2024: Empty input file */
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* __AMIGA__ */
|
#endif /* __AMIGA__ */
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
#define HAVE_LIMITS_H 1
|
#define HAVE_LIMITS_H 1
|
||||||
|
|
||||||
/* Define if you need the malloc.h header file even with stdlib.h */
|
/* Define if you need the malloc.h header file even with stdlib.h */
|
||||||
#ifndef __SALFORDC__
|
#if !defined(__SALFORDC__) && !defined(__POCC__)
|
||||||
#define NEED_MALLOC_H 1
|
#define NEED_MALLOC_H 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -82,7 +82,7 @@
|
|||||||
/* Define if you have the <sys/types.h> header file. */
|
/* Define if you have the <sys/types.h> header file. */
|
||||||
#define HAVE_SYS_TYPES_H 1
|
#define HAVE_SYS_TYPES_H 1
|
||||||
|
|
||||||
/* Define if you have the <sys/utime.h> header file */
|
/* Define if you have the <sys/utime.h> header file. */
|
||||||
#ifndef __BORLANDC__
|
#ifndef __BORLANDC__
|
||||||
#define HAVE_SYS_UTIME_H 1
|
#define HAVE_SYS_UTIME_H 1
|
||||||
#endif
|
#endif
|
||||||
@ -108,11 +108,13 @@
|
|||||||
/* Define if you have the <winsock.h> header file. */
|
/* Define if you have the <winsock.h> header file. */
|
||||||
#define HAVE_WINSOCK_H 1
|
#define HAVE_WINSOCK_H 1
|
||||||
|
|
||||||
#ifndef __SALFORDC__
|
|
||||||
/* Define if you have the <winsock2.h> header file. */
|
/* Define if you have the <winsock2.h> header file. */
|
||||||
|
#ifndef __SALFORDC__
|
||||||
#define HAVE_WINSOCK2_H 1
|
#define HAVE_WINSOCK2_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define if you have the <ws2tcpip.h> header file. */
|
/* Define if you have the <ws2tcpip.h> header file. */
|
||||||
|
#ifndef __SALFORDC__
|
||||||
#define HAVE_WS2TCPIP_H 1
|
#define HAVE_WS2TCPIP_H 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -315,14 +317,16 @@
|
|||||||
|
|
||||||
/* Define ssize_t if it is not an available 'typedefed' type */
|
/* Define ssize_t if it is not an available 'typedefed' type */
|
||||||
#ifndef _SSIZE_T_DEFINED
|
#ifndef _SSIZE_T_DEFINED
|
||||||
#if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || defined(__POCC__) || \
|
# if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || \
|
||||||
defined(__MINGW32__)
|
defined(__POCC__) || \
|
||||||
#elif defined(_WIN64)
|
defined(__MINGW32__)
|
||||||
#define ssize_t __int64
|
# elif defined(_WIN64)
|
||||||
#else
|
# define _SSIZE_T_DEFINED
|
||||||
#define ssize_t int
|
# define ssize_t __int64
|
||||||
#endif
|
# else
|
||||||
#define _SSIZE_T_DEFINED
|
# define _SSIZE_T_DEFINED
|
||||||
|
# define ssize_t int
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- */
|
/* ---------------------------------------------------------------- */
|
||||||
@ -437,11 +441,25 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* When no build target is specified Pelles C 5.00 and later default build
|
||||||
|
target is Windows Vista. We override default target to be Windows 2000. */
|
||||||
|
#if defined(__POCC__) && (__POCC__ >= 500)
|
||||||
|
# ifndef _WIN32_WINNT
|
||||||
|
# define _WIN32_WINNT 0x0500
|
||||||
|
# endif
|
||||||
|
# ifndef WINVER
|
||||||
|
# define WINVER 0x0500
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Availability of freeaddrinfo, getaddrinfo and getnameinfo functions is
|
/* Availability of freeaddrinfo, getaddrinfo and getnameinfo functions is
|
||||||
quite convoluted, compiler dependant and in some cases even build target
|
quite convoluted, compiler dependent and even build target dependent. */
|
||||||
dependant. */
|
|
||||||
#if defined(HAVE_WS2TCPIP_H)
|
#if defined(HAVE_WS2TCPIP_H)
|
||||||
# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
|
# if defined(__POCC__)
|
||||||
|
# define HAVE_FREEADDRINFO 1
|
||||||
|
# define HAVE_GETADDRINFO 1
|
||||||
|
# define HAVE_GETNAMEINFO 1
|
||||||
|
# elif defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
|
||||||
# define HAVE_FREEADDRINFO 1
|
# define HAVE_FREEADDRINFO 1
|
||||||
# define HAVE_GETADDRINFO 1
|
# define HAVE_GETADDRINFO 1
|
||||||
# define HAVE_GETNAMEINFO 1
|
# define HAVE_GETNAMEINFO 1
|
||||||
@ -452,6 +470,15 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__POCC__)
|
||||||
|
# ifndef _MSC_VER
|
||||||
|
# error Microsoft extensions /Ze compiler option is required
|
||||||
|
# endif
|
||||||
|
# ifndef __POCC__OLDNAMES
|
||||||
|
# error Compatibility names /Go compiler option is required
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- */
|
/* ---------------------------------------------------------------- */
|
||||||
/* LARGE FILE SUPPORT */
|
/* LARGE FILE SUPPORT */
|
||||||
/* ---------------------------------------------------------------- */
|
/* ---------------------------------------------------------------- */
|
||||||
@ -468,6 +495,10 @@
|
|||||||
# define USE_WIN32_LARGE_FILES
|
# define USE_WIN32_LARGE_FILES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__POCC__)
|
||||||
|
# undef USE_WIN32_LARGE_FILES
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(USE_WIN32_LARGE_FILES) && !defined(USE_WIN32_SMALL_FILES)
|
#if !defined(USE_WIN32_LARGE_FILES) && !defined(USE_WIN32_SMALL_FILES)
|
||||||
# define USE_WIN32_SMALL_FILES
|
# define USE_WIN32_SMALL_FILES
|
||||||
#endif
|
#endif
|
||||||
@ -491,6 +522,10 @@
|
|||||||
#define CURL_LDAP_WIN 1
|
#define CURL_LDAP_WIN 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__POCC__) && defined(CURL_LDAP_WIN)
|
||||||
|
# define CURL_DISABLE_LDAP 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- */
|
/* ---------------------------------------------------------------- */
|
||||||
/* ADDITIONAL DEFINITIONS */
|
/* ADDITIONAL DEFINITIONS */
|
||||||
/* ---------------------------------------------------------------- */
|
/* ---------------------------------------------------------------- */
|
||||||
@ -510,5 +545,8 @@
|
|||||||
/* Name of package */
|
/* Name of package */
|
||||||
#define PACKAGE "curl"
|
#define PACKAGE "curl"
|
||||||
|
|
||||||
|
#if defined(__POCC__)
|
||||||
|
# define ENABLE_IPV6 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* __LIB_CONFIG_WIN32_H */
|
#endif /* __LIB_CONFIG_WIN32_H */
|
||||||
|
@ -206,7 +206,7 @@ static long init_flags;
|
|||||||
#define system_strdup strdup
|
#define system_strdup strdup
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(_DLL)
|
#if defined(_MSC_VER) && defined(_DLL) && !defined(__POCC__)
|
||||||
# pragma warning(disable:4232) /* MSVC extension, dllimport identity */
|
# pragma warning(disable:4232) /* MSVC extension, dllimport identity */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -232,7 +232,7 @@ curl_strdup_callback Curl_cstrdup;
|
|||||||
curl_calloc_callback Curl_ccalloc;
|
curl_calloc_callback Curl_ccalloc;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER) && defined(_DLL)
|
#if defined(_MSC_VER) && defined(_DLL) && !defined(__POCC__)
|
||||||
# pragma warning(default:4232) /* MSVC extension, dllimport identity */
|
# pragma warning(default:4232) /* MSVC extension, dllimport identity */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2008, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@ -319,4 +319,10 @@ int main ( void )
|
|||||||
|
|
||||||
#endif /* __NOVELL_LIBC__ */
|
#endif /* __NOVELL_LIBC__ */
|
||||||
|
|
||||||
|
#else /* NETWARE */
|
||||||
|
|
||||||
|
#ifdef __POCC__
|
||||||
|
# pragma warn(disable:2024) /* Disable warning #2024: Empty input file */
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* NETWARE */
|
#endif /* NETWARE */
|
||||||
|
10
lib/nwos.c
10
lib/nwos.c
@ -5,7 +5,7 @@
|
|||||||
* | (__| |_| | _ <| |___
|
* | (__| |_| | _ <| |___
|
||||||
* \___|\___/|_| \_\_____|
|
* \___|\___/|_| \_\_____|
|
||||||
*
|
*
|
||||||
* Copyright (C) 1998 - 2007, Daniel Stenberg, <daniel@haxx.se>, et al.
|
* Copyright (C) 1998 - 2009, Daniel Stenberg, <daniel@haxx.se>, et al.
|
||||||
*
|
*
|
||||||
* This software is licensed as described in the file COPYING, which
|
* This software is licensed as described in the file COPYING, which
|
||||||
* you should have received as part of this distribution. The terms
|
* you should have received as part of this distribution. The terms
|
||||||
@ -87,6 +87,10 @@ int __deinit_environment ( void )
|
|||||||
|
|
||||||
#endif /* __NOVELL_LIBC__ */
|
#endif /* __NOVELL_LIBC__ */
|
||||||
|
|
||||||
|
#else /* NETWARE */
|
||||||
|
|
||||||
|
#ifdef __POCC__
|
||||||
|
# pragma warn(disable:2024) /* Disable warning #2024: Empty input file */
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* NETWARE */
|
#endif /* NETWARE */
|
||||||
|
|
||||||
|
|
||||||
|
19
lib/setup.h
19
lib/setup.h
@ -255,19 +255,10 @@
|
|||||||
#include <curl/stdcheaders.h>
|
#include <curl/stdcheaders.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
* PellesC kludge section (yikes);
|
|
||||||
* - It has 'ssize_t', but it is in <unistd.h>. The way the headers
|
|
||||||
* on Win32 are included, forces me to include this header here.
|
|
||||||
* - sys_nerr, EINTR is missing in v4.0 or older.
|
|
||||||
*/
|
|
||||||
#ifdef __POCC__
|
#ifdef __POCC__
|
||||||
#include <sys/types.h>
|
# include <sys/types.h>
|
||||||
#include <unistd.h>
|
# include <unistd.h>
|
||||||
#if (__POCC__ <= 400)
|
# define sys_nerr EILSEQ
|
||||||
#define sys_nerr EILSEQ /* for strerror.c */
|
|
||||||
#define EINTR -1 /* for select.c */
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -427,7 +418,7 @@
|
|||||||
* are available if PSDK is properly installed.
|
* are available if PSDK is properly installed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#if defined(_MSC_VER) && !defined(__POCC__)
|
||||||
# if !defined(HAVE_WINSOCK2_H) || ((_MSC_VER < 1300) && !defined(IPPROTO_ESP))
|
# if !defined(HAVE_WINSOCK2_H) || ((_MSC_VER < 1300) && !defined(IPPROTO_ESP))
|
||||||
# undef HAVE_STRUCT_SOCKADDR_STORAGE
|
# undef HAVE_STRUCT_SOCKADDR_STORAGE
|
||||||
# endif
|
# endif
|
||||||
@ -438,7 +429,7 @@
|
|||||||
* defined in ws2tcpip.h as well as to provide IPv6 support.
|
* defined in ws2tcpip.h as well as to provide IPv6 support.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#if defined(_MSC_VER) && !defined(__POCC__)
|
||||||
# if !defined(HAVE_WS2TCPIP_H) || ((_MSC_VER < 1300) && !defined(INET6_ADDRSTRLEN))
|
# if !defined(HAVE_WS2TCPIP_H) || ((_MSC_VER < 1300) && !defined(INET6_ADDRSTRLEN))
|
||||||
# undef HAVE_FREEADDRINFO
|
# undef HAVE_FREEADDRINFO
|
||||||
# undef HAVE_GETADDRINFO
|
# undef HAVE_GETADDRINFO
|
||||||
|
@ -21,25 +21,34 @@
|
|||||||
/* Define if you have the <locale.h> header file. */
|
/* Define if you have the <locale.h> header file. */
|
||||||
#define HAVE_LOCALE_H 1
|
#define HAVE_LOCALE_H 1
|
||||||
|
|
||||||
|
/* Define if you need the malloc.h header file even with stdlib.h */
|
||||||
|
#if !defined(__SALFORDC__) && !defined(__POCC__)
|
||||||
|
#define NEED_MALLOC_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define if you have the <signal.h> header file. */
|
/* Define if you have the <signal.h> header file. */
|
||||||
#define HAVE_SIGNAL_H 1
|
#define HAVE_SIGNAL_H 1
|
||||||
|
|
||||||
|
/* Define if you have the <stdlib.h> header file. */
|
||||||
|
#define HAVE_STDLIB_H 1
|
||||||
|
|
||||||
/* Define if you have the <sys/time.h> header file */
|
/* Define if you have the <sys/time.h> header file */
|
||||||
/* #define HAVE_SYS_TIME_H 1 */
|
/* #define HAVE_SYS_TIME_H 1 */
|
||||||
|
|
||||||
/* Define if you have the <sys/types.h> header file. */
|
/* Define if you have the <sys/types.h> header file. */
|
||||||
#define HAVE_SYS_TYPES_H 1
|
#define HAVE_SYS_TYPES_H 1
|
||||||
|
|
||||||
/* Define if you have the <time.h> header file. */
|
|
||||||
#define HAVE_TIME_H 1
|
|
||||||
|
|
||||||
/* Define if you have the <sys/utime.h> header file. */
|
/* Define if you have the <sys/utime.h> header file. */
|
||||||
#ifndef __BORLANDC__
|
#ifndef __BORLANDC__
|
||||||
#define HAVE_SYS_UTIME_H 1
|
#define HAVE_SYS_UTIME_H 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Define if you have the <time.h> header file. */
|
||||||
|
#define HAVE_TIME_H 1
|
||||||
|
|
||||||
/* Define if you have the <unistd.h> header file. */
|
/* Define if you have the <unistd.h> header file. */
|
||||||
#if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__LCC__)
|
#if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__LCC__) || \
|
||||||
|
defined(__POCC__)
|
||||||
#define HAVE_UNISTD_H 1
|
#define HAVE_UNISTD_H 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -50,10 +59,14 @@
|
|||||||
#define HAVE_WINSOCK_H 1
|
#define HAVE_WINSOCK_H 1
|
||||||
|
|
||||||
/* Define if you have the <winsock2.h> header file. */
|
/* Define if you have the <winsock2.h> header file. */
|
||||||
|
#ifndef __SALFORDC__
|
||||||
#define HAVE_WINSOCK2_H 1
|
#define HAVE_WINSOCK2_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define if you have the <ws2tcpip.h> header file. */
|
/* Define if you have the <ws2tcpip.h> header file. */
|
||||||
|
#ifndef __SALFORDC__
|
||||||
#define HAVE_WS2TCPIP_H 1
|
#define HAVE_WS2TCPIP_H 1
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- */
|
/* ---------------------------------------------------------------- */
|
||||||
/* OTHER HEADER INFO */
|
/* OTHER HEADER INFO */
|
||||||
@ -182,14 +195,16 @@
|
|||||||
|
|
||||||
/* Define ssize_t if it is not an available 'typedefed' type */
|
/* Define ssize_t if it is not an available 'typedefed' type */
|
||||||
#ifndef _SSIZE_T_DEFINED
|
#ifndef _SSIZE_T_DEFINED
|
||||||
#if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || defined(__POCC__) || \
|
# if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || \
|
||||||
defined(__MINGW32__)
|
defined(__POCC__) || \
|
||||||
#elif defined(_WIN64)
|
defined(__MINGW32__)
|
||||||
#define ssize_t __int64
|
# elif defined(_WIN64)
|
||||||
#else
|
# define _SSIZE_T_DEFINED
|
||||||
#define ssize_t int
|
# define ssize_t __int64
|
||||||
#endif
|
# else
|
||||||
#define _SSIZE_T_DEFINED
|
# define _SSIZE_T_DEFINED
|
||||||
|
# define ssize_t int
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- */
|
/* ---------------------------------------------------------------- */
|
||||||
@ -297,11 +312,25 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* When no build target is specified Pelles C 5.00 and later default build
|
||||||
|
target is Windows Vista. We override default target to be Windows 2000. */
|
||||||
|
#if defined(__POCC__) && (__POCC__ >= 500)
|
||||||
|
# ifndef _WIN32_WINNT
|
||||||
|
# define _WIN32_WINNT 0x0500
|
||||||
|
# endif
|
||||||
|
# ifndef WINVER
|
||||||
|
# define WINVER 0x0500
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Availability of freeaddrinfo, getaddrinfo and getnameinfo functions is
|
/* Availability of freeaddrinfo, getaddrinfo and getnameinfo functions is
|
||||||
quite convoluted, compiler dependant and in some cases even build target
|
quite convoluted, compiler dependent and even build target dependent. */
|
||||||
dependant. */
|
|
||||||
#if defined(HAVE_WS2TCPIP_H)
|
#if defined(HAVE_WS2TCPIP_H)
|
||||||
# if defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
|
# if defined(__POCC__)
|
||||||
|
# define HAVE_FREEADDRINFO 1
|
||||||
|
# define HAVE_GETADDRINFO 1
|
||||||
|
# define HAVE_GETNAMEINFO 1
|
||||||
|
# elif defined(_WIN32_WINNT) && (_WIN32_WINNT >= 0x0501)
|
||||||
# define HAVE_FREEADDRINFO 1
|
# define HAVE_FREEADDRINFO 1
|
||||||
# define HAVE_GETADDRINFO 1
|
# define HAVE_GETADDRINFO 1
|
||||||
# define HAVE_GETNAMEINFO 1
|
# define HAVE_GETNAMEINFO 1
|
||||||
@ -312,6 +341,15 @@
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__POCC__)
|
||||||
|
# ifndef _MSC_VER
|
||||||
|
# error Microsoft extensions /Ze compiler option is required
|
||||||
|
# endif
|
||||||
|
# ifndef __POCC__OLDNAMES
|
||||||
|
# error Compatibility names /Go compiler option is required
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
/* ---------------------------------------------------------------- */
|
/* ---------------------------------------------------------------- */
|
||||||
/* LARGE FILE SUPPORT */
|
/* LARGE FILE SUPPORT */
|
||||||
/* ---------------------------------------------------------------- */
|
/* ---------------------------------------------------------------- */
|
||||||
@ -328,6 +366,10 @@
|
|||||||
# define USE_WIN32_LARGE_FILES
|
# define USE_WIN32_LARGE_FILES
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__POCC__)
|
||||||
|
# undef USE_WIN32_LARGE_FILES
|
||||||
|
#endif
|
||||||
|
|
||||||
#if !defined(USE_WIN32_LARGE_FILES) && !defined(USE_WIN32_SMALL_FILES)
|
#if !defined(USE_WIN32_LARGE_FILES) && !defined(USE_WIN32_SMALL_FILES)
|
||||||
# define USE_WIN32_SMALL_FILES
|
# define USE_WIN32_SMALL_FILES
|
||||||
#endif
|
#endif
|
||||||
@ -344,5 +386,8 @@
|
|||||||
/* Define to 1 if you want the built-in manual */
|
/* Define to 1 if you want the built-in manual */
|
||||||
#define USE_MANUAL 1
|
#define USE_MANUAL 1
|
||||||
|
|
||||||
|
#if defined(__POCC__)
|
||||||
|
# define ENABLE_IPV6 1
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif /* __SRC_CONFIG_WIN32_H */
|
#endif /* __SRC_CONFIG_WIN32_H */
|
||||||
|
28
src/main.c
28
src/main.c
@ -264,10 +264,12 @@ typedef enum {
|
|||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
# include <direct.h>
|
# include <direct.h>
|
||||||
# define F_OK 0
|
|
||||||
# define mkdir(x,y) (mkdir)(x)
|
# define mkdir(x,y) (mkdir)(x)
|
||||||
# undef PATH_MAX
|
# undef PATH_MAX
|
||||||
# define PATH_MAX MAX_PATH
|
# define PATH_MAX MAX_PATH
|
||||||
|
# ifndef __POCC__
|
||||||
|
# define F_OK 0
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -407,18 +409,29 @@ char convert_char(curl_infotype infotype, char this_char)
|
|||||||
#endif /* CURL_DOES_CONVERSIONS */
|
#endif /* CURL_DOES_CONVERSIONS */
|
||||||
|
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
/*
|
|
||||||
* Truncate a file handle at a 64-bit position 'where'.
|
|
||||||
* Borland doesn't even support 64-bit types.
|
|
||||||
*/
|
|
||||||
#ifdef __BORLANDC__
|
#ifdef __BORLANDC__
|
||||||
#define _lseeki64(hnd,ofs,whence) lseek(hnd,ofs,whence)
|
/* 64-bit lseek-like function unavailable */
|
||||||
|
# define _lseeki64(hnd,ofs,whence) lseek(hnd,ofs,whence)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __POCC__
|
||||||
|
# if (__POCC__ < 450)
|
||||||
|
/* 64-bit lseek-like function unavailable */
|
||||||
|
# define _lseeki64(hnd,ofs,whence) _lseek(hnd,ofs,whence)
|
||||||
|
# else
|
||||||
|
# define _lseeki64(hnd,ofs,whence) _lseek64(hnd,ofs,whence)
|
||||||
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_FTRUNCATE
|
#ifndef HAVE_FTRUNCATE
|
||||||
#define HAVE_FTRUNCATE 1
|
#define HAVE_FTRUNCATE 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Truncate a file handle at a 64-bit position 'where'.
|
||||||
|
*/
|
||||||
|
|
||||||
static int ftruncate64 (int fd, curl_off_t where)
|
static int ftruncate64 (int fd, curl_off_t where)
|
||||||
{
|
{
|
||||||
if(_lseeki64(fd, where, SEEK_SET) < 0)
|
if(_lseeki64(fd, where, SEEK_SET) < 0)
|
||||||
@ -430,7 +443,8 @@ static int ftruncate64 (int fd, curl_off_t where)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
#define ftruncate(fd,where) ftruncate64(fd,where)
|
#define ftruncate(fd,where) ftruncate64(fd,where)
|
||||||
#endif
|
|
||||||
|
#endif /* WIN32 */
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
TRACE_NONE, /* no trace/verbose output at all! */
|
TRACE_NONE, /* no trace/verbose output at all! */
|
||||||
|
Loading…
Reference in New Issue
Block a user