linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH] 2.4.21-rc1: byteorder.h breaks with __STRICT_ANSI__ defined (trivial)
@ 2003-11-06 17:36 Martin Schlemmer
  2003-11-06 17:37 ` David S. Miller
  0 siblings, 1 reply; 46+ messages in thread
From: Martin Schlemmer @ 2003-11-06 17:36 UTC (permalink / raw)
  To: David S. Miller; +Cc: KML

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

On Tue, 2003-05-06 at 04:19, David S. Miller wrote:
> On Tue, 2003-05-06 at 02:16, Thomas Horsten wrote: 
> > The following patch fixes the problem:
>
> Making the u64 swabbing functions unavailable is not an 
> acceptable solution. 
>

Sorry to dig this up again, but wont __STRICT_ANSI__ assume
that the program will not use u64 functions (as the program/compiler
is supposed to adhere to ansi standards)?


Thanks,

-- 

Martin Schlemmer



[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 46+ messages in thread
[parent not found: <20030506110259.A29633@infradead.org>]
* [PATCH] 2.4.21-rc1: byteorder.h breaks with __STRICT_ANSI__ defined (trivial)
@ 2003-05-06  9:16 Thomas Horsten
  2003-05-06  9:19 ` David S. Miller
  2003-05-06  9:38 ` Christoph Hellwig
  0 siblings, 2 replies; 46+ messages in thread
From: Thomas Horsten @ 2003-05-06  9:16 UTC (permalink / raw)
  To: linux-kernel

Hi,

In 2.4.21-rc1 some inline functions are added to asm-i386/byteorder.h.
When __STRICT_ANSI__ is defined, __u64 doesn't get defined by
asm-i386/types.h, but it is used in one of the new inline functions,
__arch__swab64.

This causes files that use __STRICT_ANSI__ and include any file that
relies on byteorder.h to give a compile error:

make[4]: Entering directory `/var/tmp/portage/kdemultimedia-3.1.1/work/kdemultimedia-3.1.1/kioslave/audiocd'
/bin/sh ../../libtool --silent --mode=compile --tag=CXX g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/kde/3.1/include -I/usr/qt/3/include -I/usr/X11R6/include      -DQT_THREAD_SUPPORT  -D_REENTRANT  -Wnon-virtual-dtor -Wno-long-long -Wundef -Wall -pedantic -W -Wpointer-arith -Wmissing-prototypes -Wwrite-strings -ansi -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -Wcast-align -Wconversion -DNDEBUG -DNO_DEBUG -O2 -mcpu=athlon-xp -O2 -pipe -fno-exceptions -fno-check-new -DQT_CLEAN_NAMESPACE -DQT_NO_ASCII_CAST  -c -o audiocd.lo `test -f audiocd.cpp || echo './'`audiocd.cpp
In file included from /usr/include/linux/cdrom.h:14,
                 from audiocd.cpp:57:
/usr/include/asm/byteorder.h:38: syntax error before `(' token
[.....]

The following patch fixes the problem:

--- linux-2.4.21-rc1-orig/include/asm-i386/byteorder.h	2003-05-06 09:52:33.000000000 +0100
+++ linux-2.4.21-rc1-ac4-th/include/asm-i386/byteorder.h	2003-05-06 09:51:13.000000000 +0100
@@ -34,7 +34,7 @@
 		return x;
 }

-
+#ifndef __STRICT_ANSI__
 static inline __u64 ___arch__swab64(__u64 val)
 {
 	union {
@@ -53,12 +53,17 @@
 #endif
 	return v.u;
 }
+#endif /* !__STRICT_ANSI__ */

+#ifndef __STRICT_ANSI__
 #define __arch__swab64(x) ___arch__swab64(x)
+#endif
 #define __arch__swab32(x) ___arch__swab32(x)
 #define __arch__swab16(x) ___arch__swab16(x)

+#ifndef __STRICT_ANSI__
 #define __BYTEORDER_HAS_U64__
+#endif

 #endif /* __GNUC__ */


// Thomas


^ permalink raw reply	[flat|nested] 46+ messages in thread

end of thread, other threads:[~2003-11-15 13:23 UTC | newest]

Thread overview: 46+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-06 17:36 [PATCH] 2.4.21-rc1: byteorder.h breaks with __STRICT_ANSI__ defined (trivial) Martin Schlemmer
2003-11-06 17:37 ` David S. Miller
2003-11-06 18:32   ` Martin Schlemmer
2003-11-06 18:42     ` Martin Schlemmer
2003-11-06 19:37       ` David S. Miller
2003-11-06 20:09         ` Martin Schlemmer
2003-11-06 20:05           ` David S. Miller
2003-11-06 20:29             ` Martin Schlemmer
2003-11-06 20:27               ` David S. Miller
2003-11-06 21:18                 ` Martin Schlemmer
2003-11-06 21:18                   ` David S. Miller
2003-11-06 21:59                     ` Martin Schlemmer
2003-11-06 21:24                   ` Daniel Jacobowitz
2003-11-06 20:40               ` H. Peter Anvin
2003-11-06 22:31                 ` David S. Miller
2003-11-06 23:40                   ` H. Peter Anvin
2003-11-06 21:21             ` Daniel Jacobowitz
     [not found]   ` <1068489427.7910.147.camel@nosferatu.lan>
     [not found]     ` <3FAFE1E2.2020000@zytor.com>
     [not found]       ` <1068589739.19849.2.camel@nosferatu.lan>
     [not found]         ` <20031111145805.45206335.davem@redhat.com>
2003-11-15 13:09           ` [PATCH 2.4] " Martin Schlemmer
2003-11-15 13:24           ` [PATCH 2.6] " Martin Schlemmer
     [not found] <20030506110259.A29633@infradead.org>
2003-05-06 10:24 ` [PATCH] 2.4.21-rc1: " Thomas Horsten
  -- strict thread matches above, loose matches on Subject: below --
2003-05-06  9:16 Thomas Horsten
2003-05-06  9:19 ` David S. Miller
2003-05-06  9:38 ` Christoph Hellwig
2003-05-06  9:47   ` Thomas Horsten
2003-05-06  9:49     ` Christoph Hellwig
2003-05-06 10:03       ` David S. Miller
2003-05-06 14:10         ` Thomas Horsten
2003-05-06 13:06           ` David S. Miller
2003-05-06 15:40             ` Thomas Horsten
2003-05-07  5:50               ` ismail (cartman) donmez
2003-05-07  6:44                 ` Thomas Horsten
2003-05-07  6:45                   ` Christoph Hellwig
2003-05-07  5:44                     ` David S. Miller
2003-05-07  6:55                       ` Christoph Hellwig
2003-05-07  6:59                     ` Thomas Horsten
2003-05-07  5:53                       ` David S. Miller
2003-05-06 21:19           ` David Woodhouse
2003-05-07  3:06             ` David S. Miller
2003-05-07  5:26               ` Christoph Hellwig
2003-05-07  5:07                 ` David S. Miller
2003-05-07  6:20                   ` Christoph Hellwig
2003-05-07  5:19                     ` David S. Miller
2003-05-07  6:28                       ` Christoph Hellwig
2003-05-07  5:27                         ` David S. Miller
2003-05-07  6:41                           ` Christoph Hellwig
2003-05-07  5:42                             ` David S. Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).