mirror of
https://github.com/moparisthebest/curl
synced 2024-12-21 15:48:49 -05:00
Changes for PellesC compiler under Win32. A bit limited, but
we just love swedish products...
This commit is contained in:
parent
5f487123df
commit
7b51aafa86
@ -87,7 +87,8 @@
|
|||||||
#define HAVE_TIME_H 1
|
#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
|
||||||
|
|
||||||
@ -181,7 +182,7 @@
|
|||||||
#define HAVE_STRSTR 1
|
#define HAVE_STRSTR 1
|
||||||
|
|
||||||
/* Define if you have the strtoll function. */
|
/* Define if you have the strtoll function. */
|
||||||
#if defined(__MINGW32__) || defined(__WATCOMC__)
|
#if defined(__MINGW32__) || defined(__WATCOMC__) || defined(__POCC__)
|
||||||
#define HAVE_STRTOLL 1
|
#define HAVE_STRTOLL 1
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -216,7 +217,7 @@
|
|||||||
/* #define size_t unsigned */
|
/* #define size_t unsigned */
|
||||||
|
|
||||||
/* Define to 'int' if ssize_t is not an available 'typedefed' type */
|
/* Define to 'int' if ssize_t is not an available 'typedefed' type */
|
||||||
#if defined(__WATCOMC__) && (__WATCOMC__ >= 1240)
|
#if (defined(__WATCOMC__) && (__WATCOMC__ >= 1240)) || defined(__POCC__)
|
||||||
#else
|
#else
|
||||||
#define ssize_t int
|
#define ssize_t int
|
||||||
#endif
|
#endif
|
||||||
@ -242,8 +243,8 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Define SIZEOF_CURL_OFF_T as computed by sizeof(curl_off_t) */
|
/* Define SIZEOF_CURL_OFF_T as computed by sizeof(curl_off_t) */
|
||||||
/* Borland lacks _lseeki64(), so we don't support >2GB files. */
|
/* Borland/PellesC lacks _lseeki64(), so we don't support >2GB files. */
|
||||||
#ifdef __BORLANDC__
|
#if defined(__BORLANDC__) || defined(__POCC__)
|
||||||
#define SIZEOF_CURL_OFF_T 4
|
#define SIZEOF_CURL_OFF_T 4
|
||||||
#else
|
#else
|
||||||
#define SIZEOF_CURL_OFF_T 8
|
#define SIZEOF_CURL_OFF_T 8
|
||||||
|
24
lib/setup.h
24
lib/setup.h
@ -70,10 +70,10 @@
|
|||||||
|
|
||||||
#endif /* HAVE_CONFIG_H */
|
#endif /* HAVE_CONFIG_H */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Include header files for windows builds before redefining anything.
|
* Include header files for windows builds before redefining anything.
|
||||||
* Use this preproessor block only to include or exclude windows.h,
|
* Use this preproessor block only to include or exclude windows.h,
|
||||||
* winsock2.h, ws2tcpip.h or winsock.h. Any other windows thing belongs
|
* winsock2.h, ws2tcpip.h or winsock.h. Any other windows thing belongs
|
||||||
* to any other further and independant block.
|
* to any other further and independant block.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -153,6 +153,21 @@ typedef unsigned char bool;
|
|||||||
#include <curl/stdcheaders.h>
|
#include <curl/stdcheaders.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* PellesC cludge 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__
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#if (__POCC__ <= 400)
|
||||||
|
#define sys_nerr EILSEQ /* for strerror.c */
|
||||||
|
#define EINTR -1 /* for select.c */
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined(CURLDEBUG) && defined(HAVE_ASSERT_H)
|
#if defined(CURLDEBUG) && defined(HAVE_ASSERT_H)
|
||||||
#define curlassert(x) assert(x)
|
#define curlassert(x) assert(x)
|
||||||
#else
|
#else
|
||||||
@ -181,6 +196,7 @@ typedef unsigned char bool;
|
|||||||
#define struct_stat struct stat
|
#define struct_stat struct stat
|
||||||
#endif /* Win32 with large file support */
|
#endif /* Win32 with large file support */
|
||||||
|
|
||||||
|
|
||||||
/* Below we define four functions. They should
|
/* Below we define four functions. They should
|
||||||
1. close a socket
|
1. close a socket
|
||||||
2. read from a socket
|
2. read from a socket
|
||||||
@ -287,7 +303,7 @@ typedef int curl_socket_t;
|
|||||||
|
|
||||||
/* "cl -ML" or "cl -MLd" implies a single-threaded runtime library where
|
/* "cl -ML" or "cl -MLd" implies a single-threaded runtime library where
|
||||||
_beginthreadex() is not available */
|
_beginthreadex() is not available */
|
||||||
#if defined(_MSC_VER) && !defined(_MT) && !defined(USE_ARES)
|
#if (defined(_MSC_VER) && !defined(__POCC__)) && !defined(_MT) && !defined(USE_ARES)
|
||||||
#undef USE_THREADING_GETADDRINFO
|
#undef USE_THREADING_GETADDRINFO
|
||||||
#undef USE_THREADING_GETHOSTBYNAME
|
#undef USE_THREADING_GETHOSTBYNAME
|
||||||
#define CURL_NO__BEGINTHREADEX
|
#define CURL_NO__BEGINTHREADEX
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
|
|
||||||
#ifndef HAVE_GETTIMEOFDAY
|
#ifndef HAVE_GETTIMEOFDAY
|
||||||
#if !defined(_WINSOCKAPI_) && !defined(__MINGW32__) && !defined(_AMIGASF) && \
|
#if !defined(_WINSOCKAPI_) && !defined(__MINGW32__) && !defined(_AMIGASF) && \
|
||||||
!defined(__LCC__) && !defined(__WATCOMC__)
|
!defined(__LCC__) && !defined(__WATCOMC__) && !defined(__POCC__)
|
||||||
struct timeval {
|
struct timeval {
|
||||||
long tv_sec;
|
long tv_sec;
|
||||||
long tv_usec;
|
long tv_usec;
|
||||||
|
Loading…
Reference in New Issue
Block a user