From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sun, 29 Jun 2003 12:14:15 -0600 From: Grant Grundler To: parisc-linux@lists.parisc-linux.org Message-ID: <20030629181415.GA21094@dsl2.external.hp.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: [parisc-linux] byte swapping redux Sender: parisc-linux-admin@lists.parisc-linux.org Errors-To: parisc-linux-admin@lists.parisc-linux.org List-Help: List-Post: List-Subscribe: , List-Id: parisc-linux developers list List-Unsubscribe: , List-Archive: Hi all, Can someone explain why include/asm-parisc/byteorder.h uses the following? #if !defined(__STRICT_ANSI__) || defined(__KERNEL__) # define __BYTEORDER_HAS_U64__ # define __SWAB_64_THRU_32__ #endif vs include/asm-sparc64/byeorder.h: #define __BYTEORDER_HAS_U64__ I'm pretty sure we don't want __SWAB_64_THRU_32__ defined. PA-RISC version of ___arch__swab64() is appropriately defined for both 32 and 64-bit compiles. For reference include/linux/byteorder/swab.h says: #ifdef __BYTEORDER_HAS_U64__ static __inline__ __const__ __u64 __fswab64(__u64 x) { # ifdef __SWAB_64_THRU_32__ __u32 h = x >> 32; __u32 l = x & ((1ULL<<32)-1); return (((__u64)__swab32(l)) << 32) | ((__u64)(__swab32(h))); # else return __arch__swab64(x); # endif } ... thanks, grant