[PATCH 2.6] byteorder.h breaks with __STRICT_ANSI__ defined (trivial)

Martin Schlemmer
2003-11-15T13:23:16Z

[-- Attachment #1: Type: text/plain, Size: 310 bytes --]

Hi Linus

This patch fixes include/asm-i386/types.h to define __s64 and __u64
even with -ansi passed to gcc, else we get breaks for userland that
may include include/asm-i386/byteorder.h through another header.

It is with help/comments from David S. Miller and H. Peter Anvin.

Thanks,

--
Martin Schlemmer

[-- Attachment #2: 2.6.0-test9-asm-types_h-extension.patch --]
[-- Type: text/x-patch, Size: 559 bytes --]

--- 1/include/asm-i386/types.h 2003-11-15 15:10:09.256721568 +0200
+++ 2/include/asm-i386/types.h 2003-11-15 15:11:07.348890216 +0200
@@ -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;
+#ifndef __GNUC__
+# ifndef __extension__
+# define __extension__
+# endif
#endif
+
+__extension__ typedef __signed__ long long __s64;
+__extension__ typedef unsigned long long __u64;

#endif /* __ASSEMBLY__ */