]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/patches/SuSE10.2/gcc4-diff
Hinzugefuegt:
[people/pmueller/ipfire-2.x.git] / src / patches / SuSE10.2 / gcc4-diff
1 --- grub-0.96/netboot/main.c
2 +++ grub-0.96/netboot/main.c
3 @@ -54,9 +54,9 @@
4
5 static int vendorext_isvalid;
6 static unsigned long netmask;
7 -static struct bootpd_t bootp_data;
8 +struct bootpd_t bootp_data;
9 static unsigned long xid;
10 -static unsigned char *end_of_rfc1533 = NULL;
11 +unsigned char *end_of_rfc1533 = NULL;
12
13 #ifndef NO_DHCP_SUPPORT
14 #endif /* NO_DHCP_SUPPORT */
15 --- grub-0.96/stage2/disk_io.c
16 +++ grub-0.96/stage2/disk_io.c
17 @@ -128,7 +128,7 @@
18 int filemax;
19
20 static inline unsigned long
21 -log2 (unsigned long word)
22 +grub_log2 (unsigned long word)
23 {
24 asm volatile ("bsfl %1,%0"
25 : "=r" (word)
26 @@ -140,7 +140,7 @@
27 rawread (int drive, int sector, int byte_offset, int byte_len, char *buf)
28 {
29 int slen, sectors_per_vtrack;
30 - int sector_size_bits = log2 (buf_geom.sector_size);
31 + int sector_size_bits = grub_log2 (buf_geom.sector_size);
32
33 if (byte_len <= 0)
34 return 1;
35 @@ -163,7 +163,7 @@
36 }
37 buf_drive = drive;
38 buf_track = -1;
39 - sector_size_bits = log2 (buf_geom.sector_size);
40 + sector_size_bits = grub_log2 (buf_geom.sector_size);
41 }
42
43 /* Make sure that SECTOR is valid. */
44 --- grub-0.96/stage2/fsys_ext2fs.c
45 +++ grub-0.96/stage2/fsys_ext2fs.c
46 @@ -193,7 +193,7 @@
47
48
49 /* ext2/super.c */
50 -#define log2(n) ffz(~(n))
51 +#define grub_log2(n) ffz(~(n))
52
53 #define EXT2_SUPER_MAGIC 0xEF53 /* include/linux/ext2_fs.h */
54 #define EXT2_ROOT_INO 2 /* include/linux/ext2_fs.h */
55 @@ -216,7 +216,7 @@
56
57 /* linux/ext2_fs.h */
58 #define EXT2_ADDR_PER_BLOCK(s) (EXT2_BLOCK_SIZE(s) / sizeof (__u32))
59 -#define EXT2_ADDR_PER_BLOCK_BITS(s) (log2(EXT2_ADDR_PER_BLOCK(s)))
60 +#define EXT2_ADDR_PER_BLOCK_BITS(s) (grub_log2(EXT2_ADDR_PER_BLOCK(s)))
61
62 /* linux/ext2_fs.h */
63 #define EXT2_BLOCK_SIZE_BITS(s) ((s)->s_log_block_size + 10)
64 @@ -537,7 +537,7 @@
65
66 /* look up an inode */
67 group_id = (current_ino - 1) / (SUPERBLOCK->s_inodes_per_group);
68 - group_desc = group_id >> log2 (EXT2_DESC_PER_BLOCK (SUPERBLOCK));
69 + group_desc = group_id >> grub_log2 (EXT2_DESC_PER_BLOCK (SUPERBLOCK));
70 desc = group_id & (EXT2_DESC_PER_BLOCK (SUPERBLOCK) - 1);
71 #ifdef E2DEBUG
72 printf ("ipg=%d, dpb=%d\n", SUPERBLOCK->s_inodes_per_group,
73 @@ -553,7 +553,7 @@
74 gdp = GROUP_DESC;
75 ino_blk = gdp[desc].bg_inode_table +
76 (((current_ino - 1) % (SUPERBLOCK->s_inodes_per_group))
77 - >> log2 (EXT2_BLOCK_SIZE (SUPERBLOCK) / sizeof (struct ext2_inode)));
78 + >> grub_log2 (EXT2_BLOCK_SIZE (SUPERBLOCK) / sizeof (struct ext2_inode)));
79 #ifdef E2DEBUG
80 printf ("inode table fsblock=%d\n", ino_blk);
81 #endif /* E2DEBUG */
82 --- grub-0.96/stage2/fsys_fat.c
83 +++ grub-0.96/stage2/fsys_fat.c
84 @@ -55,7 +55,7 @@
85 #define FAT_CACHE_SIZE 2048
86
87 static __inline__ unsigned long
88 -log2 (unsigned long word)
89 +grub_log2 (unsigned long word)
90 {
91 __asm__ ("bsfl %1,%0"
92 : "=r" (word)
93 @@ -84,9 +84,9 @@
94 if (bpb.sects_per_clust == 0)
95 return 0;
96
97 - FAT_SUPER->sectsize_bits = log2 (FAT_CVT_U16 (bpb.bytes_per_sect));
98 + FAT_SUPER->sectsize_bits = grub_log2 (FAT_CVT_U16 (bpb.bytes_per_sect));
99 FAT_SUPER->clustsize_bits
100 - = FAT_SUPER->sectsize_bits + log2 (bpb.sects_per_clust);
101 + = FAT_SUPER->sectsize_bits + grub_log2 (bpb.sects_per_clust);
102
103 /* Fill in info about super block */
104 FAT_SUPER->num_sectors = FAT_CVT_U16 (bpb.short_sectors)
105 --- grub-0.96/stage2/fsys_iso9660.c
106 +++ grub-0.96/stage2/fsys_iso9660.c
107 @@ -57,7 +57,7 @@
108
109
110 static inline unsigned long
111 -log2 (unsigned long word)
112 +grub_log2 (unsigned long word)
113 {
114 asm volatile ("bsfl %1,%0"
115 : "=r" (word)
116 @@ -68,7 +68,7 @@
117 static int
118 iso9660_devread (int sector, int byte_offset, int byte_len, char *buf)
119 {
120 - unsigned short sector_size_lg2 = log2(buf_geom.sector_size);
121 + unsigned short sector_size_lg2 = grub_log2(buf_geom.sector_size);
122
123 /*
124 * We have to use own devread() function since BIOS return wrong geometry
125 --- grub-0.96/stage2/fsys_reiserfs.c
126 +++ grub-0.96/stage2/fsys_reiserfs.c
127 @@ -367,7 +367,7 @@
128
129
130 static __inline__ unsigned long
131 -log2 (unsigned long word)
132 +grub_log2 (unsigned long word)
133 {
134 __asm__ ("bsfl %1,%0"
135 : "=r" (word)
136 @@ -609,7 +609,7 @@
137
138 INFO->version = super.s_version;
139 INFO->blocksize = super.s_blocksize;
140 - INFO->fullblocksize_shift = log2 (super.s_blocksize);
141 + INFO->fullblocksize_shift = grub_log2 (super.s_blocksize);
142 INFO->blocksize_shift = INFO->fullblocksize_shift - SECTOR_BITS;
143 INFO->cached_slots =
144 (FSYSREISER_CACHE_SIZE >> INFO->fullblocksize_shift) - 1;
145 --- grub-0.96/stage2/iso9660.h
146 +++ grub-0.96/stage2/iso9660.h
147 @@ -73,11 +73,11 @@
148
149 typedef struct __iso_16bit {
150 u_int16_t l, b;
151 -} iso_16bit_t __attribute__ ((packed));
152 +} iso_16bit_t;
153
154 typedef struct __iso_32bit {
155 u_int32_t l, b;
156 -} iso_32bit_t __attribute__ ((packed));
157 +} iso_32bit_t;
158
159 typedef u_int8_t iso_date_t[7];
160