PATCH: Define MAP_32BIT only if __WORDSIZE is 64
H.J. Lu
hongjiu.lu@intel.com
Thu May 31 15:02:00 GMT 2012
Hi,
This patch defines MAP_32BIT in x86_64/bits/mman.h only if __WORDSIZE is
64. OK to install?
Thanks.
H.J.
---
* sysdeps/unix/sysv/linux/x86_64/bits/mman.h: Include
<bits/wordsize.h>.
(MAP_32BIT): Define only if __WORDSIZE is 64.
diff --git a/sysdeps/unix/sysv/linux/x86_64/bits/mman.h b/sysdeps/unix/sysv/linux/x86_64/bits/mman.h
index 28b9160..3f2599a 100644
--- a/sysdeps/unix/sysv/linux/x86_64/bits/mman.h
+++ b/sysdeps/unix/sysv/linux/x86_64/bits/mman.h
@@ -20,6 +20,8 @@
# error "Never use <bits/mman.h> directly; include <sys/mman.h> instead."
#endif
+#include <bits/wordsize.h>
+
/* The following definitions basically come from the kernel headers.
But the kernel header is not namespace clean. */
@@ -51,7 +53,9 @@
# define MAP_FILE 0
# define MAP_ANONYMOUS 0x20 /* Don't use a file. */
# define MAP_ANON MAP_ANONYMOUS
-# define MAP_32BIT 0x40 /* Only give out 32-bit addresses. */
+# if __WORDSIZE == 64
+# define MAP_32BIT 0x40 /* Only give out 32-bit addresses. */
+# endif
#endif
/* These are Linux-specific. */
More information about the Libc-alpha
mailing list