diff options
author | Jim Meyering <jim@meyering.net> | 2000-09-25 00:00:58 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2000-09-25 00:00:58 +0000 |
commit | c3da9e25edb722299ced6398a494bd5ad7f0cb84 (patch) | |
tree | 62da6d2317a182ca2a6763b61ac1a923e04951cb | |
parent | ab367e6b1397ad91c2d31bc631a80314c6ecf0e7 (diff) | |
download | coreutils-c3da9e25edb722299ced6398a494bd5ad7f0cb84.tar.xz |
(rol): Define (from GnuPG).
-rw-r--r-- | lib/md5.h | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -143,4 +143,19 @@ extern int md5_stream __P ((FILE *stream, void *resblock)); digest. */ extern void *md5_buffer __P ((const char *buffer, size_t len, void *resblock)); +/* The following is from gnupg-1.0.2's cipher/bithelp.h. */ +/* Rotate a 32 bit integer by n bytes */ +#if defined(__GNUC__) && defined(__i386__) +static inline md5_uint32 +rol(md5_uint32 x, int n) +{ + __asm__("roll %%cl,%0" + :"=r" (x) + :"0" (x),"c" (n)); + return x; +} +#else +# define rol(x,n) ( ((x) << (n)) | ((x) >> (32-(n))) ) +#endif + #endif |