]> git.pld-linux.org Git - packages/linux-libc-headers.git/blob - linux-libc-headers-endian.patch
- rel 5
[packages/linux-libc-headers.git] / linux-libc-headers-endian.patch
1 diff -Nur linux-libc-headers-2.6.12.0.orig/include/asm-m32r/elf.h linux-libc-headers-2.6.12.0/include/asm-m32r/elf.h
2 --- linux-libc-headers-2.6.12.0.orig/include/asm-m32r/elf.h     2005-03-13 21:54:07.000000000 +0100
3 +++ linux-libc-headers-2.6.12.0/include/asm-m32r/elf.h  2005-08-23 22:19:47.000000000 +0200
4 @@ -11,6 +11,7 @@
5  #include <asm/ptrace.h>
6  #include <asm/user.h>
7  #include <asm/page.h>
8 +#include <endian.h>
9  
10  /* M32R relocation types  */
11  #define        R_M32R_NONE             0
12 @@ -82,9 +83,9 @@
13   * These are used to set parameters in the core dumps.
14   */
15  #define ELF_CLASS      ELFCLASS32
16 -#if defined(__LITTLE_ENDIAN)
17 +#if __BYTE_ORDER == __LITTLE_ENDIAN
18  #define ELF_DATA       ELFDATA2LSB
19 -#elif defined(__BIG_ENDIAN)
20 +#elif __BYTE_ORDER == __BIG_ENDIAN
21  #define ELF_DATA       ELFDATA2MSB
22  #else
23  #error no endian defined
24 diff -Nur linux-libc-headers-2.6.12.0.orig/include/asm-m32r/stat.h linux-libc-headers-2.6.12.0/include/asm-m32r/stat.h
25 --- linux-libc-headers-2.6.12.0.orig/include/asm-m32r/stat.h    2005-03-25 20:39:05.000000000 +0100
26 +++ linux-libc-headers-2.6.12.0/include/asm-m32r/stat.h 2005-08-23 22:19:47.000000000 +0200
27 @@ -5,7 +5,7 @@
28  
29  /* orig : i386 2.4.18 */
30  
31 -#include <asm/byteorder.h>
32 +#include <endian>
33  
34  struct __old_kernel_stat {
35         unsigned short st_dev;
36 @@ -67,10 +67,10 @@
37         long long       st_size;
38         unsigned long   st_blksize;
39  
40 -#if defined(__BIG_ENDIAN)
41 +#if __BYTE_ORDER == __BIG_ENDIAN
42         unsigned long   __pad4;         /* future possible st_blocks high bits */
43         unsigned long   st_blocks;      /* Number 512-byte blocks allocated. */
44 -#elif defined(__LITTLE_ENDIAN)
45 +#elif __BYTE_ORDER == __LITTLE_ENDIAN
46         unsigned long   st_blocks;      /* Number 512-byte blocks allocated. */
47         unsigned long   __pad4;         /* future possible st_blocks high bits */
48  #else
49 diff -Nur linux-libc-headers-2.6.12.0.orig/include/asm-mips/jmr3927/jmr3927.h linux-libc-headers-2.6.12.0/include/asm-mips/jmr3927/jmr3927.h
50 --- linux-libc-headers-2.6.12.0.orig/include/asm-mips/jmr3927/jmr3927.h 2004-10-31 20:54:13.000000000 +0100
51 +++ linux-libc-headers-2.6.12.0/include/asm-mips/jmr3927/jmr3927.h      2005-08-23 22:19:47.000000000 +0200
52 @@ -16,6 +16,7 @@
53  #ifndef __ASSEMBLY__
54  #include <asm/system.h>
55  #endif
56 +#include <endian.h>
57  
58  /* CS */
59  #define JMR3927_ROMCE0 0x1fc00000      /* 4M */
60 @@ -148,10 +149,10 @@
61  #define jmr3927_ioc_reg_out(d, a)      ((*(volatile unsigned short *)(a)) = (d) << 8)
62  #define jmr3927_ioc_reg_in(a)          (((*(volatile unsigned short *)(a)) >> 8) & 0xff)
63  #else
64 -#if defined(__BIG_ENDIAN)
65 +#if __BYTE_ORDER == __BIG_ENDIAN
66  #define jmr3927_ioc_reg_out(d, a)      ((*(volatile unsigned char *)(a)) = (d))
67  #define jmr3927_ioc_reg_in(a)          (*(volatile unsigned char *)(a))
68 -#elif defined(__LITTLE_ENDIAN)
69 +#elif __BYTE_ORDER == __LITTLE_ENDIAN
70  #define jmr3927_ioc_reg_out(d, a)      ((*(volatile unsigned char *)((a)^1)) = (d))
71  #define jmr3927_ioc_reg_in(a)          (*(volatile unsigned char *)((a)^1))
72  #else
73 diff -Nur linux-libc-headers-2.6.12.0.orig/include/asm-mips/jmr3927/tx3927.h linux-libc-headers-2.6.12.0/include/asm-mips/jmr3927/tx3927.h
74 --- linux-libc-headers-2.6.12.0.orig/include/asm-mips/jmr3927/tx3927.h  2004-10-31 20:54:13.000000000 +0100
75 +++ linux-libc-headers-2.6.12.0/include/asm-mips/jmr3927/tx3927.h       2005-08-23 22:19:47.000000000 +0200
76 @@ -67,9 +67,9 @@
77         volatile unsigned long csr;
78  };
79  
80 -#include <asm/byteorder.h>
81 +#include <endian.h>
82  
83 -#ifdef __BIG_ENDIAN
84 +#if __BYTE_ORDER == __BIG_ENDIAN
85  #define endian_def_s2(e1,e2)   \
86         volatile unsigned short e1,e2
87  #define endian_def_sb2(e1,e2,e3)       \
88 diff -Nur linux-libc-headers-2.6.12.0.orig/include/linux/aio_abi.h linux-libc-headers-2.6.12.0/include/linux/aio_abi.h
89 --- linux-libc-headers-2.6.12.0.orig/include/linux/aio_abi.h    2005-07-06 02:17:21.000000000 +0200
90 +++ linux-libc-headers-2.6.12.0/include/linux/aio_abi.h 2005-08-23 22:19:47.000000000 +0200
91 @@ -53,9 +53,9 @@
92         __s64           res2;           /* secondary result */
93  };
94  
95 -#if defined(__LITTLE_ENDIAN)
96 +#if __BYTE_ORDER == __LITTLE_ENDIAN
97  #define PADDED(x,y)    x, y
98 -#elif defined(__BIG_ENDIAN)
99 +#elif __BYTE_ORDER == __BIG_ENDIAN
100  #define PADDED(x,y)    y, x
101  #else
102  #error edit for your odd byteorder.
103 diff -Nur linux-libc-headers-2.6.12.0.orig/include/linux/cdrom.h linux-libc-headers-2.6.12.0/include/linux/cdrom.h
104 --- linux-libc-headers-2.6.12.0.orig/include/linux/cdrom.h      2005-01-08 15:03:51.000000000 +0100
105 +++ linux-libc-headers-2.6.12.0/include/linux/cdrom.h   2005-08-23 22:19:47.000000000 +0200
106 @@ -15,7 +15,7 @@
107  #include <endian.h>
108  #include <byteswap.h>
109  
110 -#if !defined(__LITTLE_ENDIAN) && !defined(__BIG_ENDIAN)
111 +#if (__BYTE_ORDER != __LITTLE_ENDIAN) && (__BYTE_ORDER != __BIG_ENDIAN)
112  #error "Endian problem - this didn't happen"
113  #endif
114  
115 @@ -699,20 +699,20 @@
116  } dvd_authinfo;
117  
118  struct request_sense {
119 -#if defined(__BIG_ENDIAN)
120 +#if __BYTE_ORDER == __BIG_ENDIAN
121         __u8 valid              : 1;
122         __u8 error_code         : 7;
123 -#elif defined(__LITTLE_ENDIAN)
124 +#elif __BYTE_ORDER == __LITTLE_ENDIAN
125         __u8 error_code         : 7;
126         __u8 valid              : 1;
127  #endif
128         __u8 segment_number;
129 -#if defined(__BIG_ENDIAN)
130 +#if __BYTE_ORDER == __BIG_ENDIAN
131         __u8 reserved1          : 2;
132         __u8 ili                : 1;
133         __u8 reserved2          : 1;
134         __u8 sense_key          : 4;
135 -#elif defined(__LITTLE_ENDIAN)
136 +#elif __BYTE_ORDER == __LITTLE_ENDIAN
137         __u8 sense_key          : 4;
138         __u8 reserved2          : 1;
139         __u8 ili                : 1;
140 @@ -771,22 +771,22 @@
141  
142  struct mrw_feature_desc {
143         __u16 feature_code;
144 -#if defined(__BIG_ENDIAN)
145 +#if __BYTE_ORDER == __BIG_ENDIAN
146         __u8 reserved1          : 2;
147         __u8 feature_version    : 4;
148         __u8 persistent         : 1;
149         __u8 curr               : 1;
150 -#elif defined(__LITTLE_ENDIAN)
151 +#elif __BYTE_ORDER == __LITTLE_ENDIAN
152         __u8 curr               : 1;
153         __u8 persistent         : 1;
154         __u8 feature_version    : 4;
155         __u8 reserved1          : 2;
156  #endif
157         __u8 add_len;
158 -#if defined(__BIG_ENDIAN)
159 +#if __BYTE_ORDER == __BIG_ENDIAN
160         __u8 reserved2          : 7;
161         __u8 write              : 1;
162 -#elif defined(__LITTLE_ENDIAN)
163 +#elif __BYTE_ORDER == __LITTLE_ENDIAN
164         __u8 write              : 1;
165         __u8 reserved2          : 7;
166  #endif
167 @@ -798,12 +798,12 @@
168  /* cf. mmc4r02g.pdf 5.3.10 Random Writable Feature (0020h) pg 197 of 635 */
169  struct rwrt_feature_desc {
170         __u16 feature_code;
171 -#if defined(__BIG_ENDIAN_BITFIELD)
172 +#if __BYTE_ORDER == __BIG_ENDIAN
173         __u8 reserved1          : 2;
174         __u8 feature_version    : 4;
175         __u8 persistent         : 1;
176         __u8 curr               : 1;
177 -#elif defined(__LITTLE_ENDIAN_BITFIELD)
178 +#elif __BYTE_ORDER == __LITTLE_ENDIAN
179         __u8 curr               : 1;
180         __u8 persistent         : 1;
181         __u8 feature_version    : 4;
182 @@ -813,10 +813,10 @@
183         __u32 last_lba;
184         __u32 block_size;
185         __u16 blocking;
186 -#if defined(__BIG_ENDIAN_BITFIELD)
187 +#if __BYTE_ORDER == __BIG_ENDIAN
188         __u8 reserved2          : 7;
189         __u8 page_present       : 1;
190 -#elif defined(__LITTLE_ENDIAN_BITFIELD)
191 +#elif __BYTE_ORDER == __LITTLE_ENDIAN
192         __u8 page_present       : 1;
193         __u8 reserved2          : 7;
194  #endif
195 @@ -825,12 +825,12 @@
196  
197  typedef struct {
198         __u16 disc_information_length;
199 -#if defined(__BIG_ENDIAN)
200 +#if __BYTE_ORDER == __BIG_ENDIAN
201         __u8 reserved1                  : 3;
202          __u8 erasable                  : 1;
203          __u8 border_status             : 2;
204          __u8 disc_status               : 2;
205 -#elif defined(__LITTLE_ENDIAN)
206 +#elif __BYTE_ORDER == __LITTLE_ENDIAN
207          __u8 disc_status               : 2;
208          __u8 border_status             : 2;
209          __u8 erasable                  : 1;
210 @@ -840,14 +840,14 @@
211         __u8 n_sessions_lsb;
212         __u8 first_track_lsb;
213         __u8 last_track_lsb;
214 -#if defined(__BIG_ENDIAN)
215 +#if __BYTE_ORDER == __BIG_ENDIAN
216         __u8 did_v                      : 1;
217          __u8 dbc_v                     : 1;
218          __u8 uru                       : 1;
219          __u8 reserved2                 : 2;
220         __u8 dbit                       : 1;
221         __u8 mrw_status                 : 2;
222 -#elif defined(__LITTLE_ENDIAN)
223 +#elif __BYTE_ORDER == __LITTLE_ENDIAN
224         __u8 mrw_status                 : 2;
225         __u8 dbit                       : 1;
226          __u8 reserved2                 : 2;
227 @@ -872,7 +872,7 @@
228         __u8 track_lsb;
229         __u8 session_lsb;
230         __u8 reserved1;
231 -#if defined(__BIG_ENDIAN)
232 +#if __BYTE_ORDER == __BIG_ENDIAN
233         __u8 reserved2                  : 2;
234          __u8 damage                    : 1;
235          __u8 copy                      : 1;
236 @@ -885,7 +885,7 @@
237         __u8 reserved3                  : 6;
238         __u8 lra_v                      : 1;
239         __u8 nwa_v                      : 1;
240 -#elif defined(__LITTLE_ENDIAN)
241 +#elif __BYTE_ORDER == __LITTLE_ENDIAN
242          __u8 track_mode                        : 4;
243          __u8 copy                      : 1;
244          __u8 damage                    : 1;
245 diff -Nur linux-libc-headers-2.6.12.0.orig/include/linux/icmpv6.h linux-libc-headers-2.6.12.0/include/linux/icmpv6.h
246 --- linux-libc-headers-2.6.12.0.orig/include/linux/icmpv6.h     2005-03-26 19:58:03.000000000 +0100
247 +++ linux-libc-headers-2.6.12.0/include/linux/icmpv6.h  2005-08-23 22:19:47.000000000 +0200
248 @@ -24,13 +24,13 @@
249                 } u_echo;
250  
251                  struct icmpv6_nd_advt {
252 -#if defined(__LITTLE_ENDIAN)
253 +#if __BYTE_ORDER == __LITTLE_ENDIAN
254                          __u32          reserved:5,
255                                         override:1,
256                                         solicited:1,
257                                         router:1,
258                                         reserved2:24;
259 -#elif defined(__BIG_ENDIAN)
260 +#elif __BYTE_ORDER == __BIG_ENDIAN
261                          __u32          router:1,
262                                         solicited:1,
263                                         override:1,
264 @@ -42,12 +42,12 @@
265  
266                  struct icmpv6_nd_ra {
267                         __u8            hop_limit;
268 -#if defined(__LITTLE_ENDIAN)
269 +#if __BYTE_ORDER == __LITTLE_ENDIAN
270                         __u8            reserved:6,
271                                         other:1,
272                                         managed:1;
273  
274 -#elif defined(__BIG_ENDIAN)
275 +#elif __BYTE_ORDER == __BIG_ENDIAN
276                         __u8            managed:1,
277                                         other:1,
278                                         reserved:6;
279 diff -Nur linux-libc-headers-2.6.12.0.orig/include/linux/ide.h linux-libc-headers-2.6.12.0/include/linux/ide.h
280 --- linux-libc-headers-2.6.12.0.orig/include/linux/ide.h        2005-03-13 21:54:02.000000000 +0100
281 +++ linux-libc-headers-2.6.12.0/include/linux/ide.h     2005-08-23 22:19:47.000000000 +0200
282 @@ -221,14 +221,14 @@
283  typedef union {
284         unsigned all                    : 8;
285         struct {
286 -#if defined(__LITTLE_ENDIAN)
287 +#if __BYTE_ORDER == __LITTLE_ENDIAN
288                 unsigned set_geometry   : 1;
289                 unsigned recalibrate    : 1;
290                 unsigned set_multmode   : 1;
291                 unsigned set_tune       : 1;
292                 unsigned serviced       : 1;
293                 unsigned reserved       : 3;
294 -#elif defined(__BIG_ENDIAN)
295 +#elif __BYTE_ORDER == __BIG_ENDIAN
296                 unsigned reserved       : 3;
297                 unsigned serviced       : 1;
298                 unsigned set_tune       : 1;
299 @@ -250,10 +250,10 @@
300  typedef union {
301         unsigned all                    :16;
302         struct {
303 -#if defined(__LITTLE_ENDIAN)
304 +#if __BYTE_ORDER == __LITTLE_ENDIAN
305                 unsigned low            :8;     /* LSB */
306                 unsigned high           :8;     /* MSB */
307 -#elif defined(__BIG_ENDIAN)
308 +#elif __BYTE_ORDER == __BIG_ENDIAN
309                 unsigned high           :8;     /* MSB */
310                 unsigned low            :8;     /* LSB */
311  #else
312 @@ -277,7 +277,7 @@
313  typedef union {
314         unsigned all                    :8;
315         struct {
316 -#if defined(__LITTLE_ENDIAN)
317 +#if __BYTE_ORDER == __LITTLE_ENDIAN
318                 unsigned mark           :1;
319                 unsigned tzero          :1;
320                 unsigned abrt           :1;
321 @@ -286,7 +286,7 @@
322                 unsigned mce            :1;
323                 unsigned ecc            :1;
324                 unsigned bdd            :1;
325 -#elif defined(__BIG_ENDIAN)
326 +#elif __BYTE_ORDER == __BIG_ENDIAN
327                 unsigned bdd            :1;
328                 unsigned ecc            :1;
329                 unsigned mce            :1;
330 @@ -313,13 +313,13 @@
331  typedef union {
332         unsigned all                    : 8;
333         struct {
334 -#if defined(__LITTLE_ENDIAN)
335 +#if __BYTE_ORDER == __LITTLE_ENDIAN
336                 unsigned head           : 4;
337                 unsigned unit           : 1;
338                 unsigned bit5           : 1;
339                 unsigned lba            : 1;
340                 unsigned bit7           : 1;
341 -#elif defined(__BIG_ENDIAN)
342 +#elif __BYTE_ORDER == __BIG_ENDIAN
343                 unsigned bit7           : 1;
344                 unsigned lba            : 1;
345                 unsigned bit5           : 1;
346 @@ -351,7 +351,7 @@
347  typedef union {
348         unsigned all                    :8;
349         struct {
350 -#if defined(__LITTLE_ENDIAN)
351 +#if __BYTE_ORDER == __LITTLE_ENDIAN
352                 unsigned check          :1;
353                 unsigned idx            :1;
354                 unsigned corr           :1;
355 @@ -360,7 +360,7 @@
356                 unsigned df             :1;
357                 unsigned drdy           :1;
358                 unsigned bsy            :1;
359 -#elif defined(__BIG_ENDIAN)
360 +#elif __BYTE_ORDER == __BIG_ENDIAN
361                 unsigned bsy            :1;
362                 unsigned drdy           :1;
363                 unsigned df             :1;
364 @@ -388,14 +388,14 @@
365  typedef union {
366         unsigned all                    : 8;
367         struct {
368 -#if defined(__LITTLE_ENDIAN)
369 +#if __BYTE_ORDER == __LITTLE_ENDIAN
370                 unsigned bit0           : 1;
371                 unsigned nIEN           : 1;
372                 unsigned SRST           : 1;
373                 unsigned bit3           : 1;
374                 unsigned reserved456    : 3;
375                 unsigned HOB            : 1;
376 -#elif defined(__BIG_ENDIAN)
377 +#elif __BYTE_ORDER == __BIG_ENDIAN
378                 unsigned HOB            : 1;
379                 unsigned reserved456    : 3;
380                 unsigned bit3           : 1;
381 @@ -419,12 +419,12 @@
382  typedef union {
383         unsigned all                    :8;
384         struct {
385 -#if defined(__LITTLE_ENDIAN)
386 +#if __BYTE_ORDER == __LITTLE_ENDIAN
387                 unsigned dma            :1;
388                 unsigned reserved321    :3;
389                 unsigned reserved654    :3;
390                 unsigned reserved7      :1;
391 -#elif defined(__BIG_ENDIAN)
392 +#elif __BYTE_ORDER == __BIG_ENDIAN
393                 unsigned reserved7      :1;
394                 unsigned reserved654    :3;
395                 unsigned reserved321    :3;
396 @@ -445,11 +445,11 @@
397  typedef union {
398         unsigned all                    :8;
399         struct {
400 -#if defined(__LITTLE_ENDIAN)
401 +#if __BYTE_ORDER == __LITTLE_ENDIAN
402                 unsigned cod            :1;
403                 unsigned io             :1;
404                 unsigned reserved       :6;
405 -#elif defined(__BIG_ENDIAN)
406 +#elif __BYTE_ORDER == __BIG_ENDIAN
407                 unsigned reserved       :6;
408                 unsigned io             :1;
409                 unsigned cod            :1;
410 @@ -471,13 +471,13 @@
411  typedef union {
412         unsigned all                    :8;
413         struct {
414 -#if defined(__LITTLE_ENDIAN)
415 +#if __BYTE_ORDER == __LITTLE_ENDIAN
416                 unsigned ili            :1;
417                 unsigned eom            :1;
418                 unsigned abrt           :1;
419                 unsigned mcr            :1;
420                 unsigned sense_key      :4;
421 -#elif defined(__BIG_ENDIAN)
422 +#elif __BYTE_ORDER == __BIG_ENDIAN
423                 unsigned sense_key      :4;
424                 unsigned mcr            :1;
425                 unsigned abrt           :1;
426 @@ -506,14 +506,14 @@
427  typedef union {
428         unsigned all                    :8;
429         struct {
430 -#if defined(__LITTLE_ENDIAN)
431 +#if __BYTE_ORDER == __LITTLE_ENDIAN
432                 unsigned sam_lun        :3;
433                 unsigned reserved3      :1;
434                 unsigned drv            :1;
435                 unsigned one5           :1;
436                 unsigned reserved6      :1;
437                 unsigned one7           :1;
438 -#elif defined(__BIG_ENDIAN)
439 +#elif __BYTE_ORDER == __BIG_ENDIAN
440                 unsigned one7           :1;
441                 unsigned reserved6      :1;
442                 unsigned one5           :1;
443 diff -Nur linux-libc-headers-2.6.12.0.orig/include/linux/if_hippi.h linux-libc-headers-2.6.12.0/include/linux/if_hippi.h
444 --- linux-libc-headers-2.6.12.0.orig/include/linux/if_hippi.h   2004-10-31 20:55:19.000000000 +0100
445 +++ linux-libc-headers-2.6.12.0/include/linux/if_hippi.h        2005-08-23 22:19:47.000000000 +0200
446 @@ -82,7 +82,7 @@
447  {
448  #if 0
449         __u8            ulp;                            /* must contain 4 */
450 -#if defined (__BIG_ENDIAN)
451 +#if __BYTE_ORDER == __BIG_ENDIAN
452         __u8            d1_data_present:1;              /* must be 1 */
453         __u8            start_d2_burst_boundary:1;      /* must be zero */
454         __u8            reserved:6;                     /* must be zero */
455 @@ -91,7 +91,7 @@
456         __u16           d1_area_size:8;                 /* must be 3 */
457         __u16           d2_offset:3;                    /* must be zero */
458  #endif
459 -#elif defined(__LITTLE_ENDIAN)
460 +#elif __BYTE_ORDER == __LITTLE_ENDIAN
461         __u8            reserved:6;                     /* must be zero */
462         __u8            start_d2_burst_boundary:1;      /* must be zero */
463         __u8            d1_data_present:1;              /* must be 1 */
464 @@ -111,20 +111,20 @@
465  
466  struct hippi_le_hdr
467  {
468 -#if defined (__BIG_ENDIAN)
469 +#if __BYTE_ORDER == __BIG_ENDIAN
470         __u8            fc:3;
471         __u8            double_wide:1;
472         __u8            message_type:4;
473 -#elif defined(__LITTLE_ENDIAN)
474 +#elif __BYTE_ORDER == __LITTLE_ENDIAN
475         __u8            message_type:4;
476         __u8            double_wide:1;
477         __u8            fc:3;
478  #endif
479         __u8            dest_switch_addr[3];
480 -#if defined (__BIG_ENDIAN)
481 +#if __BYTE_ORDER == __BIG_ENDIAN
482         __u8            dest_addr_type:4,
483                         src_addr_type:4;
484 -#elif defined(__LITTLE_ENDIAN)
485 +#elif __BYTE_ORDER == __LITTLE_ENDIAN
486         __u8            src_addr_type:4,
487                         dest_addr_type:4;
488  #endif
489 diff -Nur linux-libc-headers-2.6.12.0.orig/include/linux/if_pppox.h linux-libc-headers-2.6.12.0/include/linux/if_pppox.h
490 --- linux-libc-headers-2.6.12.0.orig/include/linux/if_pppox.h   2005-03-13 21:54:01.000000000 +0100
491 +++ linux-libc-headers-2.6.12.0/include/linux/if_pppox.h        2005-08-23 22:19:47.000000000 +0200
492 @@ -91,10 +91,10 @@
493  #define PTT_GEN_ERR    __constant_htons(0x0203)
494  
495  struct pppoe_hdr {
496 -#if defined(__LITTLE_ENDIAN)
497 +#if __BYTE_ORDER == __LITTLE_ENDIAN
498         __u8 ver : 4;
499         __u8 type : 4;
500 -#elif defined(__BIG_ENDIAN)
501 +#elif __BYTE_ORDER == __BIG_ENDIAN
502         __u8 type : 4;
503         __u8 ver : 4;
504  #else
505 diff -Nur linux-libc-headers-2.6.12.0.orig/include/linux/igmp.h linux-libc-headers-2.6.12.0/include/linux/igmp.h
506 --- linux-libc-headers-2.6.12.0.orig/include/linux/igmp.h       2005-03-26 19:58:04.000000000 +0100
507 +++ linux-libc-headers-2.6.12.0/include/linux/igmp.h    2005-08-23 22:19:47.000000000 +0200
508 @@ -67,11 +67,11 @@
509         __u8 code;
510         __u16 csum;
511         __u32 group;
512 -#if defined(__LITTLE_ENDIAN)
513 +#if __BYTE_ORDER == __LITTLE_ENDIAN
514         __u8 qrv:3,
515              suppress:1,
516              resv:4;
517 -#elif defined(__BIG_ENDIAN)
518 +#elif __BYTE_ORDER == __BIG_ENDIAN
519         __u8 resv:4,
520              suppress:1,
521              qrv:3;
522 diff -Nur linux-libc-headers-2.6.12.0.orig/include/linux/ip.h linux-libc-headers-2.6.12.0/include/linux/ip.h
523 --- linux-libc-headers-2.6.12.0.orig/include/linux/ip.h 2004-10-31 20:55:50.000000000 +0100
524 +++ linux-libc-headers-2.6.12.0/include/linux/ip.h      2005-08-23 22:21:06.000000000 +0200
525 @@ -83,10 +83,10 @@
526  #ifndef __NETINET_IP_H
527  
528  struct iphdr {
529 -#if defined(__LITTLE_ENDIAN)
530 +#if __BYTE_ORDER == __LITTLE_ENDIAN
531         __u8    ihl:4,
532                 version:4;
533 -#elif defined (__BIG_ENDIAN)
534 +#elif __BYTE_ORDER == __BIG_ENDIAN
535         __u8    version:4,
536                 ihl:4;
537  #else
538 diff -Nur linux-libc-headers-2.6.12.0.orig/include/linux/ipv6.h linux-libc-headers-2.6.12.0/include/linux/ipv6.h
539 --- linux-libc-headers-2.6.12.0.orig/include/linux/ipv6.h       2004-10-31 20:56:07.000000000 +0100
540 +++ linux-libc-headers-2.6.12.0/include/linux/ipv6.h    2005-08-23 22:19:47.000000000 +0200
541 @@ -102,10 +102,10 @@
542   */
543  
544  struct ipv6hdr {
545 -#if defined(__LITTLE_ENDIAN)
546 +#if __BYTE_ORDER == __LITTLE_ENDIAN
547         __u8                    priority:4,
548                                 version:4;
549 -#elif defined(__BIG_ENDIAN)
550 +#elif __BYTE_ORDER == __BIG_ENDIAN
551         __u8                    version:4,
552                                 priority:4;
553  #else
554 diff -Nur linux-libc-headers-2.6.12.0.orig/include/linux/mtd/map.h linux-libc-headers-2.6.12.0/include/linux/mtd/map.h
555 --- linux-libc-headers-2.6.12.0.orig/include/linux/mtd/map.h    2005-03-25 20:34:24.000000000 +0100
556 +++ linux-libc-headers-2.6.12.0/include/linux/mtd/map.h 2005-08-23 22:19:47.000000000 +0200
557 @@ -7,6 +7,7 @@
558  #include <linux/types.h>
559  #include <asm/system.h>
560  #include <asm/io.h>
561 +#include <endian.h>
562  
563  /* The map stuff is very simple. You fill in your struct map_info with
564     a handful of routines for accessing the device, making sure they handle
565 @@ -160,7 +161,7 @@
566         } else {
567                 for (i=start; i < start+len; i++) {
568                         int bitpos;
569 -#ifdef __LITTLE_ENDIAN
570 +#if __BYTE_ORDER == __LITTLE_ENDIAN
571                         bitpos = i*8;
572  #else /* __BIG_ENDIAN */
573                         bitpos = (map_bankwidth(map)-1-i)*8;
574 diff -Nur linux-libc-headers-2.6.12.0.orig/include/linux/raid/md_p.h linux-libc-headers-2.6.12.0/include/linux/raid/md_p.h
575 --- linux-libc-headers-2.6.12.0.orig/include/linux/raid/md_p.h  2005-03-26 19:58:00.000000000 +0100
576 +++ linux-libc-headers-2.6.12.0/include/linux/raid/md_p.h       2005-08-23 22:19:47.000000000 +0200
577 @@ -16,6 +16,7 @@
578  #define _MD_P_H
579  
580  #include <asm/types.h>
581 +#include <endian.h>
582  
583  /*
584   * RAID superblock.
585 @@ -130,7 +131,7 @@
586         __u32 failed_disks;     /*  4 Number of failed disks                  */
587         __u32 spare_disks;      /*  5 Number of spare disks                   */
588         __u32 sb_csum;          /*  6 checksum of the whole superblock        */
589 -#ifdef __BIG_ENDIAN
590 +#if __BYTE_ORDER == __BIG_ENDIAN
591         __u32 events_hi;        /*  7 high-order of superblock update count   */
592         __u32 events_lo;        /*  8 low-order of superblock update count    */
593         __u32 cp_events_hi;     /*  9 high-order of checkpoint update count   */
594 diff -Nur linux-libc-headers-2.6.12.0.orig/include/linux/tcp.h linux-libc-headers-2.6.12.0/include/linux/tcp.h
595 --- linux-libc-headers-2.6.12.0.orig/include/linux/tcp.h        2005-01-08 15:03:40.000000000 +0100
596 +++ linux-libc-headers-2.6.12.0/include/linux/tcp.h     2005-08-23 22:22:11.000000000 +0200
597 @@ -18,6 +18,7 @@
598  #define _LINUX_TCP_H
599  
600  #include <linux/types.h>
601 +#include <endian.h>
602  #include <asm/byteorder.h>
603  
604  struct tcphdr {
605 @@ -25,7 +26,7 @@
606         __u16   dest;
607         __u32   seq;
608         __u32   ack_seq;
609 -#if defined(__LITTLE_ENDIAN)
610 +#if __BYTE_ORDER == __LITTLE_ENDIAN
611         __u16   res1:4,
612                 doff:4,
613                 fin:1,
614 @@ -36,7 +37,7 @@
615                 urg:1,
616                 ece:1,
617                 cwr:1;
618 -#elif defined(__BIG_ENDIAN)
619 +#elif __BYTE_ORDER == __BIG_ENDIAN
620         __u16   doff:4,
621                 res1:4,
622                 cwr:1,
623 diff -Nur linux-libc-headers-2.6.12.0.orig/include/sound/cs46xx_dsp_scb_types.h linux-libc-headers-2.6.12.0/include/sound/cs46xx_dsp_scb_types.h
624 --- linux-libc-headers-2.6.12.0.orig/include/sound/cs46xx_dsp_scb_types.h       2005-03-25 20:30:35.000000000 +0100
625 +++ linux-libc-headers-2.6.12.0/include/sound/cs46xx_dsp_scb_types.h    2005-08-23 22:19:47.000000000 +0200
626 @@ -27,12 +27,12 @@
627  #ifndef __CS46XX_DSP_SCB_TYPES_H__
628  #define __CS46XX_DSP_SCB_TYPES_H__
629  
630 -#include <asm/byteorder.h>
631 +#include <endian.h>
632  
633  #ifndef ___DSP_DUAL_16BIT_ALLOC
634 -#if   defined(__LITTLE_ENDIAN)
635 +#if   __BYTE_ORDER == __LITTLE_ENDIAN
636  #define ___DSP_DUAL_16BIT_ALLOC(a,b) __u16 a; __u16 b;
637 -#elif defined(__BIG_ENDIAN)
638 +#elif __BYTE_ORDER == __BIG_ENDIAN
639  #define ___DSP_DUAL_16BIT_ALLOC(a,b) __u16 b; __u16 a;
640  #else
641  #error Not __LITTLE_ENDIAN and not __BIG_ENDIAN, then what ???
This page took 0.078904 seconds and 3 git commands to generate.