# HG changeset patch # User atmos4 # Date 1028552694 0 # Node ID adaa83002b22ca753edbb6a65a0a220d2486f3cc # Parent 762c98c47f0196c8e708f2368dce939fc1d1f616 Bswap fixes for 64bit cpus, thx to Falk Hueffner for the hint. diff -r 762c98c47f01 -r adaa83002b22 bswap.h --- a/bswap.h Mon Aug 05 12:57:54 2002 +0000 +++ b/bswap.h Mon Aug 05 13:04:54 2002 +0000 @@ -40,7 +40,7 @@ inline static unsigned long long int ByteSwap64(unsigned long long int x) { register union { __extension__ unsigned long long int __ll; - unsigned long int __l[2]; } __x; + unsigned int __l[2]; } __x; asm("xchgl %0,%1": "=r"(__x.__l[0]),"=r"(__x.__l[1]): "0"(bswap_32((unsigned long)x)),"1"(bswap_32((unsigned long)(x>>32)))); @@ -61,7 +61,7 @@ #define bswap_64(x) \ (__extension__ \ ({ union { __extension__ unsigned long long int __ll; \ - unsigned long int __l[2]; } __w, __r; \ + unsigned int __l[2]; } __w, __r; \ __w.__ll = (x); \ __r.__l[0] = bswap_32 (__w.__l[1]); \ __r.__l[1] = bswap_32 (__w.__l[0]); \