source: patches/e2fsprogs-1.39-cross-1.patch@ ee09899c

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since ee09899c was bbaf626, checked in by Ken Moffat <zarniwhoop@…>, 18 years ago

Allow e2fsprogs-1.39 to cross-compile for ppc64 from a host using 'long long' 64-bit types.

  • Property mode set to 100644
File size: 7.4 KB
RevLine 
[bbaf626]1Submitted By: Ken Moffat <ken at linuxfromscratch dot org>
2Date: 2006-07-29
3Initial Package Version: 1.39
4Origin: Self.
5Upstream status: not submitted, pending comments on bug 1529730 for e2fsprogs.
6Description:
7 Revert changes to two .h.in files which prevent cross-compilation for powerpc64
8from x86 and x86_64. I believe the problem will appear whenever the machine
9doing the build uses long long for __{s,u}64and the target uses long, and perhaps
10also the other way around. The following arches that are in the book use long:
11alpha, mips64, ppc64, sparc64. None except ppc64 have reported this, so perhaps
12there is something different there.
13
14--- e2fsprogs-1.39/lib/ext2fs/ext2_types.h.in 2006-04-09 02:39:39.000000000 +0100
15+++ e2fsprogs-1.38/lib/ext2fs/ext2_types.h.in 2004-04-03 16:20:26.000000000 +0100
16@@ -7,128 +7,55 @@
17 !defined(_EXT2_TYPES_H))
18 #define _EXT2_TYPES_H
19
20-@ASM_TYPES_HEADER@
21-
22-#ifdef __U8_TYPEDEF
23-typedef __U8_TYPEDEF __u8;
24-#else
25 typedef unsigned char __u8;
26-#endif
27-
28-#ifdef __S8_TYPEDEF
29-typedef __S8_TYPEDEF __s8;
30-#else
31 typedef signed char __s8;
32-#endif
33
34-#ifdef __U16_TYPEDEF
35-typedef __U16_TYPEDEF __u16;
36+#if (@SIZEOF_INT@ == 8)
37+typedef int __s64;
38+typedef unsigned int __u64;
39 #else
40-#if (@SIZEOF_INT@ == 2)
41-typedef unsigned int __u16;
42+#if (@SIZEOF_LONG@ == 8)
43+typedef long __s64;
44+typedef unsigned long __u64;
45 #else
46-#if (@SIZEOF_SHORT@ == 2)
47-typedef unsigned short __u16;
48+#if (@SIZEOF_LONG_LONG@ == 8)
49+#if defined(__GNUC__)
50+typedef __signed__ long long __s64;
51 #else
52- ?==error: undefined 16 bit type
53-#endif /* SIZEOF_SHORT == 2 */
54-#endif /* SIZEOF_INT == 2 */
55-#endif /* __U16_TYPEDEF */
56+typedef signed long long __s64;
57+#endif /* __GNUC__ */
58+typedef unsigned long long __u64;
59+#endif /* SIZEOF_LONG_LONG == 8 */
60+#endif /* SIZEOF_LONG == 8 */
61+#endif /* SIZEOF_INT == 8 */
62
63-#ifdef __S16_TYPEDEF
64-typedef __S16_TYPEDEF __s16;
65-#else
66 #if (@SIZEOF_INT@ == 2)
67 typedef int __s16;
68+typedef unsigned int __u16;
69 #else
70 #if (@SIZEOF_SHORT@ == 2)
71 typedef short __s16;
72+typedef unsigned short __u16;
73 #else
74 ?==error: undefined 16 bit type
75 #endif /* SIZEOF_SHORT == 2 */
76 #endif /* SIZEOF_INT == 2 */
77-#endif /* __S16_TYPEDEF */
78-
79-
80-#ifdef __U32_TYPEDEF
81-typedef __U32_TYPEDEF __u32;
82-#else
83-#if (@SIZEOF_INT@ == 4)
84-typedef unsigned int __u32;
85-#else
86-#if (@SIZEOF_LONG@ == 4)
87-typedef unsigned long __u32;
88-#else
89-#if (@SIZEOF_SHORT@ == 4)
90-typedef unsigned short __u32;
91-#else
92- ?== error: undefined 32 bit type
93-#endif /* SIZEOF_SHORT == 4 */
94-#endif /* SIZEOF_LONG == 4 */
95-#endif /* SIZEOF_INT == 4 */
96-#endif /* __U32_TYPEDEF */
97
98-#ifdef __S32_TYPEDEF
99-typedef __S32_TYPEDEF __s32;
100-#else
101 #if (@SIZEOF_INT@ == 4)
102 typedef int __s32;
103+typedef unsigned int __u32;
104 #else
105 #if (@SIZEOF_LONG@ == 4)
106 typedef long __s32;
107+typedef unsigned long __u32;
108 #else
109 #if (@SIZEOF_SHORT@ == 4)
110 typedef short __s32;
111+typedef unsigned short __u32;
112 #else
113 ?== error: undefined 32 bit type
114 #endif /* SIZEOF_SHORT == 4 */
115 #endif /* SIZEOF_LONG == 4 */
116 #endif /* SIZEOF_INT == 4 */
117-#endif /* __S32_TYPEDEF */
118-
119-#ifdef __U64_TYPEDEF
120-typedef __U64_TYPEDEF __u64;
121-#else
122-#if (@SIZEOF_INT@ == 8)
123-typedef unsigned int __u64;
124-#else
125-#if (@SIZEOF_LONG@ == 8)
126-typedef unsigned long __u64;
127-#else
128-#if (@SIZEOF_LONG_LONG@ == 8)
129-typedef unsigned long long __u64;
130-#endif /* SIZEOF_LONG_LONG == 8 */
131-#endif /* SIZEOF_LONG == 8 */
132-#endif /* SIZEOF_INT == 8 */
133-#endif /* __U64_TYPEDEF */
134-
135-#ifdef __S64_TYPEDEF
136-typedef __S64_TYPEDEF __s64;
137-#else
138-#if (@SIZEOF_INT@ == 8)
139-typedef int __s64;
140-#else
141-#if (@SIZEOF_LONG@ == 8)
142-typedef long __s64;
143-#else
144-#if (@SIZEOF_LONG_LONG@ == 8)
145-#if defined(__GNUC__)
146-typedef __signed__ long long __s64;
147-#else
148-typedef signed long long __s64;
149-#endif /* __GNUC__ */
150-#endif /* SIZEOF_LONG_LONG == 8 */
151-#endif /* SIZEOF_LONG == 8 */
152-#endif /* SIZEOF_INT == 8 */
153-#endif /* __S64_TYPEDEF */
154-
155-#undef __S8_TYPEDEF
156-#undef __U8_TYPEDEF
157-#undef __S16_TYPEDEF
158-#undef __U16_TYPEDEF
159-#undef __S32_TYPEDEF
160-#undef __U32_TYPEDEF
161-#undef __S64_TYPEDEF
162-#undef __U64_TYPEDEF
163
164 #endif /* _*_TYPES_H */
165--- e2fsprogs-1.39/lib/blkid/blkid_types.h.in 2006-04-09 02:43:44.000000000 +0100
166+++ e2fsprogs-1.38/lib/blkid/blkid_types.h.in 2004-03-30 07:55:10.000000000 +0100
167@@ -7,128 +7,55 @@
168 !defined(_EXT2_TYPES_H))
169 #define _BLKID_TYPES_H
170
171-@ASM_TYPES_HEADER@
172-
173-#ifdef __U8_TYPEDEF
174-typedef __U8_TYPEDEF __u8;
175-#else
176 typedef unsigned char __u8;
177-#endif
178-
179-#ifdef __S8_TYPEDEF
180-typedef __S8_TYPEDEF __s8;
181-#else
182 typedef signed char __s8;
183-#endif
184
185-#ifdef __U16_TYPEDEF
186-typedef __U16_TYPEDEF __u16;
187+#if (@SIZEOF_INT@ == 8)
188+typedef int __s64;
189+typedef unsigned int __u64;
190 #else
191-#if (@SIZEOF_INT@ == 2)
192-typedef unsigned int __u16;
193+#if (@SIZEOF_LONG@ == 8)
194+typedef long __s64;
195+typedef unsigned long __u64;
196 #else
197-#if (@SIZEOF_SHORT@ == 2)
198-typedef unsigned short __u16;
199+#if (@SIZEOF_LONG_LONG@ == 8)
200+#if defined(__GNUC__)
201+typedef __signed__ long long __s64;
202 #else
203- ?==error: undefined 16 bit type
204-#endif /* SIZEOF_SHORT == 2 */
205-#endif /* SIZEOF_INT == 2 */
206-#endif /* __U16_TYPEDEF */
207+typedef signed long long __s64;
208+#endif /* __GNUC__ */
209+typedef unsigned long long __u64;
210+#endif /* SIZEOF_LONG_LONG == 8 */
211+#endif /* SIZEOF_LONG == 8 */
212+#endif /* SIZEOF_INT == 8 */
213
214-#ifdef __S16_TYPEDEF
215-typedef __S16_TYPEDEF __s16;
216-#else
217 #if (@SIZEOF_INT@ == 2)
218 typedef int __s16;
219+typedef unsigned int __u16;
220 #else
221 #if (@SIZEOF_SHORT@ == 2)
222 typedef short __s16;
223+typedef unsigned short __u16;
224 #else
225 ?==error: undefined 16 bit type
226 #endif /* SIZEOF_SHORT == 2 */
227 #endif /* SIZEOF_INT == 2 */
228-#endif /* __S16_TYPEDEF */
229-
230-
231-#ifdef __U32_TYPEDEF
232-typedef __U32_TYPEDEF __u32;
233-#else
234-#if (@SIZEOF_INT@ == 4)
235-typedef unsigned int __u32;
236-#else
237-#if (@SIZEOF_LONG@ == 4)
238-typedef unsigned long __u32;
239-#else
240-#if (@SIZEOF_SHORT@ == 4)
241-typedef unsigned short __u32;
242-#else
243- ?== error: undefined 32 bit type
244-#endif /* SIZEOF_SHORT == 4 */
245-#endif /* SIZEOF_LONG == 4 */
246-#endif /* SIZEOF_INT == 4 */
247-#endif /* __U32_TYPEDEF */
248
249-#ifdef __S32_TYPEDEF
250-typedef __S32_TYPEDEF __s32;
251-#else
252 #if (@SIZEOF_INT@ == 4)
253 typedef int __s32;
254+typedef unsigned int __u32;
255 #else
256 #if (@SIZEOF_LONG@ == 4)
257 typedef long __s32;
258+typedef unsigned long __u32;
259 #else
260 #if (@SIZEOF_SHORT@ == 4)
261 typedef short __s32;
262+typedef unsigned short __u32;
263 #else
264 ?== error: undefined 32 bit type
265 #endif /* SIZEOF_SHORT == 4 */
266 #endif /* SIZEOF_LONG == 4 */
267 #endif /* SIZEOF_INT == 4 */
268-#endif /* __S32_TYPEDEF */
269-
270-#ifdef __U64_TYPEDEF
271-typedef __U64_TYPEDEF __u64;
272-#else
273-#if (@SIZEOF_INT@ == 8)
274-typedef unsigned int __u64;
275-#else
276-#if (@SIZEOF_LONG@ == 8)
277-typedef unsigned long __u64;
278-#else
279-#if (@SIZEOF_LONG_LONG@ == 8)
280-typedef unsigned long long __u64;
281-#endif /* SIZEOF_LONG_LONG == 8 */
282-#endif /* SIZEOF_LONG == 8 */
283-#endif /* SIZEOF_INT == 8 */
284-#endif /* __U64_TYPEDEF */
285-
286-#ifdef __S64_TYPEDEF
287-typedef __S64_TYPEDEF __s64;
288-#else
289-#if (@SIZEOF_INT@ == 8)
290-typedef int __s64;
291-#else
292-#if (@SIZEOF_LONG@ == 8)
293-typedef long __s64;
294-#else
295-#if (@SIZEOF_LONG_LONG@ == 8)
296-#if defined(__GNUC__)
297-typedef __signed__ long long __s64;
298-#else
299-typedef signed long long __s64;
300-#endif /* __GNUC__ */
301-#endif /* SIZEOF_LONG_LONG == 8 */
302-#endif /* SIZEOF_LONG == 8 */
303-#endif /* SIZEOF_INT == 8 */
304-#endif /* __S64_TYPEDEF */
305-
306-#undef __S8_TYPEDEF
307-#undef __U8_TYPEDEF
308-#undef __S16_TYPEDEF
309-#undef __U16_TYPEDEF
310-#undef __S32_TYPEDEF
311-#undef __U32_TYPEDEF
312-#undef __S64_TYPEDEF
313-#undef __U64_TYPEDEF
314
315 #endif /* _*_TYPES_H */
Note: See TracBrowser for help on using the repository browser.