summaryrefslogtreecommitdiff
path: root/src/lib/libc/crypt
diff options
context:
space:
mode:
authorguenther <>2015-09-13 08:31:48 +0000
committerguenther <>2015-09-13 08:31:48 +0000
commit37a8e8e2fe93b45ab3b39108d9af4b75cf4dd663 (patch)
tree97578b890ec56dd23cc1e63d9bb8ef626aa1e803 /src/lib/libc/crypt
parent3ab8135e9f87e6a6b3e4d7790fce947888eab2f8 (diff)
downloadopenbsd-37a8e8e2fe93b45ab3b39108d9af4b75cf4dd663.tar.gz
openbsd-37a8e8e2fe93b45ab3b39108d9af4b75cf4dd663.tar.bz2
openbsd-37a8e8e2fe93b45ab3b39108d9af4b75cf4dd663.zip
Wrap <stdlib.h> so that calls go direct and the symbols not in the
C standard are all weak. Apply __{BEGIN,END}_HIDDEN_DECLS to gdtoa{,imp}.h, hiding the arch-specific __strtorx, __ULtox_D2A, __strtorQ, __ULtoQ_D2A symbols.
Diffstat (limited to 'src/lib/libc/crypt')
-rw-r--r--src/lib/libc/crypt/arc4random.c4
-rw-r--r--src/lib/libc/crypt/arc4random_uniform.c3
2 files changed, 5 insertions, 2 deletions
diff --git a/src/lib/libc/crypt/arc4random.c b/src/lib/libc/crypt/arc4random.c
index 5afc6a15ab..8a4ecc9e89 100644
--- a/src/lib/libc/crypt/arc4random.c
+++ b/src/lib/libc/crypt/arc4random.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: arc4random.c,v 1.53 2015/09/10 18:53:50 bcook Exp $ */ 1/* $OpenBSD: arc4random.c,v 1.54 2015/09/13 08:31:47 guenther Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1996, David Mazieres <dm@uun.org> 4 * Copyright (c) 1996, David Mazieres <dm@uun.org>
@@ -186,6 +186,7 @@ arc4random(void)
186 _ARC4_UNLOCK(); 186 _ARC4_UNLOCK();
187 return val; 187 return val;
188} 188}
189DEF_WEAK(arc4random);
189 190
190void 191void
191arc4random_buf(void *buf, size_t n) 192arc4random_buf(void *buf, size_t n)
@@ -194,3 +195,4 @@ arc4random_buf(void *buf, size_t n)
194 _rs_random_buf(buf, n); 195 _rs_random_buf(buf, n);
195 _ARC4_UNLOCK(); 196 _ARC4_UNLOCK();
196} 197}
198DEF_WEAK(arc4random_buf);
diff --git a/src/lib/libc/crypt/arc4random_uniform.c b/src/lib/libc/crypt/arc4random_uniform.c
index 1aa9a622f1..23a15e34fd 100644
--- a/src/lib/libc/crypt/arc4random_uniform.c
+++ b/src/lib/libc/crypt/arc4random_uniform.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: arc4random_uniform.c,v 1.1 2014/07/12 13:24:54 deraadt Exp $ */ 1/* $OpenBSD: arc4random_uniform.c,v 1.2 2015/09/13 08:31:47 guenther Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2008, Damien Miller <djm@openbsd.org> 4 * Copyright (c) 2008, Damien Miller <djm@openbsd.org>
@@ -54,3 +54,4 @@ arc4random_uniform(uint32_t upper_bound)
54 54
55 return r % upper_bound; 55 return r % upper_bound;
56} 56}
57DEF_WEAK(arc4random_uniform);