diff options
author | r-a-sattarov <r.a.sattarov@yandex.ru> | 2019-11-09 17:42:47 +0300 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2019-11-09 14:42:13 -0500 |
commit | 8063c32209df2d8a90f0ad488188e7a9591db9c2 (patch) | |
tree | 92588fa5a14c3c6a05fd313dd18b180cd36e8483 /include | |
parent | cba52e2c2115c5acee7ef5fa31a17c4802e665d1 (diff) | |
download | curl-8063c32209df2d8a90f0ad488188e7a9591db9c2.tar.gz |
system.h: fix for MCST lcc compiler
Fixed build by MCST lcc compiler on MCST Elbrus 2000 architecture and do
some code cleanup.
e2k (Elbrus 2000) - this is VLIW/EPIC architecture, like Intel Itanium
architecture.
Ref: https://en.wikipedia.org/wiki/Elbrus_2000
Closes https://github.com/curl/curl/pull/4576
Diffstat (limited to 'include')
-rw-r--r-- | include/curl/system.h | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/include/curl/system.h b/include/curl/system.h index cd37c2bf5..867af6141 100644 --- a/include/curl/system.h +++ b/include/curl/system.h @@ -137,15 +137,26 @@ # define CURL_TYPEOF_CURL_SOCKLEN_T int #elif defined(__LCC__) -# 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 +# if defined(__e2k__) /* MCST eLbrus C Compiler */ +# 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 socklen_t +# define CURL_PULL_SYS_TYPES_H 1 +# define CURL_PULL_SYS_SOCKET_H 1 +# else /* Local (or Little) C Compiler */ +# 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 #elif defined(__SYMBIAN32__) -# if defined(__EABI__) /* Treat all ARM compilers equally */ +# if defined(__EABI__) /* Treat all ARM compilers equally */ # define CURL_TYPEOF_CURL_OFF_T long long # define CURL_FORMAT_CURL_OFF_T "lld" # define CURL_FORMAT_CURL_OFF_TU "llu" @@ -288,7 +299,6 @@ # define CURL_TYPEOF_CURL_SOCKLEN_T int #elif defined(__TINYC__) /* also known as tcc */ - # define CURL_TYPEOF_CURL_OFF_T long long # define CURL_FORMAT_CURL_OFF_T "lld" # define CURL_FORMAT_CURL_OFF_TU "llu" @@ -377,6 +387,7 @@ # define CURL_SUFFIX_CURL_OFF_TU ULL # elif defined(__LP64__) || \ defined(__x86_64__) || defined(__ppc64__) || defined(__sparc64__) || \ + defined(__e2k__) || \ (defined(__SIZEOF_LONG__) && __SIZEOF_LONG__ == 8) || \ (defined(__LONG_MAX__) && __LONG_MAX__ == 9223372036854775807L) # define CURL_TYPEOF_CURL_OFF_T long |