PATCH: Add __ILP32__ check when defining __WORDSIZE
H.J. Lu
hongjiu.lu@intel.com
Fri Apr 13 22:23:00 GMT 2012
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
More information about the Libc-alpha
mailing list