--- Digest-Hashcash/Hashcash.xs 2003/09/11 06:20:26 1.3 +++ Digest-Hashcash/Hashcash.xs 2003/10/20 04:17:05 1.4 @@ -37,19 +37,21 @@ #if defined(U64TYPE) && (defined(USE_64_BIT_INT) || ((BYTEORDER != 0x1234) && (BYTEORDER != 0x4321))) typedef U64TYPE ULONG; -# if BYTEORDER == 0x1234 -# undef BYTEORDER -# define BYTEORDER 0x12345678 -# elif BYTEORDER == 0x4321 -# undef BYTEORDER -# define BYTEORDER 0x87654321 -# endif +# if BYTEORDER == 0x1234 +# undef BYTEORDER +# define BYTEORDER 0x12345678 +# elif BYTEORDER == 0x4321 +# undef BYTEORDER +# define BYTEORDER 0x87654321 +# endif #else typedef uint_fast32_t ULONG; /* 32-or-more-bit quantity */ #endif #if GCCX86ASM # define zprefix(n) ({ int _r; __asm__ ("bsrl %1, %0" : "=r" (_r) : "r" (n)); 31 - _r ; }) +#elif __GNUC__ > 2 && __GNUC_MINOR__ > 3 +# define zprefix(n) (__extension__ ({ uint32_t n__ = (n); n ? __builtin_clz (n) : 32; })) #else static int zprefix (ULONG n) {