summaryrefslogtreecommitdiff
blob: a0e8dbac5e033e5cb807e82fad69b02d18c62ccc (plain)
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
--- 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,18 @@
 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__ */
+
+#ifndef __s64
+__extension__ typedef __signed__ long long __s64;
+#endif
+#ifndef __u64
+__extension__ typedef unsigned long long  __u64;
+#endif
 
 #endif /* __ASSEMBLY__ */