summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYang Tse <yangsita@gmail.com>2013-03-10 04:50:21 +0100
committerYang Tse <yangsita@gmail.com>2013-03-10 21:28:35 +0100
commit8f3f059f33a3d02c84bd2631bb257d5a6b83af5f (patch)
tree593f18d53d97507ffac2863db1679f707ce65284
parent57203b14df6158f1435ed27af5fc40c7a0dc90c1 (diff)
downloadc-ares-8f3f059f33a3d02c84bd2631bb257d5a6b83af5f.tar.gz
c-ares-8f3f059f33a3d02c84bd2631bb257d5a6b83af5f.tar.bz2
c-ares-8f3f059f33a3d02c84bd2631bb257d5a6b83af5f.zip
ares_build.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--ares_build.h.dist8
1 files changed, 5 insertions, 3 deletions
diff --git a/ares_build.h.dist b/ares_build.h.dist
index 2736cff..afcb75a 100644
--- a/ares_build.h.dist
+++ b/ares_build.h.dist
@@ -2,7 +2,7 @@
#define __CARES_BUILD_H
-/* Copyright (C) 2009 - 2010 by Daniel Stenberg et al
+/* Copyright (C) 2009 - 2013 by Daniel Stenberg et al
*
* Permission to use, copy, modify, and distribute this software and its
* documentation for any purpose and without fee is hereby granted, provided
@@ -216,9 +216,11 @@
/* ===================================== */
#elif defined(__GNUC__)
-# if defined(__i386__) || defined(__ppc__)
+# if defined(__ILP32__) || \
+ defined(__i386__) || defined(__ppc__) || defined(__arm__)
# define CARES_SIZEOF_LONG 4
-# elif defined(__x86_64__) || defined(__ppc64__)
+# elif defined(__LP64__) || \
+ defined(__x86_64__) || defined(__ppc64__)
# define CARES_SIZEOF_LONG 8
# endif
# define CARES_TYPEOF_ARES_SOCKLEN_T socklen_t