[sword-devel] swbyteswap.h

Daniel Glassey sword-devel@crosswire.org
Tue, 28 Aug 2001 11:15:05 +0100


--Message-Boundary-5682
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Mail message body

I don't know about Solaris but byteswap.h is on Debian Sparc, so the 
#ifdef PPC isn't needed. 

I'm fairly sure that'll fix a longstanding problem, thanks Chris for 
your work on PowerPC :)
http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=103732&repeatmerged=yes

Would it be possible to make another minor release soon, or shall I 
just integrate this into 1.5.2 for debian?

Daniel (who is hopefully back in the loop again)


--Message-Boundary-5682
Content-type: text/plain; charset=US-ASCII
Content-transfer-encoding: 7BIT
Content-description: Text from file 'swap.diff'

--- swbyteswap.h	Tue Aug 28 11:07:46 2001
+++ swbyteswap.h.orig	Tue Aug 28 11:07:24 2001
@@ -28,11 +28,19 @@
 #define SWAP16(x) NXSwapLittleShortToHost(x)
 
 #else
+#ifdef PPC
 
 #include <byteswap.h>
 #define SWAP32(x) bswap_32(x)
 #define SWAP16(x) bswap_16(x)
 
+#else
+
+#include <sys/pctypes.h>
+#define SWAP32(x) lelong(x)
+#define SWAP16(x) leshort(x)
+
+#endif
 #endif
 #else //little endian
 

--Message-Boundary-5682--

_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com