diff options
author | Daniel Stenberg <daniel@haxx.se> | 2017-05-22 09:05:10 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2017-06-14 11:07:33 +0200 |
commit | 73a2fcea0b4adea6ba342cd7ed1149782c214ae3 (patch) | |
tree | 096ddd19a67c16bf788c3b8743f11de9dd5fba92 /include/curl/system.h | |
parent | 54b636f14546d3fde9f9c67c3b32701d78563161 (diff) | |
download | curl-73a2fcea0b4adea6ba342cd7ed1149782c214ae3.tar.gz |
includes: remove curl/curlbuild.h and curl/curlrules.h
Rely entirely on curl/system.h now.
Introduced in Aug 2008 with commit 14240e9e109f. Now gone.
Fixes #1456
Diffstat (limited to 'include/curl/system.h')
-rw-r--r-- | include/curl/system.h | 646 |
1 files changed, 343 insertions, 303 deletions
diff --git a/include/curl/system.h b/include/curl/system.h index ed3a55c95..c43753688 100644 --- a/include/curl/system.h +++ b/include/curl/system.h @@ -23,14 +23,6 @@ ***************************************************************************/ /* - * This header is supposed to eventually replace curlbuild.h. This little one - * is still learning. During the experimental phase, this header files - * defines symbols using the prefixes CURLSYS_ or curlsys_. When we feel - * confident enough, we replace curlbuild.h with this file and rename all - * prefixes to CURL_ and curl_. - */ - -/* * Try to keep one section per platform, compiler and architecture, otherwise, * if an existing section is reused for a different one and later on the * original is adjusted, probably the piggybacking one can be adversely @@ -60,323 +52,323 @@ #if defined(__DJGPP__) || defined(__GO32__) # if defined(__DJGPP__) && (__DJGPP__ > 1) -# define CURLSYS_SIZEOF_LONG 4 -# define CURLSYS_TYPEOF_CURL_OFF_T long long -# define CURLSYS_FORMAT_CURL_OFF_T "lld" -# define CURLSYS_FORMAT_CURL_OFF_TU "llu" -# define CURLSYS_SIZEOF_CURL_OFF_T 8 -# define CURLSYS_SUFFIX_CURL_OFF_T LL -# define CURLSYS_SUFFIX_CURL_OFF_TU ULL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL # else -# define CURLSYS_SIZEOF_LONG 4 -# define CURLSYS_TYPEOF_CURL_OFF_T long -# define CURLSYS_FORMAT_CURL_OFF_T "ld" -# define CURLSYS_FORMAT_CURL_OFF_TU "lu" -# define CURLSYS_SIZEOF_CURL_OFF_T 4 -# define CURLSYS_SUFFIX_CURL_OFF_T L -# define CURLSYS_SUFFIX_CURL_OFF_TU UL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL # endif -# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int -# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__SALFORDC__) -# define CURLSYS_SIZEOF_LONG 4 -# define CURLSYS_TYPEOF_CURL_OFF_T long -# define CURLSYS_FORMAT_CURL_OFF_T "ld" -# define CURLSYS_FORMAT_CURL_OFF_TU "lu" -# define CURLSYS_SIZEOF_CURL_OFF_T 4 -# define CURLSYS_SUFFIX_CURL_OFF_T L -# define CURLSYS_SUFFIX_CURL_OFF_TU UL -# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int -# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__BORLANDC__) # if (__BORLANDC__ < 0x520) -# define CURLSYS_SIZEOF_LONG 4 -# define CURLSYS_TYPEOF_CURL_OFF_T long -# define CURLSYS_FORMAT_CURL_OFF_T "ld" -# define CURLSYS_FORMAT_CURL_OFF_TU "lu" -# define CURLSYS_SIZEOF_CURL_OFF_T 4 -# define CURLSYS_SUFFIX_CURL_OFF_T L -# define CURLSYS_SUFFIX_CURL_OFF_TU UL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL # else -# define CURLSYS_SIZEOF_LONG 4 -# define CURLSYS_TYPEOF_CURL_OFF_T __int64 -# define CURLSYS_FORMAT_CURL_OFF_T "I64d" -# define CURLSYS_FORMAT_CURL_OFF_TU "I64u" -# define CURLSYS_SIZEOF_CURL_OFF_T 8 -# define CURLSYS_SUFFIX_CURL_OFF_T i64 -# define CURLSYS_SUFFIX_CURL_OFF_TU ui64 +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T __int64 +# define CURL_FORMAT_CURL_OFF_T "I64d" +# define CURL_FORMAT_CURL_OFF_TU "I64u" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T i64 +# define CURL_SUFFIX_CURL_OFF_TU ui64 # endif -# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int -# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__TURBOC__) -# define CURLSYS_SIZEOF_LONG 4 -# define CURLSYS_TYPEOF_CURL_OFF_T long -# define CURLSYS_FORMAT_CURL_OFF_T "ld" -# define CURLSYS_FORMAT_CURL_OFF_TU "lu" -# define CURLSYS_SIZEOF_CURL_OFF_T 4 -# define CURLSYS_SUFFIX_CURL_OFF_T L -# define CURLSYS_SUFFIX_CURL_OFF_TU UL -# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int -# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__WATCOMC__) # if defined(__386__) -# define CURLSYS_SIZEOF_LONG 4 -# define CURLSYS_TYPEOF_CURL_OFF_T __int64 -# define CURLSYS_FORMAT_CURL_OFF_T "I64d" -# define CURLSYS_FORMAT_CURL_OFF_TU "I64u" -# define CURLSYS_SIZEOF_CURL_OFF_T 8 -# define CURLSYS_SUFFIX_CURL_OFF_T i64 -# define CURLSYS_SUFFIX_CURL_OFF_TU ui64 +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T __int64 +# define CURL_FORMAT_CURL_OFF_T "I64d" +# define CURL_FORMAT_CURL_OFF_TU "I64u" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T i64 +# define CURL_SUFFIX_CURL_OFF_TU ui64 # else -# define CURLSYS_SIZEOF_LONG 4 -# define CURLSYS_TYPEOF_CURL_OFF_T long -# define CURLSYS_FORMAT_CURL_OFF_T "ld" -# define CURLSYS_FORMAT_CURL_OFF_TU "lu" -# define CURLSYS_SIZEOF_CURL_OFF_T 4 -# define CURLSYS_SUFFIX_CURL_OFF_T L -# define CURLSYS_SUFFIX_CURL_OFF_TU UL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL # endif -# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int -# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__POCC__) # if (__POCC__ < 280) -# define CURLSYS_SIZEOF_LONG 4 -# define CURLSYS_TYPEOF_CURL_OFF_T long -# define CURLSYS_FORMAT_CURL_OFF_T "ld" -# define CURLSYS_FORMAT_CURL_OFF_TU "lu" -# define CURLSYS_SIZEOF_CURL_OFF_T 4 -# define CURLSYS_SUFFIX_CURL_OFF_T L -# define CURLSYS_SUFFIX_CURL_OFF_TU UL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL # elif defined(_MSC_VER) -# define CURLSYS_SIZEOF_LONG 4 -# define CURLSYS_TYPEOF_CURL_OFF_T __int64 -# define CURLSYS_FORMAT_CURL_OFF_T "I64d" -# define CURLSYS_FORMAT_CURL_OFF_TU "I64u" -# define CURLSYS_SIZEOF_CURL_OFF_T 8 -# define CURLSYS_SUFFIX_CURL_OFF_T i64 -# define CURLSYS_SUFFIX_CURL_OFF_TU ui64 +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T __int64 +# define CURL_FORMAT_CURL_OFF_T "I64d" +# define CURL_FORMAT_CURL_OFF_TU "I64u" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T i64 +# define CURL_SUFFIX_CURL_OFF_TU ui64 # else -# define CURLSYS_SIZEOF_LONG 4 -# define CURLSYS_TYPEOF_CURL_OFF_T long long -# define CURLSYS_FORMAT_CURL_OFF_T "lld" -# define CURLSYS_FORMAT_CURL_OFF_TU "llu" -# define CURLSYS_SIZEOF_CURL_OFF_T 8 -# define CURLSYS_SUFFIX_CURL_OFF_T LL -# define CURLSYS_SUFFIX_CURL_OFF_TU ULL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL # endif -# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int -# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__LCC__) -# define CURLSYS_SIZEOF_LONG 4 -# define CURLSYS_TYPEOF_CURL_OFF_T long -# define CURLSYS_FORMAT_CURL_OFF_T "ld" -# define CURLSYS_FORMAT_CURL_OFF_TU "lu" -# define CURLSYS_SIZEOF_CURL_OFF_T 4 -# define CURLSYS_SUFFIX_CURL_OFF_T L -# define CURLSYS_SUFFIX_CURL_OFF_TU UL -# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int -# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__SYMBIAN32__) # if defined(__EABI__) /* Treat all ARM compilers equally */ -# define CURLSYS_SIZEOF_LONG 4 -# define CURLSYS_TYPEOF_CURL_OFF_T long long -# define CURLSYS_FORMAT_CURL_OFF_T "lld" -# define CURLSYS_FORMAT_CURL_OFF_TU "llu" -# define CURLSYS_SIZEOF_CURL_OFF_T 8 -# define CURLSYS_SUFFIX_CURL_OFF_T LL -# define CURLSYS_SUFFIX_CURL_OFF_TU ULL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(__CW32__) # pragma longlong on -# define CURLSYS_SIZEOF_LONG 4 -# define CURLSYS_TYPEOF_CURL_OFF_T long long -# define CURLSYS_FORMAT_CURL_OFF_T "lld" -# define CURLSYS_FORMAT_CURL_OFF_TU "llu" -# define CURLSYS_SIZEOF_CURL_OFF_T 8 -# define CURLSYS_SUFFIX_CURL_OFF_T LL -# define CURLSYS_SUFFIX_CURL_OFF_TU ULL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(__VC32__) -# define CURLSYS_SIZEOF_LONG 4 -# define CURLSYS_TYPEOF_CURL_OFF_T __int64 -# define CURLSYS_FORMAT_CURL_OFF_T "lld" -# define CURLSYS_FORMAT_CURL_OFF_TU "llu" -# define CURLSYS_SIZEOF_CURL_OFF_T 8 -# define CURLSYS_SUFFIX_CURL_OFF_T LL -# define CURLSYS_SUFFIX_CURL_OFF_TU ULL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T __int64 +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL # endif -# define CURLSYS_TYPEOF_CURL_SOCKLEN_T unsigned int -# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__MWERKS__) -# define CURLSYS_SIZEOF_LONG 4 -# define CURLSYS_TYPEOF_CURL_OFF_T long long -# define CURLSYS_FORMAT_CURL_OFF_T "lld" -# define CURLSYS_FORMAT_CURL_OFF_TU "llu" -# define CURLSYS_SIZEOF_CURL_OFF_T 8 -# define CURLSYS_SUFFIX_CURL_OFF_T LL -# define CURLSYS_SUFFIX_CURL_OFF_TU ULL -# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int -# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(_WIN32_WCE) -# define CURLSYS_SIZEOF_LONG 4 -# define CURLSYS_TYPEOF_CURL_OFF_T __int64 -# define CURLSYS_FORMAT_CURL_OFF_T "I64d" -# define CURLSYS_FORMAT_CURL_OFF_TU "I64u" -# define CURLSYS_SIZEOF_CURL_OFF_T 8 -# define CURLSYS_SUFFIX_CURL_OFF_T i64 -# define CURLSYS_SUFFIX_CURL_OFF_TU ui64 -# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int -# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T __int64 +# define CURL_FORMAT_CURL_OFF_T "I64d" +# define CURL_FORMAT_CURL_OFF_TU "I64u" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T i64 +# define CURL_SUFFIX_CURL_OFF_TU ui64 +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__MINGW32__) -# define CURLSYS_SIZEOF_LONG 4 -# define CURLSYS_TYPEOF_CURL_OFF_T long long -# define CURLSYS_FORMAT_CURL_OFF_T "I64d" -# define CURLSYS_FORMAT_CURL_OFF_TU "I64u" -# define CURLSYS_SIZEOF_CURL_OFF_T 8 -# define CURLSYS_SUFFIX_CURL_OFF_T LL -# define CURLSYS_SUFFIX_CURL_OFF_TU ULL -# define CURLSYS_TYPEOF_CURL_SOCKLEN_T socklen_t -# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4 -# define CURLSYS_PULL_SYS_TYPES_H 1 -# define CURLSYS_PULL_WS2TCPIP_H 1 +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "I64d" +# define CURL_FORMAT_CURL_OFF_TU "I64u" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL +# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_PULL_SYS_TYPES_H 1 +# define CURL_PULL_WS2TCPIP_H 1 #elif defined(__VMS) # if defined(__VAX) -# define CURLSYS_SIZEOF_LONG 4 -# define CURLSYS_TYPEOF_CURL_OFF_T long -# define CURLSYS_FORMAT_CURL_OFF_T "ld" -# define CURLSYS_FORMAT_CURL_OFF_TU "lu" -# define CURLSYS_SIZEOF_CURL_OFF_T 4 -# define CURLSYS_SUFFIX_CURL_OFF_T L -# define CURLSYS_SUFFIX_CURL_OFF_TU UL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL # else -# define CURLSYS_SIZEOF_LONG 4 -# define CURLSYS_TYPEOF_CURL_OFF_T long long -# define CURLSYS_FORMAT_CURL_OFF_T "lld" -# define CURLSYS_FORMAT_CURL_OFF_TU "llu" -# define CURLSYS_SIZEOF_CURL_OFF_T 8 -# define CURLSYS_SUFFIX_CURL_OFF_T LL -# define CURLSYS_SUFFIX_CURL_OFF_TU ULL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL # endif -# define CURLSYS_TYPEOF_CURL_SOCKLEN_T unsigned int -# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_TYPEOF_CURL_SOCKLEN_T unsigned int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__OS400__) # if defined(__ILEC400__) -# define CURLSYS_SIZEOF_LONG 4 -# define CURLSYS_TYPEOF_CURL_OFF_T long long -# define CURLSYS_FORMAT_CURL_OFF_T "lld" -# define CURLSYS_FORMAT_CURL_OFF_TU "llu" -# define CURLSYS_SIZEOF_CURL_OFF_T 8 -# define CURLSYS_SUFFIX_CURL_OFF_T LL -# define CURLSYS_SUFFIX_CURL_OFF_TU ULL -# define CURLSYS_TYPEOF_CURL_SOCKLEN_T socklen_t -# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4 -# define CURLSYS_PULL_SYS_TYPES_H 1 -# define CURLSYS_PULL_SYS_SOCKET_H 1 +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL +# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_PULL_SYS_TYPES_H 1 +# define CURL_PULL_SYS_SOCKET_H 1 # endif #elif defined(__MVS__) # if defined(__IBMC__) || defined(__IBMCPP__) # if defined(_ILP32) -# define CURLSYS_SIZEOF_LONG 4 +# define CURL_SIZEOF_LONG 4 # elif defined(_LP64) -# define CURLSYS_SIZEOF_LONG 8 +# define CURL_SIZEOF_LONG 8 # endif # if defined(_LONG_LONG) -# define CURLSYS_TYPEOF_CURL_OFF_T long long -# define CURLSYS_FORMAT_CURL_OFF_T "lld" -# define CURLSYS_FORMAT_CURL_OFF_TU "llu" -# define CURLSYS_SIZEOF_CURL_OFF_T 8 -# define CURLSYS_SUFFIX_CURL_OFF_T LL -# define CURLSYS_SUFFIX_CURL_OFF_TU ULL +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(_LP64) -# define CURLSYS_TYPEOF_CURL_OFF_T long -# define CURLSYS_FORMAT_CURL_OFF_T "ld" -# define CURLSYS_FORMAT_CURL_OFF_TU "lu" -# define CURLSYS_SIZEOF_CURL_OFF_T 8 -# define CURLSYS_SUFFIX_CURL_OFF_T L -# define CURLSYS_SUFFIX_CURL_OFF_TU UL +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL # else -# define CURLSYS_TYPEOF_CURL_OFF_T long -# define CURLSYS_FORMAT_CURL_OFF_T "ld" -# define CURLSYS_FORMAT_CURL_OFF_TU "lu" -# define CURLSYS_SIZEOF_CURL_OFF_T 4 -# define CURLSYS_SUFFIX_CURL_OFF_T L -# define CURLSYS_SUFFIX_CURL_OFF_TU UL +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL # endif -# define CURLSYS_TYPEOF_CURL_SOCKLEN_T socklen_t -# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4 -# define CURLSYS_PULL_SYS_TYPES_H 1 -# define CURLSYS_PULL_SYS_SOCKET_H 1 +# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_PULL_SYS_TYPES_H 1 +# define CURL_PULL_SYS_SOCKET_H 1 # endif #elif defined(__370__) # if defined(__IBMC__) || defined(__IBMCPP__) # if defined(_ILP32) -# define CURLSYS_SIZEOF_LONG 4 +# define CURL_SIZEOF_LONG 4 # elif defined(_LP64) -# define CURLSYS_SIZEOF_LONG 8 +# define CURL_SIZEOF_LONG 8 # endif # if defined(_LONG_LONG) -# define CURLSYS_TYPEOF_CURL_OFF_T long long -# define CURLSYS_FORMAT_CURL_OFF_T "lld" -# define CURLSYS_FORMAT_CURL_OFF_TU "llu" -# define CURLSYS_SIZEOF_CURL_OFF_T 8 -# define CURLSYS_SUFFIX_CURL_OFF_T LL -# define CURLSYS_SUFFIX_CURL_OFF_TU ULL +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(_LP64) -# define CURLSYS_TYPEOF_CURL_OFF_T long -# define CURLSYS_FORMAT_CURL_OFF_T "ld" -# define CURLSYS_FORMAT_CURL_OFF_TU "lu" -# define CURLSYS_SIZEOF_CURL_OFF_T 8 -# define CURLSYS_SUFFIX_CURL_OFF_T L -# define CURLSYS_SUFFIX_CURL_OFF_TU UL +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL # else -# define CURLSYS_TYPEOF_CURL_OFF_T long -# define CURLSYS_FORMAT_CURL_OFF_T "ld" -# define CURLSYS_FORMAT_CURL_OFF_TU "lu" -# define CURLSYS_SIZEOF_CURL_OFF_T 4 -# define CURLSYS_SUFFIX_CURL_OFF_T L -# define CURLSYS_SUFFIX_CURL_OFF_TU UL +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL # endif -# define CURLSYS_TYPEOF_CURL_SOCKLEN_T socklen_t -# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4 -# define CURLSYS_PULL_SYS_TYPES_H 1 -# define CURLSYS_PULL_SYS_SOCKET_H 1 +# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_PULL_SYS_TYPES_H 1 +# define CURL_PULL_SYS_SOCKET_H 1 # endif #elif defined(TPF) -# define CURLSYS_SIZEOF_LONG 8 -# define CURLSYS_TYPEOF_CURL_OFF_T long -# define CURLSYS_FORMAT_CURL_OFF_T "ld" -# define CURLSYS_FORMAT_CURL_OFF_TU "lu" -# define CURLSYS_SIZEOF_CURL_OFF_T 8 -# define CURLSYS_SUFFIX_CURL_OFF_T L -# define CURLSYS_SUFFIX_CURL_OFF_TU UL -# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int -# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_SIZEOF_LONG 8 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 #elif defined(__TINYC__) /* also known as tcc */ -# define CURLSYS_SIZEOF_LONG 4 -# define CURLSYS_TYPEOF_CURL_OFF_T long long -# define CURLSYS_FORMAT_CURL_OFF_T "lld" -# define CURLSYS_FORMAT_CURL_OFF_TU "llu" -# define CURLSYS_SIZEOF_CURL_OFF_T 8 -# define CURLSYS_SUFFIX_CURL_OFF_T LL -# define CURLSYS_SUFFIX_CURL_OFF_TU ULL -# define CURLSYS_TYPEOF_CURL_SOCKLEN_T socklen_t -# define CURLSYS_PULL_SYS_TYPES_H 1 -# define CURLSYS_PULL_SYS_SOCKET_H 1 +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL +# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t +# define CURL_PULL_SYS_TYPES_H 1 +# define CURL_PULL_SYS_SOCKET_H 1 /* ===================================== */ /* KEEP MSVC THE PENULTIMATE ENTRY */ @@ -384,24 +376,24 @@ #elif defined(_MSC_VER) # if (_MSC_VER >= 900) && (_INTEGRAL_MAX_BITS >= 64) -# define CURLSYS_SIZEOF_LONG 4 -# define CURLSYS_TYPEOF_CURL_OFF_T __int64 -# define CURLSYS_FORMAT_CURL_OFF_T "I64d" -# define CURLSYS_FORMAT_CURL_OFF_TU "I64u" -# define CURLSYS_SIZEOF_CURL_OFF_T 8 -# define CURLSYS_SUFFIX_CURL_OFF_T i64 -# define CURLSYS_SUFFIX_CURL_OFF_TU ui64 +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T __int64 +# define CURL_FORMAT_CURL_OFF_T "I64d" +# define CURL_FORMAT_CURL_OFF_TU "I64u" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T i64 +# define CURL_SUFFIX_CURL_OFF_TU ui64 # else -# define CURLSYS_SIZEOF_LONG 4 -# define CURLSYS_TYPEOF_CURL_OFF_T long -# define CURLSYS_FORMAT_CURL_OFF_T "ld" -# define CURLSYS_FORMAT_CURL_OFF_TU "lu" -# define CURLSYS_SIZEOF_CURL_OFF_T 4 -# define CURLSYS_SUFFIX_CURL_OFF_T L -# define CURLSYS_SUFFIX_CURL_OFF_TU UL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL # endif -# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int -# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 /* ===================================== */ /* KEEP GENERIC GCC THE LAST ENTRY */ @@ -411,39 +403,39 @@ # if !defined(__LP64__) && (defined(__ILP32__) || \ defined(__i386__) || defined(__ppc__) || defined(__arm__) || \ defined(__sparc__) || defined(__mips__) || defined(__sh__)) -# define CURLSYS_SIZEOF_LONG 4 -# define CURLSYS_TYPEOF_CURL_OFF_T long long -# define CURLSYS_FORMAT_CURL_OFF_T "lld" -# define CURLSYS_FORMAT_CURL_OFF_TU "llu" -# define CURLSYS_SIZEOF_CURL_OFF_T 8 -# define CURLSYS_SUFFIX_CURL_OFF_T LL -# define CURLSYS_SUFFIX_CURL_OFF_TU ULL +# define CURL_SIZEOF_LONG 4 +# define CURL_TYPEOF_CURL_OFF_T long long +# define CURL_FORMAT_CURL_OFF_T "lld" +# define CURL_FORMAT_CURL_OFF_TU "llu" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T LL +# define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(__LP64__) || \ defined(__x86_64__) || defined(__ppc64__) || defined(__sparc64__) -# define CURLSYS_SIZEOF_LONG 8 -# define CURLSYS_TYPEOF_CURL_OFF_T long -# define CURLSYS_FORMAT_CURL_OFF_T "ld" -# define CURLSYS_FORMAT_CURL_OFF_TU "lu" -# define CURLSYS_SIZEOF_CURL_OFF_T 8 -# define CURLSYS_SUFFIX_CURL_OFF_T L -# define CURLSYS_SUFFIX_CURL_OFF_TU UL +# define CURL_SIZEOF_LONG 8 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_SIZEOF_CURL_OFF_T 8 +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL # endif -# define CURLSYS_TYPEOF_CURL_SOCKLEN_T socklen_t -# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4 -# define CURLSYS_PULL_SYS_TYPES_H 1 -# define CURLSYS_PULL_SYS_SOCKET_H 1 +# define CURL_TYPEOF_CURL_SOCKLEN_T socklen_t +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_PULL_SYS_TYPES_H 1 +# define CURL_PULL_SYS_SOCKET_H 1 #else /* generic "safe guess" on old 32 bit style */ -# define CURLSYS_SIZEOF_LONG 4 -# define CURLSYS_SIZEOF_CURL_SOCKLEN_T 4 -# define CURLSYS_SIZEOF_CURL_OFF_T 4 -# define CURLSYS_TYPEOF_CURL_OFF_T long -# define CURLSYS_FORMAT_CURL_OFF_T "ld" -# define CURLSYS_FORMAT_CURL_OFF_TU "lu" -# define CURLSYS_SUFFIX_CURL_OFF_T L -# define CURLSYS_SUFFIX_CURL_OFF_TU UL -# define CURLSYS_TYPEOF_CURL_SOCKLEN_T int +# define CURL_SIZEOF_LONG 4 +# define CURL_SIZEOF_CURL_SOCKLEN_T 4 +# define CURL_SIZEOF_CURL_OFF_T 4 +# define CURL_TYPEOF_CURL_OFF_T long +# define CURL_FORMAT_CURL_OFF_T "ld" +# define CURL_FORMAT_CURL_OFF_TU "lu" +# define CURL_SUFFIX_CURL_OFF_T L +# define CURL_SUFFIX_CURL_OFF_TU UL +# define CURL_TYPEOF_CURL_SOCKLEN_T int #endif /* CURLSYS_PULL_WS2TCPIP_H is defined above when inclusion of header file */ @@ -457,27 +449,75 @@ # include <ws2tcpip.h> #endif -/* CURLSYS_PULL_SYS_TYPES_H is defined above when inclusion of header file */ +/* CURL_PULL_SYS_TYPES_H is defined above when inclusion of header file */ /* sys/types.h is required here to properly make type definitions below. */ -#ifdef CURLSYS_PULL_SYS_TYPES_H +#ifdef CURL_PULL_SYS_TYPES_H # include <sys/types.h> #endif -/* CURLSYS_PULL_SYS_SOCKET_H is defined above when inclusion of header file */ +/* CURL_PULL_SYS_SOCKET_H is defined above when inclusion of header file */ /* sys/socket.h is required here to properly make type definitions below. */ -#ifdef CURLSYS_PULL_SYS_SOCKET_H +#ifdef CURL_PULL_SYS_SOCKET_H # include <sys/socket.h> #endif /* Data type definition of curl_socklen_t. */ -#ifdef CURLSYS_TYPEOF_CURL_SOCKLEN_T - typedef CURLSYS_TYPEOF_CURL_SOCKLEN_T curlsys_socklen_t; +#ifdef CURL_TYPEOF_CURL_SOCKLEN_T + typedef CURL_TYPEOF_CURL_SOCKLEN_T curl_socklen_t; #endif /* Data type definition of curl_off_t. */ -#ifdef CURLSYS_TYPEOF_CURL_OFF_T - typedef CURLSYS_TYPEOF_CURL_OFF_T curlsys_off_t; +#ifdef CURL_TYPEOF_CURL_OFF_T + typedef CURL_TYPEOF_CURL_OFF_T curl_off_t; +#endif + +/* + * 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 + * 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. + */ + +/* + * Figure out if we can use the ## preprocessor operator, which is supported + * by ISO/ANSI C and C++. Some compilers support it without setting __STDC__ + * or __cplusplus so we need to carefully check for them too. + */ + +#if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus) || \ + defined(__HP_aCC) || defined(__BORLANDC__) || defined(__LCC__) || \ + defined(__POCC__) || defined(__SALFORDC__) || defined(__HIGHC__) || \ + defined(__ILEC400__) + /* This compiler is believed to have an ISO compatible preprocessor */ +#define CURL_ISOCPP +#else + /* This compiler is believed NOT to have an ISO compatible preprocessor */ +#undef CURL_ISOCPP +#endif + +/* + * Macros for minimum-width signed and unsigned curl_off_t integer constants. + */ + +#if defined(__BORLANDC__) && (__BORLANDC__ == 0x0551) +# define __CURL_OFF_T_C_HLPR2(x) x +# define __CURL_OFF_T_C_HLPR1(x) __CURL_OFF_T_C_HLPR2(x) +# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \ + __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_T) +# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val) ## \ + __CURL_OFF_T_C_HLPR1(CURL_SUFFIX_CURL_OFF_TU) +#else +# ifdef CURL_ISOCPP +# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val ## Suffix +# else +# define __CURL_OFF_T_C_HLPR2(Val,Suffix) Val/**/Suffix +# endif +# define __CURL_OFF_T_C_HLPR1(Val,Suffix) __CURL_OFF_T_C_HLPR2(Val,Suffix) +# define CURL_OFF_T_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_T) +# define CURL_OFF_TU_C(Val) __CURL_OFF_T_C_HLPR1(Val,CURL_SUFFIX_CURL_OFF_TU) #endif #endif /* __CURL_SYSTEM_H */ |