This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: Add __ILP32__ check when defining __WORDSIZE


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]