This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
PATCH: Add __ILP32__ check when defining __WORDSIZE
- From: "H.J. Lu" <hongjiu dot lu at intel dot com>
- To: GNU C Library <libc-alpha at sourceware dot org>
- Date: Fri, 13 Apr 2012 15:22:54 -0700
- Subject: PATCH: Add __ILP32__ check when defining __WORDSIZE
- Reply-to: "H.J. Lu" <hjl dot tools at gmail dot com>
Hi,
X32 defines __x86_64__ and __ILP32__. This patch adds __ILP32__ check
when defining __WORDSIZE. Tested on Linux/x32 and Linux/x86-64. OK
to install?
Thanks.
H.J.
--
2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
* sysdeps/x86_64/bits/wordsize.h (__WORDSIZE): Also check
__ILP32__.
diff --git a/sysdeps/x86_64/bits/wordsize.h b/sysdeps/x86_64/bits/wordsize.h
index a40a0d8..9b38756 100644
--- a/sysdeps/x86_64/bits/wordsize.h
+++ b/sysdeps/x86_64/bits/wordsize.h
@@ -1,6 +1,6 @@
/* Determine the wordsize from the preprocessor defines. */
-#if defined __x86_64__
+#if defined __x86_64__ && !defined __ILP32__
# define __WORDSIZE 64
# define __WORDSIZE_COMPAT32 1
#else