Source-Changes-HG archive

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

[src/netbsd-1-4]: src/lib/libc/stdlib Pull up revision 1.13 (requested by tho...



details:   https://anonhg.NetBSD.org/src/rev/510bfdb0ba59
branches:  netbsd-1-4
changeset: 471316:510bfdb0ba59
user:      he <he%NetBSD.org@localhost>
date:      Mon Jan 14 15:07:13 2002 +0000

description:
Pull up revision 1.13 (requested by thorpej):
  Note alignment requirement of the state array passed to initstate(3).
  This was formerly only documented in the comments in the code.

diffstat:

 lib/libc/stdlib/random.3 |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (23 lines):

diff -r 99aced12ac42 -r 510bfdb0ba59 lib/libc/stdlib/random.3
--- a/lib/libc/stdlib/random.3  Mon Jan 14 15:04:38 2002 +0000
+++ b/lib/libc/stdlib/random.3  Mon Jan 14 15:07:13 2002 +0000
@@ -1,4 +1,4 @@
-.\"    $NetBSD: random.3,v 1.9 1999/03/22 19:44:58 garbled Exp $
+.\"    $NetBSD: random.3,v 1.9.2.1 2002/01/14 15:07:13 he Exp $
 .\"
 .\" Copyright (c) 1983, 1991, 1993
 .\"    The Regents of the University of California.  All rights reserved.
@@ -120,7 +120,12 @@
 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



Home | Main Index | Thread Index | Old Index