aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2013-03-08 18:43:03 +0100
committerYang Tse <yangsita@gmail.com>2013-03-08 18:43:03 +0100
commit21c1de430a83be7900096cd65f2ef680307eb0b5 (patch)
tree9f4740c15f09c848d034ca0cfbb3601bfd37aabb
parentc5a08af5790e873146a1c34efaa02aa0a39b37eb (diff)
curlbuild.h.dist: enhance non-configure GCC ABI detection logic
GCC specific adjustments: - check __ILP32__ before 32 and 64bit processor architectures in order to detect ILP32 programming model on 64 bit processors which, of course, also support LP64 programming model, when using gcc 4.7 or newer. - keep 32bit processor architecture checks in order to support gcc versions older than 4.7 which don't define __ILP32__ - check __LP64__ for gcc 3.3 and newer, while keeping 64bit processor architecture checks for older versions which don't define __LP64__
-rw-r--r--include/curl/curlbuild.h.dist8
1 files changed, 5 insertions, 3 deletions
diff --git a/include/curl/curlbuild.h.dist b/include/curl/curlbuild.h.dist
index 5737cc08d..3ad2f018d 100644
--- a/include/curl/curlbuild.h.dist
+++ b/include/curl/curlbuild.h.dist
@@ -7,7 +7,7 @@
* | (__| |_| | _ <| |___
* \___|\___/|_| \_\_____|
*
- * Copyright (C) 1998 - 2010, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
*
* This software is licensed as described in the file COPYING, which
* you should have received as part of this distribution. The terms
@@ -527,7 +527,8 @@
/* ===================================== */
#elif defined(__GNUC__)
-# if defined(__i386__) || defined(__ppc__) || defined(__arm__)
+# if defined(__ILP32__) || \
+ defined(__i386__) || defined(__ppc__) || defined(__arm__)
# define CURL_SIZEOF_LONG 4
# define CURL_TYPEOF_CURL_OFF_T long long
# define CURL_FORMAT_CURL_OFF_T "lld"
@@ -536,7 +537,8 @@
# define CURL_SIZEOF_CURL_OFF_T 8
# define CURL_SUFFIX_CURL_OFF_T LL
# define CURL_SUFFIX_CURL_OFF_TU ULL
-# elif defined(__x86_64__) || defined(__ppc64__)
+# elif defined(__LP64__) || \
+ defined(__x86_64__) || defined(__ppc64__)
# define CURL_SIZEOF_LONG 8
# define CURL_TYPEOF_CURL_OFF_T long
# define CURL_FORMAT_CURL_OFF_T "ld"