summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sys-kernel/linux26-headers/files/linux26-headers-2.6.8.1-strict-ansi-fix.patch')
-rw-r--r--sys-kernel/linux26-headers/files/linux26-headers-2.6.8.1-strict-ansi-fix.patch145
1 files changed, 145 insertions, 0 deletions
diff --git a/sys-kernel/linux26-headers/files/linux26-headers-2.6.8.1-strict-ansi-fix.patch b/sys-kernel/linux26-headers/files/linux26-headers-2.6.8.1-strict-ansi-fix.patch
new file mode 100644
index 000000000000..d21e65505b31
--- /dev/null
+++ b/sys-kernel/linux26-headers/files/linux26-headers-2.6.8.1-strict-ansi-fix.patch
@@ -0,0 +1,145 @@
+--- linux-2.6.0/include/asm-i386/byteorder.h 2003-07-10 21:11:31.000000000 +0100
++++ linux-2.6.0/include/asm-i386/byteorder.h 2003-12-26 22:58:17.000000000 +0000
+@@ -1,6 +1,8 @@
+ #ifndef _I386_BYTEORDER_H
+ #define _I386_BYTEORDER_H
+
++#define __attribute_const__ __attribute__((__const__))
++
+ #include <asm/types.h>
+ #include <linux/compiler.h>
+
+@@ -43,13 +43,13 @@
+ } v;
+ v.u = val;
+ #ifdef CONFIG_X86_BSWAP
+- asm("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
++ __asm__("bswapl %0 ; bswapl %1 ; xchgl %0,%1"
+ : "=r" (v.s.a), "=r" (v.s.b)
+ : "0" (v.s.a), "1" (v.s.b));
+ #else
+- v.s.a = ___arch__swab32(v.s.a);
++ v.s.a = ___arch__swab32(v.s.a);
+ v.s.b = ___arch__swab32(v.s.b);
+- asm("xchgl %0,%1" : "=r" (v.s.a), "=r" (v.s.b) : "0" (v.s.a), "1" (v.s.b));
++ __asm__("xchgl %0,%1" : "=r" (v.s.a), "=r" (v.s.b) : "0" (v.s.a), "1" (v.s.b));
+ #endif
+ return v.u;
+ }
+--- linux-2.6.0/include/asm-i386/types.h 2003-07-10 21:11:00.000000000 +0100
++++ linux-2.6.0/include/asm-i386/types.h 2003-12-26 23:09:38.000000000 +0000
+@@ -19,10 +19,14 @@
+ typedef __signed__ int __s32;
+ typedef unsigned int __u32;
+
+-#if defined(__GNUC__) && !defined(__STRICT_ANSI__)
+-typedef __signed__ long long __s64;
+-typedef unsigned long long __u64;
+-#endif
++#ifndef __GNUC__
++# ifndef __extension__
++# define __extension__
++# endif /* __extension__ */
++#endif /* __GNUC__ */
++
++__extension__ typedef __signed__ long long __s64;
++__extension__ typedef unsigned long long __u64;
+
+ #endif /* __ASSEMBLY__ */
+
+--- linux-2.6.3/include/linux/byteorder/swab.h 2004-02-20 00:20:05.000000000 +0000
++++ linux-2.6.3/include/linux/byteorder/swab.h 2004-02-22 16:47:24.000000000 +0000
+@@ -15,6 +15,7 @@
+ *
+ */
+
++#define __attribute_const__ __attribute__((__const__))
+ #include <linux/compiler.h>
+
+ /* casts are necessary for constants, because we never know how for sure
+--- linux-2.6.3/include/asm-x86_64/byteorder.h 2004-02-17 19:58:49.000000000 -0800
++++ linux-2.6.3/include/asm-x86_64/byteorder.h 2004-02-28 18:49:20.000000000 -0800
+@@ -1,6 +1,8 @@
+ #ifndef _X86_64_BYTEORDER_H
+ #define _X86_64_BYTEORDER_H
+
++#define __attribute_const__ __attribute__((__const__))
++
+ #include <asm/types.h>
+ #include <linux/compiler.h>
+
+--- linux-2.6.3/include/asm-x86_64/semaphore.h 2004-02-17 19:57:11.000000000 -0800
++++ linux-2.6.3/include/asm-x86_64/semaphore.h 2004-02-28 18:49:20.000000000 -0800
+@@ -3,8 +3,6 @@
+
+ #include <linux/linkage.h>
+
+-#ifdef __KERNEL__
+-
+ /*
+ * SMP- and interrupt-safe semaphores..
+ *
+@@ -215,5 +213,4 @@
+ :"D" (sem)
+ :"memory");
+ }
+-#endif /* __KERNEL__ */
+ #endif
+--- linux-2.6.3/include/asm-x86_64/signal.h 2004-02-17 19:57:12.000000000 -0800
++++ linux-2.6.3/include/asm-x86_64/signal.h 2004-02-28 18:49:20.000000000 -0800
+@@ -32,7 +32,9 @@
+ /* Here we must cater to libcs that poke about in kernel headers. */
+
+ #define NSIG 32
++#ifndef __sigset_t_defined
+ typedef unsigned long sigset_t;
++#endif
+
+ #endif /* __KERNEL__ */
+ #endif
+@@ -146,22 +148,26 @@
+ #define SIG_IGN ((__sighandler_t)1) /* ignore signal */
+ #define SIG_ERR ((__sighandler_t)-1) /* error return from signal */
+
++#ifndef _SIGNAL_H
+ struct sigaction {
+ __sighandler_t sa_handler;
+ unsigned long sa_flags;
+ __sigrestore_t sa_restorer;
+ sigset_t sa_mask; /* mask last for extensibility */
+ };
++#endif
+
+ struct k_sigaction {
+ struct sigaction sa;
+ };
+
++#ifndef _SIGNAL_H
+ typedef struct sigaltstack {
+ void __user *ss_sp;
+ int ss_flags;
+ size_t ss_size;
+ } stack_t;
++#endif
+
+ #ifdef __KERNEL__
+ #include <asm/sigcontext.h>
+--- linux-2.6.3/include/asm-x86_64/types.h 2004-02-17 19:59:16.000000000 -0800
++++ linux-2.6.3/include/asm-x86_64/types.h 2004-02-28 18:49:21.000000000 -0800
+@@ -19,8 +19,14 @@
+ typedef __signed__ int __s32;
+ typedef unsigned int __u32;
+
+-typedef __signed__ long long __s64;
+-typedef unsigned long long __u64;
++#ifndef __GNUC__
++# ifndef __extension__
++# define __extension__
++# endif /* __extension__ */
++#endif /* __GNUC__ */
++
++__extension__ typedef __signed__ long long __s64;
++__extension__ typedef unsigned long long __u64;
+
+ #endif /* __ASSEMBLY__ */
+