aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2009-04-02 18:50:39 +0000
committerYang Tse <yangsita@gmail.com>2009-04-02 18:50:39 +0000
commit168fb3a8d89bd83c926f3fa2314e064294ebff0b (patch)
treee16676f93a0663044ea88eb07dfb81f08d363356 /include
parent4c5307b45655ba75ab066564afdc0c111a8b9291 (diff)
Fix curl_off_t definition for builds done using Sun compilers and a
non-configured libcurl. In this case curl_off_t data type was gated to the off_t data type which depends on the _FILE_OFFSET_BITS. This configuration is exactly the unwanted configuration for our curl_off_t data type which must not depend on such setting. This breaks ABI for libcurl libraries built with Sun compilers which were built without having run the configure script with _FILE_OFFSET_BITS different than 64 and using the ILP32 data model.
Diffstat (limited to 'include')
-rw-r--r--include/curl/curlbuild.h.dist44
1 files changed, 26 insertions, 18 deletions
diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist
index 247213cd4..bc5950df5 100644
--- a/include/curl/curlbuild.h.dist
+++ b/include/curl/curlbuild.h.dist
@@ -443,25 +443,33 @@
/* ===================================== */
#elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
-#include <sys/types.h>
-#include <stdint.h>
-
-# define CURL_TYPEOF_CURL_OFF_T off_t
-# define CURL_SIZEOF_CURL_OFF_T 8
-# if defined(__amd64) || defined(__sparcv9)
-# define CURL_SIZEOF_LONG 8
-# define CURL_FORMAT_CURL_OFF_T "ld"
-# define CURL_FORMAT_CURL_OFF_TU "lu"
-# define CURL_FORMAT_OFF_T "%ld"
-# define CURL_SUFFIX_CURL_OFF_T L
-# define CURL_SUFFIX_CURL_OFF_TU UL
+# if defined(_LP64)
+# 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_FORMAT_OFF_T "%ld"
+# define CURL_SIZEOF_CURL_OFF_T 8
+# define CURL_SUFFIX_CURL_OFF_T L
+# define CURL_SUFFIX_CURL_OFF_TU UL
+# elif defined(__STDC__) && (__STDC__ == 1)
+# 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_FORMAT_OFF_T "%ld"
+# define CURL_SIZEOF_CURL_OFF_T 4
+# define CURL_SUFFIX_CURL_OFF_T L
+# define CURL_SUFFIX_CURL_OFF_TU UL
# else
-# define CURL_SIZEOF_LONG 4
-# define CURL_FORMAT_CURL_OFF_T "lld"
-# define CURL_FORMAT_CURL_OFF_TU "llu"
-# define CURL_FORMAT_OFF_T "%lld"
-# define CURL_SUFFIX_CURL_OFF_T LL
-# define CURL_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_FORMAT_OFF_T "%lld"
+# define CURL_SIZEOF_CURL_OFF_T 8
+# define CURL_SUFFIX_CURL_OFF_T LL
+# define CURL_SUFFIX_CURL_OFF_TU ULL
# endif
/* ===================================== */