X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=lib%2Fmd5.h;h=3b7dea1699520d70fc068e0bd414553776bc8c53;hb=607bcdf5ffd953cb80ba60808242284c14090490;hp=15704f20b273b2b1a58afc1b760495780b127622;hpb=d349992d82f97d614404565ff66e3f8a47b4a568;p=gnulib.git diff --git a/lib/md5.h b/lib/md5.h index 15704f20b..3b7dea169 100644 --- a/lib/md5.h +++ b/lib/md5.h @@ -1,6 +1,6 @@ /* md5.h - Declaration of functions and data types used for MD5 sum computing library functions. - Copyright (C) 1995, 1996, 1999, 2000 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. Bugs can be reported to bug-glibc@prep.ai.mit.edu. @@ -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