summaryrefslogtreecommitdiff
path: root/lib/libc/stdlib
diff options
context:
space:
mode:
authorthorpej <thorpej@NetBSD.org>2002-01-08 02:19:56 +0000
committerthorpej <thorpej@NetBSD.org>2002-01-08 02:19:56 +0000
commit10b6bfb636d313184b7e460e62040ed86609a9c8 (patch)
treef7e704e23fcd63e48c0d4f83ed921d1a4aa8c5c9 /lib/libc/stdlib
parent5f9568a12e2d30487e09513b712e19a3045459b7 (diff)
Make a note about the alignment requirement of the state array
passed to initstate(3). This is actually documented in comments in the code.
Diffstat (limited to 'lib/libc/stdlib')
-rw-r--r--lib/libc/stdlib/random.39
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libc/stdlib/random.3 b/lib/libc/stdlib/random.3
index 3110335c4be..156253cf424 100644
--- a/lib/libc/stdlib/random.3
+++ b/lib/libc/stdlib/random.3
@@ -1,4 +1,4 @@
-.\" $NetBSD: random.3,v 1.12 2001/09/16 01:31:53 wiz Exp $
+.\" $NetBSD: random.3,v 1.13 2002/01/08 02:19:56 thorpej Exp $
.\"
.\" Copyright (c) 1983, 1991, 1993
.\" The Regents of the University of California. All rights reserved.
@@ -112,7 +112,12 @@ the nearest known amount.
Using less than 8 bytes will cause an error).
The seed for the initialization (which specifies a starting point for
the random number sequence, and provides for restarting at the same
-point) is also an argument.
+point) is also an argument. The state array passed to
+.Fn initstate
+must be aligned to a 32-bit boundary. This can be achieved by using
+a suitably-sized array of ints, and casting the array to char * when
+passing it to
+.Fn initstate .
The
.Fn initstate
function