summaryrefslogtreecommitdiffstats
path: root/libc/kernel
diff options
context:
space:
mode:
authorBen Cheng <bccheng@google.com>2013-10-23 14:38:25 -0700
committerBen Cheng <bccheng@google.com>2013-10-23 14:44:38 -0700
commit460fa7033b17c49e3e6fdaee49eb6d7d666e16d9 (patch)
tree2e517a610f0b1078a98003a71b109b638dd943d8 /libc/kernel
parent97dc3309f3d403c391581444ad656c2f3c61303d (diff)
downloadbionic-460fa7033b17c49e3e6fdaee49eb6d7d666e16d9.zip
bionic-460fa7033b17c49e3e6fdaee49eb6d7d666e16d9.tar.gz
bionic-460fa7033b17c49e3e6fdaee49eb6d7d666e16d9.tar.bz2
Add __EXPORTED_HEADERS__ as predefined macro.
To weed out stuff like this in uapi/linux/types.h ifndef __EXPORTED_HEADERS__ warning "Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders" endif /* __EXPORTED_HEADERS__ */ Change-Id: I6506cea6248f7a3b44a839b98e91bdd0d3a6c4cd
Diffstat (limited to 'libc/kernel')
-rw-r--r--libc/kernel/tools/defaults.py1
-rw-r--r--libc/kernel/uapi/linux/types.h11
2 files changed, 5 insertions, 7 deletions
diff --git a/libc/kernel/tools/defaults.py b/libc/kernel/tools/defaults.py
index 3968605..f6486d7 100644
--- a/libc/kernel/tools/defaults.py
+++ b/libc/kernel/tools/defaults.py
@@ -34,6 +34,7 @@ kernel_known_macros = {
"__CHECKER__": kCppUndefinedMacro,
"__CHECK_ENDIAN__": kCppUndefinedMacro,
"CONFIG_X86_32": "__i386__",
+ "__EXPORTED_HEADERS__": "1",
}
# define to true if you want to remove all defined(CONFIG_FOO) tests
diff --git a/libc/kernel/uapi/linux/types.h b/libc/kernel/uapi/linux/types.h
index 3a3b381..4fdfe10 100644
--- a/libc/kernel/uapi/linux/types.h
+++ b/libc/kernel/uapi/linux/types.h
@@ -21,26 +21,23 @@
#include <asm/types.h>
#ifndef __ASSEMBLY__
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
-#ifndef __EXPORTED_HEADERS__
-#warning "Attempt to use kernel headers from user space, see http://kernelnewbies.org/KernelHeaders"
-#endif
#include <linux/posix_types.h>
-/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
#define __bitwise__
#define __bitwise
typedef __u16 __bitwise __le16;
-typedef __u16 __bitwise __be16;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+typedef __u16 __bitwise __be16;
typedef __u32 __bitwise __le32;
typedef __u32 __bitwise __be32;
typedef __u64 __bitwise __le64;
-typedef __u64 __bitwise __be64;
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+typedef __u64 __bitwise __be64;
typedef __u16 __bitwise __sum16;
typedef __u32 __bitwise __wsum;
#define __aligned_u64 __u64 __attribute__((aligned(8)))
-#define __aligned_be64 __be64 __attribute__((aligned(8)))
/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
+#define __aligned_be64 __be64 __attribute__((aligned(8)))
#define __aligned_le64 __le64 __attribute__((aligned(8)))
#endif
#endif
+/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */