wordsize.h for x86-64
Andreas Jaeger
aj@suse.de
Thu Feb 28 01:04:00 GMT 2002
I'd like to follow the example of Sparc in using __WORDSIZE in the
glibc headers of x86-64 to allow compilation with both 32-bit and
64-bit compilers of the same headers.
Since this first appended patch affects also i386, I'd like to get
permission to commit this file to both branches.
Andreas
2002-02-28 Andreas Jaeger <aj@suse.de>
* sysdeps/i386/bits/wordsize.h: New file to allow sharing with
x86-64.
* sysdeps/x86_64/bits/wordsize.h: Likewise.
============================================================
Index: sysdeps/i386/bits/wordsize.h
--- sysdeps/i386/bits/wordsize.h created
+++ sysdeps/i386/bits/wordsize.h Thu Feb 28 10:00:25 2002 1.1
@@ -0,0 +1,7 @@
+/* Determine the wordsize from the preprocessor defines. */
+
+#if defined __x86_64__
+# define __WORDSIZE 64
+#else
+# define __WORDSIZE 32
+#endif
============================================================
Index: sysdeps/x86_64/bits/wordsize.h
--- sysdeps/x86_64/bits/wordsize.h created
+++ sysdeps/x86_64/bits/wordsize.h Thu Feb 28 10:00:52 2002 1.1
@@ -0,0 +1,7 @@
+/* Determine the wordsize from the preprocessor defines. */
+
+#if defined __x86_64__
+# define __WORDSIZE 64
+#else
+# define __WORDSIZE 32
+#endif
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.inka.de
http://www.suse.de/~aj
More information about the Libc-hacker
mailing list