summaryrefslogtreecommitdiff
path: root/libc/crypt
diff options
context:
space:
mode:
authorjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2012-02-08 16:44:31 +0000
committerjoseph <joseph@7b3dc134-2b1b-0410-93df-9e9f96275f8d>2012-02-08 16:44:31 +0000
commit78be84cd747c2e3965bf6c2fd5f702d6ff2f5525 (patch)
treec070a60ef7c5371bef8b7a559442a6920b394c8e /libc/crypt
parentde06548e980675e65a1e6d850bb8c3a3f7ec638d (diff)
downloadeglibc2-78be84cd747c2e3965bf6c2fd5f702d6ff2f5525.tar.gz
Merge changes between r16568 and r17050 from /fsf/trunk.
git-svn-id: svn://svn.eglibc.org/trunk@17051 7b3dc134-2b1b-0410-93df-9e9f96275f8d
Diffstat (limited to 'libc/crypt')
-rw-r--r--libc/crypt/cert.c4
-rw-r--r--libc/crypt/crypt-entry.c4
-rw-r--r--libc/crypt/crypt-private.h16
-rw-r--r--libc/crypt/crypt.h11
-rw-r--r--libc/crypt/crypt_util.c12
-rw-r--r--libc/crypt/md5.h8
6 files changed, 22 insertions, 33 deletions
diff --git a/libc/crypt/cert.c b/libc/crypt/cert.c
index 34d7e4158..8c838e919 100644
--- a/libc/crypt/cert.c
+++ b/libc/crypt/cert.c
@@ -12,14 +12,10 @@
int totfails = 0;
-#if __STDC__ - 0
int main (int argc, char *argv[]);
void get8 (char *cp);
void put8 (char *cp);
void good_bye (void) __attribute__ ((noreturn));
-#else
-void get8(), put8();
-#endif
void good_bye ()
{
diff --git a/libc/crypt/crypt-entry.c b/libc/crypt/crypt-entry.c
index 838a4c889..49f62ab17 100644
--- a/libc/crypt/crypt-entry.c
+++ b/libc/crypt/crypt-entry.c
@@ -1,7 +1,7 @@
/*
* UFC-crypt: ultra fast crypt(3) implementation
*
- * Copyright (C) 1991,1992,1993,1996,1997,2007 Free Software Foundation, Inc.
+ * Copyright (C) 1991-1993,1996-1997,2007,2012 Free Software Foundation, Inc.
*
* The GNU C Library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -48,7 +48,6 @@
#include "crypt-private.h"
/* Prototypes for local functions. */
-#if __STDC__ - 0
#ifndef __GNU_LIBRARY__
void _ufc_clearmem (char *start, int cnt);
#else
@@ -63,7 +62,6 @@ extern char *__sha256_crypt (const char *key, const char *salt);
extern char *__sha512_crypt_r (const char *key, const char *salt,
char *buffer, int buflen);
extern char *__sha512_crypt (const char *key, const char *salt);
-#endif
/* Define our magic string to mark salt for MD5 encryption
replacement. This is meant to be the same as for other MD5 based
diff --git a/libc/crypt/crypt-private.h b/libc/crypt/crypt-private.h
index 3dd26bc59..d79dade4f 100644
--- a/libc/crypt/crypt-private.h
+++ b/libc/crypt/crypt-private.h
@@ -1,7 +1,7 @@
/*
* UFC-crypt: ultra fast crypt(3) implementation
*
- * Copyright (C) 1991, 92, 93, 96, 97, 98 Free Software Foundation, Inc.
+ * Copyright (C) 1991-1993, 1996-1998, 2012 Free Software Foundation, Inc.
*
* The GNU C Library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -37,24 +37,24 @@ extern void _ufc_doit_r (ufc_long itr, struct crypt_data * __restrict __data,
extern void __init_des_r (struct crypt_data * __restrict __data);
extern void __init_des (void);
-extern void _ufc_setup_salt_r (__const char *s,
+extern void _ufc_setup_salt_r (const char *s,
struct crypt_data * __restrict __data);
-extern void _ufc_mk_keytab_r (__const char *key,
+extern void _ufc_mk_keytab_r (const char *key,
struct crypt_data * __restrict __data);
-extern void _ufc_dofinalperm_r (ufc_long *res,
+extern void _ufc_dofinalperm_r (ufc_long *res,
struct crypt_data * __restrict __data);
extern void _ufc_output_conversion_r (ufc_long v1, ufc_long v2,
- __const char *salt,
+ const char *salt,
struct crypt_data * __restrict __data);
-extern void __setkey_r (__const char *__key,
+extern void __setkey_r (const char *__key,
struct crypt_data * __restrict __data);
extern void __encrypt_r (char * __restrict __block, int __edflag,
struct crypt_data * __restrict __data);
/* crypt-entry.c */
-extern char *__crypt_r (__const char *__key, __const char *__salt,
+extern char *__crypt_r (const char *__key, const char *__salt,
struct crypt_data * __restrict __data);
-extern char *fcrypt (__const char *key, __const char *salt);
+extern char *fcrypt (const char *key, const char *salt);
#endif /* crypt-private.h */
diff --git a/libc/crypt/crypt.h b/libc/crypt/crypt.h
index f3c1c38f0..e4ceff431 100644
--- a/libc/crypt/crypt.h
+++ b/libc/crypt/crypt.h
@@ -1,7 +1,8 @@
/*
* UFC-crypt: ultra fast crypt(3) implementation
*
- * Copyright (C) 1991,92,93,96,97,98,2000,2004 Free Software Foundation, Inc.
+ * Copyright (C) 1991-1993,1996-1998,2000,2004,2012
+ * Free Software Foundation, Inc.
*
* The GNU C Library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -30,11 +31,11 @@
__BEGIN_DECLS
/* Encrypt at most 8 characters from KEY using salt to perturb DES. */
-extern char *crypt (__const char *__key, __const char *__salt)
+extern char *crypt (const char *__key, const char *__salt)
__THROW __nonnull ((1, 2));
/* Setup DES tables according KEY. */
-extern void setkey (__const char *__key) __THROW __nonnull ((1));
+extern void setkey (const char *__key) __THROW __nonnull ((1));
/* Encrypt data in BLOCK in place if EDFLAG is zero; otherwise decrypt
block in place. */
@@ -57,11 +58,11 @@ struct crypt_data
int direction, initialized;
};
-extern char *crypt_r (__const char *__key, __const char *__salt,
+extern char *crypt_r (const char *__key, const char *__salt,
struct crypt_data * __restrict __data)
__THROW __nonnull ((1, 2, 3));
-extern void setkey_r (__const char *__key,
+extern void setkey_r (const char *__key,
struct crypt_data * __restrict __data)
__THROW __nonnull ((1, 2));
diff --git a/libc/crypt/crypt_util.c b/libc/crypt/crypt_util.c
index 04b262d9c..7fcbd8f11 100644
--- a/libc/crypt/crypt_util.c
+++ b/libc/crypt/crypt_util.c
@@ -1,7 +1,7 @@
/*
* UFC-crypt: ultra fast crypt(3) implementation
*
- * Copyright (C) 1991-1993,1996-1998,2000,2010,2011
+ * Copyright (C) 1991-1993,1996-1998,2000,2010,2011,2012
* Free Software Foundation, Inc.
*
* This library is free software; you can redistribute it and/or
@@ -49,7 +49,6 @@
#include "crypt-private.h"
/* Prototypes for local functions. */
-#if __STDC__ - 0
#ifndef __GNU_LIBRARY__
void _ufc_clearmem (char *start, int cnt);
void _ufc_copymem (char *from, char *to, int cnt);
@@ -59,7 +58,6 @@ STATIC void shuffle_sb (long32 *k, ufc_long saltbits);
#else
STATIC void shuffle_sb (long64 *k, ufc_long saltbits);
#endif
-#endif
/*
@@ -605,7 +603,7 @@ shuffle_sb(k, saltbits)
void
_ufc_setup_salt_r(s, __data)
- __const char *s;
+ const char *s;
struct crypt_data * __restrict __data;
{
ufc_long i, j, saltbits;
@@ -758,7 +756,7 @@ _ufc_dofinalperm_r(res, __data)
void
_ufc_output_conversion_r(v1, v2, salt, __data)
ufc_long v1, v2;
- __const char *salt;
+ const char *salt;
struct crypt_data * __restrict __data;
{
int i, s, shf;
@@ -902,7 +900,7 @@ encrypt(__block, __edflag)
void
__setkey_r(__key, __data)
- __const char *__key;
+ const char *__key;
struct crypt_data * __restrict __data;
{
int i,j;
@@ -922,7 +920,7 @@ weak_alias (__setkey_r, setkey_r)
void
setkey(__key)
- __const char *__key;
+ const char *__key;
{
__setkey_r(__key, &_ufc_foobar);
}
diff --git a/libc/crypt/md5.h b/libc/crypt/md5.h
index 64a73bdc8..21cfc5df2 100644
--- a/libc/crypt/md5.h
+++ b/libc/crypt/md5.h
@@ -1,6 +1,6 @@
/* Declaration of functions and data types used for MD5 sum computing
library functions.
- Copyright (C) 1995-1997,1999,2000,2001,2004,2005,2011
+ Copyright (C) 1995-1997,1999,2000,2001,2004,2005,2011,2012
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -43,11 +43,7 @@
typedef uint32_t md5_uint32;
typedef uintptr_t md5_uintptr;
#else
-# if defined __STDC__ && __STDC__
-# define UINT_MAX_32_BITS 4294967295U
-# else
-# define UINT_MAX_32_BITS 0xFFFFFFFF
-# endif
+# define UINT_MAX_32_BITS 4294967295U
/* If UINT_MAX isn't defined, assume it's a 32-bit type.
This should be valid for all systems GNU cares about because