svn commit: branches/uClibc-nptl: libcrypt librt
sjhill at uclibc.org
sjhill at uclibc.org
Sat Jan 20 20:14:32 UTC 2007
Author: sjhill
Date: 2007-01-20 12:14:31 -0800 (Sat, 20 Jan 2007)
New Revision: 17406
Log:
Merge from trunk.
Modified:
branches/uClibc-nptl/libcrypt/crypt.c
branches/uClibc-nptl/libcrypt/des.c
branches/uClibc-nptl/libcrypt/md5.c
branches/uClibc-nptl/librt/timer_create.c
Changeset:
Modified: branches/uClibc-nptl/libcrypt/crypt.c
===================================================================
--- branches/uClibc-nptl/libcrypt/crypt.c 2007-01-20 20:11:37 UTC (rev 17405)
+++ branches/uClibc-nptl/libcrypt/crypt.c 2007-01-20 20:14:31 UTC (rev 17406)
@@ -8,16 +8,14 @@
#define __FORCE_GLIBC
#include <crypt.h>
#include <unistd.h>
+#include "libcrypt.h"
-extern char * __md5_crypt( const char *pw, const char *salt) attribute_hidden;
-extern char * __des_crypt( const char *pw, const char *salt) attribute_hidden;
-
-char * crypt(const char *key, const char *salt)
+char *crypt(const char *key, const char *salt)
{
/* First, check if we are supposed to be using the MD5 replacement
* instead of DES... */
if (salt[0]=='$' && salt[1]=='1' && salt[2]=='$')
- return __md5_crypt(key, salt);
+ return __md5_crypt((unsigned char*)key, (unsigned char*)salt);
else
- return __des_crypt(key, salt);
+ return __des_crypt((unsigned char*)key, (unsigned char*)salt);
}
Modified: branches/uClibc-nptl/libcrypt/des.c
===================================================================
--- branches/uClibc-nptl/libcrypt/des.c 2007-01-20 20:11:37 UTC (rev 17405)
+++ branches/uClibc-nptl/libcrypt/des.c 2007-01-20 20:14:31 UTC (rev 17406)
@@ -64,6 +64,7 @@
#include <pwd.h>
#include <string.h>
#include <crypt.h>
+#include "libcrypt.h"
/* Re-entrantify me -- all this junk needs to be in
* struct crypt_data to make this really reentrant... */
@@ -638,9 +639,7 @@
block[(i << 5) | j] = (io[i] & bits32[j]) ? 1 : 0;
}
-char *__des_crypt(const char *key, const char *setting) attribute_hidden;
-char *
-__des_crypt(const char *key, const char *setting)
+char *__des_crypt(const unsigned char *key, const unsigned char *setting)
{
u_int32_t count, salt, l, r0, r1, keybuf[2];
u_char *p, *q;
Modified: branches/uClibc-nptl/libcrypt/md5.c
===================================================================
--- branches/uClibc-nptl/libcrypt/md5.c 2007-01-20 20:11:37 UTC (rev 17405)
+++ branches/uClibc-nptl/libcrypt/md5.c 2007-01-20 20:14:31 UTC (rev 17406)
@@ -79,7 +79,8 @@
#include <stdio.h>
#include <crypt.h>
#include <sys/cdefs.h>
-
+#include "libcrypt.h"
+
/* MD5 context. */
struct MD5Context {
u_int32_t state[4]; /* state (ABCD) */
@@ -100,14 +101,6 @@
"./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
#define __md5_Decode memcpy
@@ -538,8 +531,7 @@
* Use MD5 for what it is best at...
*/
-char * __md5_crypt( const unsigned char *pw, const unsigned char *salt) attribute_hidden;
-char * __md5_crypt( const unsigned char *pw, const unsigned char *salt)
+char *__md5_crypt(const unsigned char *pw, const unsigned char *salt)
{
/* Static stuff */
static const unsigned char *sp, *ep;
Modified: branches/uClibc-nptl/librt/timer_create.c
===================================================================
--- branches/uClibc-nptl/librt/timer_create.c 2007-01-20 20:11:37 UTC (rev 17405)
+++ branches/uClibc-nptl/librt/timer_create.c 2007-01-20 20:14:31 UTC (rev 17406)
@@ -13,7 +13,9 @@
#ifdef __NR_timer_create
-#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#ifndef offsetof
+# define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
+#endif
#define __NR___syscall_timer_create __NR_timer_create
static inline _syscall3(int, __syscall_timer_create, clockid_t, clock_id,
More information about the uClibc-cvs
mailing list