lkml.org 
[lkml]   [2003]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[PATCH 2.4] byteorder.h breaks with __STRICT_ANSI__ defined (trivial)
From
Date
Hi Marcelo

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
--- linux-2.4.22/include/asm-i386/types.h 2003-11-10 07:38:32.000000000 +0200
+++ linux-2.4.22.ext/include/asm-i386/types.h 2003-11-10 07:48:42.000000000 +0200
@@ -17,11 +17,15 @@
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;
+
/*
* These aren't exported outside the kernel to avoid name space clashes
*/
\
 
 \ /
  Last update: 2005-03-22 13:58    [W:0.061 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site