X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fmd5.h;h=0a6aa5f667662dbd70f21f7300bb8f39c79bd5c8;hb=a1c89a590ec4f4beb11eacf98f682bed7e47b29c;hp=b7645ec5039b03b3eee2e8ad59cf0669e5dfbda6;hpb=89f2b4892655a929a506eff123c9126a88e2c8eb;p=gnulib.git diff --git a/lib/md5.h b/lib/md5.h index b7645ec50..0a6aa5f66 100644 --- a/lib/md5.h +++ b/lib/md5.h @@ -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