diff options
author | guenther <> | 2012-06-01 01:01:57 +0000 |
---|---|---|
committer | guenther <> | 2012-06-01 01:01:57 +0000 |
commit | cb798cd101f47ccce02cb08724d7b433ebbe041d (patch) | |
tree | c44cf1f141bee166cd7b0c3d7f0d5ee35f25540c | |
parent | e07859e901fd418fd131e18bfe9b8bce64a0454d (diff) | |
download | openbsd-cb798cd101f47ccce02cb08724d7b433ebbe041d.tar.gz openbsd-cb798cd101f47ccce02cb08724d7b433ebbe041d.tar.bz2 openbsd-cb798cd101f47ccce02cb08724d7b433ebbe041d.zip |
Improve standards conformance: ecvt(), fcvt(), gcvt(), mktemp(), ttyslot(),
and valloc() are not in the current version, while posix_memalign() mkstemp(),
and mkdtemp() are, and setstate()'s argument has lost a bogus 'const'.
ok millert@ jmc@ espie@ kettenis@; ports build testing by naddy@
-rw-r--r-- | src/lib/libc/stdlib/ecvt.3 | 9 | ||||
-rw-r--r-- | src/lib/libc/stdlib/random.3 | 6 | ||||
-rw-r--r-- | src/lib/libc/stdlib/random.c | 4 |
3 files changed, 11 insertions, 8 deletions
diff --git a/src/lib/libc/stdlib/ecvt.3 b/src/lib/libc/stdlib/ecvt.3 index 2f107e11fd..0191a3420e 100644 --- a/src/lib/libc/stdlib/ecvt.3 +++ b/src/lib/libc/stdlib/ecvt.3 | |||
@@ -1,4 +1,4 @@ | |||
1 | .\" $OpenBSD: ecvt.3,v 1.9 2010/04/01 17:06:55 jmc Exp $ | 1 | .\" $OpenBSD: ecvt.3,v 1.10 2012/06/01 01:01:57 guenther Exp $ |
2 | .\" | 2 | .\" |
3 | .\" Copyright (c) 2002 Todd C. Miller <Todd.Miller@courtesan.com> | 3 | .\" Copyright (c) 2002 Todd C. Miller <Todd.Miller@courtesan.com> |
4 | .\" | 4 | .\" |
@@ -18,7 +18,7 @@ | |||
18 | .\" Agency (DARPA) and Air Force Research Laboratory, Air Force | 18 | .\" Agency (DARPA) and Air Force Research Laboratory, Air Force |
19 | .\" Materiel Command, USAF, under agreement number F39502-99-1-0512. | 19 | .\" Materiel Command, USAF, under agreement number F39502-99-1-0512. |
20 | .\" | 20 | .\" |
21 | .Dd $Mdocdate: April 1 2010 $ | 21 | .Dd $Mdocdate: June 1 2012 $ |
22 | .Dt ECVT 3 | 22 | .Dt ECVT 3 |
23 | .Os | 23 | .Os |
24 | .Sh NAME | 24 | .Sh NAME |
@@ -148,7 +148,10 @@ The | |||
148 | and | 148 | and |
149 | .Fn gcvt | 149 | .Fn gcvt |
150 | functions conform to | 150 | functions conform to |
151 | .St -p1003.1-2001 . | 151 | .St -p1003.1-2001 ; |
152 | as of | ||
153 | .St -p1003.1-2008 | ||
154 | they are no longer a part of the standard. | ||
152 | .Sh CAVEATS | 155 | .Sh CAVEATS |
153 | The | 156 | The |
154 | .Fn ecvt | 157 | .Fn ecvt |
diff --git a/src/lib/libc/stdlib/random.3 b/src/lib/libc/stdlib/random.3 index ed05df162b..84756bb3e3 100644 --- a/src/lib/libc/stdlib/random.3 +++ b/src/lib/libc/stdlib/random.3 | |||
@@ -25,9 +25,9 @@ | |||
25 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | 25 | .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
26 | .\" SUCH DAMAGE. | 26 | .\" SUCH DAMAGE. |
27 | .\" | 27 | .\" |
28 | .\" $OpenBSD: random.3,v 1.19 2007/05/31 19:19:31 jmc Exp $ | 28 | .\" $OpenBSD: random.3,v 1.20 2012/06/01 01:01:57 guenther Exp $ |
29 | .\" | 29 | .\" |
30 | .Dd $Mdocdate: May 31 2007 $ | 30 | .Dd $Mdocdate: June 1 2012 $ |
31 | .Dt RANDOM 3 | 31 | .Dt RANDOM 3 |
32 | .Os | 32 | .Os |
33 | .Sh NAME | 33 | .Sh NAME |
@@ -48,7 +48,7 @@ | |||
48 | .Ft char * | 48 | .Ft char * |
49 | .Fn initstate "unsigned int seed" "char *state" "size_t n" | 49 | .Fn initstate "unsigned int seed" "char *state" "size_t n" |
50 | .Ft char * | 50 | .Ft char * |
51 | .Fn setstate "const char *state" | 51 | .Fn setstate "char *state" |
52 | .Sh DESCRIPTION | 52 | .Sh DESCRIPTION |
53 | The | 53 | The |
54 | .Fn random | 54 | .Fn random |
diff --git a/src/lib/libc/stdlib/random.c b/src/lib/libc/stdlib/random.c index 5a9a7c3313..9c5b9d0f3f 100644 --- a/src/lib/libc/stdlib/random.c +++ b/src/lib/libc/stdlib/random.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: random.c,v 1.16 2012/03/21 12:36:49 millert Exp $ */ | 1 | /* $OpenBSD: random.c,v 1.17 2012/06/01 01:01:57 guenther Exp $ */ |
2 | /* | 2 | /* |
3 | * Copyright (c) 1983 Regents of the University of California. | 3 | * Copyright (c) 1983 Regents of the University of California. |
4 | * All rights reserved. | 4 | * All rights reserved. |
@@ -326,7 +326,7 @@ initstate(u_int seed, char *arg_state, size_t n) | |||
326 | * Returns a pointer to the old state information. | 326 | * Returns a pointer to the old state information. |
327 | */ | 327 | */ |
328 | char * | 328 | char * |
329 | setstate(const char *arg_state) | 329 | setstate(char *arg_state) |
330 | { | 330 | { |
331 | int32_t *new_state = (int32_t *)arg_state; | 331 | int32_t *new_state = (int32_t *)arg_state; |
332 | int32_t type = new_state[0] % MAX_TYPES; | 332 | int32_t type = new_state[0] % MAX_TYPES; |