linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* byteorder.h
@ 2001-08-10 12:36 Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2001-08-10 12:36 UTC (permalink / raw)
  To: paulus; +Cc: torvalds, linux-kernel

  Hello,

  I think I've found a small bug in asm-ppc/byteorder.h. The problem is that symbol
__BYTEORDER_HAS_U64__ is defined only if __KERNEL__ is defined but on other archs
it's defined also if __STRICT_ANSI__ is not defined and this is IMHO right. Patch
which fixes it is below.

									Honza

----------------------------------------------------------------------------------
--- linux/include/asm-ppc/byteorder.h	Fri Aug 10 14:25:17 2001
+++ linux/include/asm-ppc/byteorder.h	Fri Aug 10 14:28:10 2001
@@ -6,8 +6,8 @@
 
 #include <asm/types.h>
 
-#ifdef __KERNEL__
 #ifdef __GNUC__
+#ifdef __KERNEL__
 
 extern __inline__ unsigned ld_le16(const volatile unsigned short *addr)
 {
@@ -72,12 +72,13 @@
 #define __arch__swab16s(addr) st_le16(addr,*addr)
 #define __arch__swab32s(addr) st_le32(addr,*addr)
 
-#ifndef __STRICT_ANSI__
+#endif /* __KERNEL__ */
+
+#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
 #define __BYTEORDER_HAS_U64__
 #endif
 
 #endif /* __GNUC__ */
-#endif /* __KERNEL__ */
 
 #include <linux/byteorder/big_endian.h>
 

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

* Re: byteorder.h
       [not found] <mailman.997447201.20256.linux-kernel2news@redhat.com>
@ 2001-08-10 22:16 ` Pete Zaitcev
  0 siblings, 0 replies; 2+ messages in thread
From: Pete Zaitcev @ 2001-08-10 22:16 UTC (permalink / raw)
  To: jack; +Cc: linux-kernel

>   I think I've found a small bug in asm-ppc/byteorder.h. The problem is that symbol
> __BYTEORDER_HAS_U64__ is defined only if __KERNEL__ is defined but on other archs
> it's defined also if __STRICT_ANSI__ is not defined and this is IMHO right.

Why do you care?

-- Pete

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

end of thread, other threads:[~2001-08-10 22:16 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-08-10 12:36 byteorder.h Jan Kara
     [not found] <mailman.997447201.20256.linux-kernel2news@redhat.com>
2001-08-10 22:16 ` byteorder.h Pete Zaitcev

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).