diff options
author | guenther <> | 2015-08-27 04:33:31 +0000 |
---|---|---|
committer | guenther <> | 2015-08-27 04:33:31 +0000 |
commit | 809239262088f866c609ff697c71459aba004e00 (patch) | |
tree | c292559d08ad513b7c50ca095f932d69574c8c44 | |
parent | bd55fe52542759d547f63faf9b00c12e56e2dbf3 (diff) | |
download | openbsd-809239262088f866c609ff697c71459aba004e00.tar.gz openbsd-809239262088f866c609ff697c71459aba004e00.tar.bz2 openbsd-809239262088f866c609ff697c71459aba004e00.zip |
Move the __rand48_* declarations into rand48.h, and then hide both them
and __dorand48() and __rand48_deterministic
ok deraadt@
-rw-r--r-- | src/lib/libc/stdlib/drand48.c | 4 | ||||
-rw-r--r-- | src/lib/libc/stdlib/lcong48.c | 6 | ||||
-rw-r--r-- | src/lib/libc/stdlib/lrand48.c | 4 | ||||
-rw-r--r-- | src/lib/libc/stdlib/mrand48.c | 4 | ||||
-rw-r--r-- | src/lib/libc/stdlib/rand48.h | 8 | ||||
-rw-r--r-- | src/lib/libc/stdlib/seed48.c | 6 | ||||
-rw-r--r-- | src/lib/libc/stdlib/srand48.c | 6 |
7 files changed, 13 insertions, 25 deletions
diff --git a/src/lib/libc/stdlib/drand48.c b/src/lib/libc/stdlib/drand48.c index e7cb3cb71c..2be23d4c7a 100644 --- a/src/lib/libc/stdlib/drand48.c +++ b/src/lib/libc/stdlib/drand48.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: drand48.c,v 1.5 2014/12/09 19:50:26 deraadt Exp $ */ | 1 | /* $OpenBSD: drand48.c,v 1.6 2015/08/27 04:33:31 guenther Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1993 Martin Birgmeier | 3 | * Copyright (c) 1993 Martin Birgmeier |
4 | * All rights reserved. | 4 | * All rights reserved. |
@@ -14,8 +14,6 @@ | |||
14 | 14 | ||
15 | #include "rand48.h" | 15 | #include "rand48.h" |
16 | 16 | ||
17 | extern unsigned short __rand48_seed[3]; | ||
18 | |||
19 | double | 17 | double |
20 | drand48(void) | 18 | drand48(void) |
21 | { | 19 | { |
diff --git a/src/lib/libc/stdlib/lcong48.c b/src/lib/libc/stdlib/lcong48.c index 09726efb6e..5b297ddbfc 100644 --- a/src/lib/libc/stdlib/lcong48.c +++ b/src/lib/libc/stdlib/lcong48.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: lcong48.c,v 1.4 2014/12/08 21:45:20 deraadt Exp $ */ | 1 | /* $OpenBSD: lcong48.c,v 1.5 2015/08/27 04:33:31 guenther Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1993 Martin Birgmeier | 3 | * Copyright (c) 1993 Martin Birgmeier |
4 | * All rights reserved. | 4 | * All rights reserved. |
@@ -14,10 +14,6 @@ | |||
14 | 14 | ||
15 | #include "rand48.h" | 15 | #include "rand48.h" |
16 | 16 | ||
17 | extern unsigned short __rand48_seed[3]; | ||
18 | extern unsigned short __rand48_mult[3]; | ||
19 | extern unsigned short __rand48_add; | ||
20 | |||
21 | void | 17 | void |
22 | lcong48(unsigned short p[7]) | 18 | lcong48(unsigned short p[7]) |
23 | { | 19 | { |
diff --git a/src/lib/libc/stdlib/lrand48.c b/src/lib/libc/stdlib/lrand48.c index 22508594fc..142cca7f78 100644 --- a/src/lib/libc/stdlib/lrand48.c +++ b/src/lib/libc/stdlib/lrand48.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: lrand48.c,v 1.4 2014/12/08 21:45:20 deraadt Exp $ */ | 1 | /* $OpenBSD: lrand48.c,v 1.5 2015/08/27 04:33:31 guenther Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1993 Martin Birgmeier | 3 | * Copyright (c) 1993 Martin Birgmeier |
4 | * All rights reserved. | 4 | * All rights reserved. |
@@ -14,8 +14,6 @@ | |||
14 | 14 | ||
15 | #include "rand48.h" | 15 | #include "rand48.h" |
16 | 16 | ||
17 | extern unsigned short __rand48_seed[3]; | ||
18 | |||
19 | long | 17 | long |
20 | lrand48(void) | 18 | lrand48(void) |
21 | { | 19 | { |
diff --git a/src/lib/libc/stdlib/mrand48.c b/src/lib/libc/stdlib/mrand48.c index 0568a7ff93..3334e2ad2b 100644 --- a/src/lib/libc/stdlib/mrand48.c +++ b/src/lib/libc/stdlib/mrand48.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: mrand48.c,v 1.5 2014/12/09 00:02:18 tedu Exp $ */ | 1 | /* $OpenBSD: mrand48.c,v 1.6 2015/08/27 04:33:31 guenther Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1993 Martin Birgmeier | 3 | * Copyright (c) 1993 Martin Birgmeier |
4 | * All rights reserved. | 4 | * All rights reserved. |
@@ -14,8 +14,6 @@ | |||
14 | 14 | ||
15 | #include "rand48.h" | 15 | #include "rand48.h" |
16 | 16 | ||
17 | extern unsigned short __rand48_seed[3]; | ||
18 | |||
19 | long | 17 | long |
20 | mrand48(void) | 18 | mrand48(void) |
21 | { | 19 | { |
diff --git a/src/lib/libc/stdlib/rand48.h b/src/lib/libc/stdlib/rand48.h index ee70174744..fff289927f 100644 --- a/src/lib/libc/stdlib/rand48.h +++ b/src/lib/libc/stdlib/rand48.h | |||
@@ -10,7 +10,7 @@ | |||
10 | * of any kind. I shall in no event be liable for anything that happens | 10 | * of any kind. I shall in no event be liable for anything that happens |
11 | * to anyone/anything when using this software. | 11 | * to anyone/anything when using this software. |
12 | * | 12 | * |
13 | * $OpenBSD: rand48.h,v 1.4 2014/12/08 21:45:20 deraadt Exp $ | 13 | * $OpenBSD: rand48.h,v 1.5 2015/08/27 04:33:31 guenther Exp $ |
14 | */ | 14 | */ |
15 | 15 | ||
16 | #ifndef _RAND48_H_ | 16 | #ifndef _RAND48_H_ |
@@ -19,8 +19,14 @@ | |||
19 | #include <math.h> | 19 | #include <math.h> |
20 | #include <stdlib.h> | 20 | #include <stdlib.h> |
21 | 21 | ||
22 | __BEGIN_HIDDEN_DECLS | ||
23 | extern unsigned short __rand48_seed[3]; | ||
24 | extern unsigned short __rand48_mult[3]; | ||
25 | extern unsigned short __rand48_add; | ||
26 | |||
22 | void __dorand48(unsigned short[3]); | 27 | void __dorand48(unsigned short[3]); |
23 | extern int __rand48_deterministic; | 28 | extern int __rand48_deterministic; |
29 | __END_HIDDEN_DECLS | ||
24 | 30 | ||
25 | #define RAND48_SEED_0 (0x330e) | 31 | #define RAND48_SEED_0 (0x330e) |
26 | #define RAND48_SEED_1 (0xabcd) | 32 | #define RAND48_SEED_1 (0xabcd) |
diff --git a/src/lib/libc/stdlib/seed48.c b/src/lib/libc/stdlib/seed48.c index 7acb4e6d1d..0485ed6a10 100644 --- a/src/lib/libc/stdlib/seed48.c +++ b/src/lib/libc/stdlib/seed48.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: seed48.c,v 1.4 2014/12/08 21:45:20 deraadt Exp $ */ | 1 | /* $OpenBSD: seed48.c,v 1.5 2015/08/27 04:33:31 guenther Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1993 Martin Birgmeier | 3 | * Copyright (c) 1993 Martin Birgmeier |
4 | * All rights reserved. | 4 | * All rights reserved. |
@@ -14,10 +14,6 @@ | |||
14 | 14 | ||
15 | #include "rand48.h" | 15 | #include "rand48.h" |
16 | 16 | ||
17 | extern unsigned short __rand48_seed[3]; | ||
18 | extern unsigned short __rand48_mult[3]; | ||
19 | extern unsigned short __rand48_add; | ||
20 | |||
21 | unsigned short * | 17 | unsigned short * |
22 | seed48(unsigned short xseed[3]) | 18 | seed48(unsigned short xseed[3]) |
23 | { | 19 | { |
diff --git a/src/lib/libc/stdlib/srand48.c b/src/lib/libc/stdlib/srand48.c index 115b9e82aa..ce4b45225d 100644 --- a/src/lib/libc/stdlib/srand48.c +++ b/src/lib/libc/stdlib/srand48.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: srand48.c,v 1.4 2014/12/08 21:45:20 deraadt Exp $ */ | 1 | /* $OpenBSD: srand48.c,v 1.5 2015/08/27 04:33:31 guenther Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1993 Martin Birgmeier | 3 | * Copyright (c) 1993 Martin Birgmeier |
4 | * All rights reserved. | 4 | * All rights reserved. |
@@ -14,10 +14,6 @@ | |||
14 | 14 | ||
15 | #include "rand48.h" | 15 | #include "rand48.h" |
16 | 16 | ||
17 | extern unsigned short __rand48_seed[3]; | ||
18 | extern unsigned short __rand48_mult[3]; | ||
19 | extern unsigned short __rand48_add; | ||
20 | |||
21 | int __rand48_deterministic; | 17 | int __rand48_deterministic; |
22 | 18 | ||
23 | void | 19 | void |