]> granicus.if.org Git - curl/commitdiff
curlbuild.h.dist: check __LP64__ as well to fix MIPS build
authorDaniel Stenberg <daniel@haxx.se>
Wed, 18 May 2016 12:10:36 +0000 (14:10 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 18 May 2016 12:10:36 +0000 (14:10 +0200)
The preprocessor check that sets up the 32bit defines for non-configure
builds didn't work properly for MIPS systems as __mips__ is defined for
both 32bit and 64bit. Now __LP64__ is also checked and indicates 64bit.

Reported-by: Tomas Jakobsson
Fixes #813

include/curl/curlbuild.h.dist

index 58323d0648dd0cf7de8dc6abead579416b8b5db7..ae95095fa514477fb651f399eef4dfeba3dc8ef9 100644 (file)
@@ -7,7 +7,7 @@
  *                            | (__| |_| |  _ <| |___
  *                             \___|\___/|_| \_\_____|
  *
- * Copyright (C) 1998 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al.
+ * Copyright (C) 1998 - 2016, 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
 /* ===================================== */
 
 #elif defined(__GNUC__)
-#  if defined(__ILP32__) || \
+#  if !defined(__LP64__) && (defined(__ILP32__) || \
       defined(__i386__) || defined(__ppc__) || defined(__arm__) || \
-      defined(__sparc__) || defined(__mips__) || defined(__sh__)
+      defined(__sparc__) || defined(__mips__) || defined(__sh__))
 #    define CURL_SIZEOF_LONG           4
 #    define CURL_TYPEOF_CURL_OFF_T     long long
 #    define CURL_FORMAT_CURL_OFF_T     "lld"