File: no-linux-compiler-h.patch

package info (click to toggle)
linux-kernel-headers 2.5.999-test7-bk-17
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 28,268 kB
  • ctags: 214,024
  • sloc: ansic: 324,929; cpp: 783; makefile: 79; asm: 61; sh: 61
file content (28 lines) | stat: -rw-r--r-- 889 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Don't define assorted things for userspace.  In particular do not define
inline to __attribute__((always_inline)).

--- include/linux/compiler.h	2003-10-15 11:13:09.000000000 -0400
+++ include/linux/compiler.h.t	2003-11-01 18:04:19.000000000 -0500
@@ -9,6 +9,15 @@
 # define __kernel
 #endif
 
+#if !defined(__KERNEL__)
+/* Debian: Most of these are inappropriate for userspace.  */
+/* We don't define likely, unlikely, or barrier; they're namespace-intrusive
+   and should not be needed outside of __KERNEL__.  For __attribute_pure__
+   and __attribute_used__ we use glibc's definitions.  */
+# include <sys/cdefs.h>
+# define __deprecated
+#else
+
 #if __GNUC__ > 3
 # include <linux/compiler-gcc+.h>	/* catch-all for GCC 4, 5, etc. */
 #elif __GNUC__ == 3
@@ -86,4 +95,6 @@
     (typeof(ptr)) (__ptr + (off)); })
 #endif
 
+#endif /* __KERNEL__ */
+
 #endif /* __LINUX_COMPILER_H */