diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-03-08 01:58:01 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-03-08 01:58:01 +0000 |
commit | 4bc11d6cf8d28c890dc029fa9318cc0d3b6e870b (patch) | |
tree | a763b21df67f533024b78a92fc1dc7239a8532d4 /libcrypt/md5.c | |
parent | 9ba7927dc7c0418d02caebf6d23dff907dcb8c80 (diff) |
kill off gcc signed warnings
Diffstat (limited to 'libcrypt/md5.c')
-rw-r--r-- | libcrypt/md5.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/libcrypt/md5.c b/libcrypt/md5.c index 989d4482c..412c8bfb5 100644 --- a/libcrypt/md5.c +++ b/libcrypt/md5.c @@ -94,12 +94,19 @@ static void __md5_Final (unsigned char [16], struct MD5Context *); static void __md5_Transform __P((u_int32_t [4], const unsigned char [64])); -static const char __md5__magic[] = "$1$"; /* This string is magic for this algorithm. Having +static const unsigned char __md5__magic[] = "$1$"; /* This string is magic for this algorithm. Having it this way, we can get better later on */ static const unsigned char __md5_itoa64[] = /* 0 ... 63 => ascii - 64 */ "./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; +/* shut up gcc-4.x signed warnings */ +#define strcpy(dst,src) strcpy((char*)dst,(char*)src) +#define strlen(s) strlen((char*)s) +#define strncat(dst,src,n) strncat((char*)dst,(char*)src,n) +#define strncmp(s1,s2,n) strncmp((char*)s1,(char*)s2,n) + + #ifdef i386 #define __md5_Encode memcpy @@ -531,11 +538,11 @@ static void __md5_to64( char *s, unsigned long v, int n) * Use MD5 for what it is best at... */ -char * __md5_crypt( const char *pw, const char *salt) attribute_hidden; -char * __md5_crypt( const char *pw, const char *salt) +char * __md5_crypt( const unsigned char *pw, const unsigned char *salt) attribute_hidden; +char * __md5_crypt( const unsigned char *pw, const unsigned char *salt) { /* Static stuff */ - static const char *sp, *ep; + static const unsigned char *sp, *ep; static char passwd[120], *p; unsigned char final[17]; /* final[16] exists only to aid in looping */ |