ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Digest-Hashcash/Hashcash.xs
(Generate patch)

Comparing Digest-Hashcash/Hashcash.xs (file contents):
Revision 1.3 by root, Thu Sep 11 06:20:26 2003 UTC vs.
Revision 1.4 by root, Mon Oct 20 04:17:05 2003 UTC

35 35
36/* Useful defines & typedefs */ 36/* Useful defines & typedefs */
37 37
38#if defined(U64TYPE) && (defined(USE_64_BIT_INT) || ((BYTEORDER != 0x1234) && (BYTEORDER != 0x4321))) 38#if defined(U64TYPE) && (defined(USE_64_BIT_INT) || ((BYTEORDER != 0x1234) && (BYTEORDER != 0x4321)))
39typedef U64TYPE ULONG; 39typedef U64TYPE ULONG;
40# if BYTEORDER == 0x1234 40# if BYTEORDER == 0x1234
41# undef BYTEORDER 41# undef BYTEORDER
42# define BYTEORDER 0x12345678 42# define BYTEORDER 0x12345678
43# elif BYTEORDER == 0x4321 43# elif BYTEORDER == 0x4321
44# undef BYTEORDER 44# undef BYTEORDER
45# define BYTEORDER 0x87654321 45# define BYTEORDER 0x87654321
46# endif 46# endif
47#else 47#else
48typedef uint_fast32_t ULONG; /* 32-or-more-bit quantity */ 48typedef uint_fast32_t ULONG; /* 32-or-more-bit quantity */
49#endif 49#endif
50 50
51#if GCCX86ASM 51#if GCCX86ASM
52# define zprefix(n) ({ int _r; __asm__ ("bsrl %1, %0" : "=r" (_r) : "r" (n)); 31 - _r ; }) 52# define zprefix(n) ({ int _r; __asm__ ("bsrl %1, %0" : "=r" (_r) : "r" (n)); 31 - _r ; })
53#elif __GNUC__ > 2 && __GNUC_MINOR__ > 3
54# define zprefix(n) (__extension__ ({ uint32_t n__ = (n); n ? __builtin_clz (n) : 32; }))
53#else 55#else
54static int zprefix (ULONG n) 56static int zprefix (ULONG n)
55{ 57{
56 static char zp[256] = 58 static char zp[256] =
57 { 59 {

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines