Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/lib/libcrypt - remove local UNCONST



details:   https://anonhg.NetBSD.org/src/rev/57fbf7122366
branches:  trunk
changeset: 572773:57fbf7122366
user:      christos <christos%NetBSD.org@localhost>
date:      Tue Jan 11 22:40:00 2005 +0000

description:
- remove local UNCONST
- add new __gensalt functions

diffstat:

 lib/libcrypt/crypt.h |  19 +++++++------------
 1 files changed, 7 insertions(+), 12 deletions(-)

diffs (33 lines):

diff -r 102f6ab29fdb -r 57fbf7122366 lib/libcrypt/crypt.h
--- a/lib/libcrypt/crypt.h      Tue Jan 11 22:39:21 2005 +0000
+++ b/lib/libcrypt/crypt.h      Tue Jan 11 22:40:00 2005 +0000
@@ -1,5 +1,5 @@
 /*
- * $NetBSD: crypt.h,v 1.1 2004/07/02 00:05:23 sjg Exp $
+ * $NetBSD: crypt.h,v 1.2 2005/01/11 22:40:00 christos Exp $
  */
 char   *__md5crypt(const char *pw, const char *salt);  /* XXX */
 char *__bcrypt(const char *, const char *);    /* XXX */
@@ -8,16 +8,11 @@
 void __hmac_sha1(unsigned char *, size_t, unsigned char *, size_t, unsigned char *);
 void __crypt_to64(char *s, u_int32_t v, int n);
 
+int __gensalt_blowfish(char *salt, size_t saltlen, size_t nrounds);
+int __gensalt_old(char *salt, size_t saltsiz, size_t nrounds);
+int __gensalt_new(char *salt, size_t saltsiz, size_t nrounds);
+int __gensalt_md5(char *salt, size_t saltsiz, size_t nrounds);
+int __gensalt_sha1(char *salt, size_t saltsiz, size_t nrounds);
+
 #define SHA1_MAGIC "$sha1$"
 #define SHA1_SIZE 20
-
-#ifdef __GNUC__
-#define UNCONST(ptr)   ({              \
-    union __unconst {                  \
-       const void *__cp;               \
-       void *__p;                      \
-    } __d;                             \
-    __d.__cp = ptr, __d.__p; })
-#else
-#define UNCONST(ptr)   (void *)(ptr)
-#endif



Home | Main Index | Thread Index | Old Index