diff options
| author | Andrey A. Chernov <ache@FreeBSD.org> | 1997-03-29 19:55:03 +0000 |
|---|---|---|
| committer | Andrey A. Chernov <ache@FreeBSD.org> | 1997-03-29 19:55:03 +0000 |
| commit | a080f5787d7f8911e04c768af1136b03190430bc (patch) | |
| tree | b3aa3524572906b3ee9c43f59080615c8231ea04 /lib/libc/stdlib | |
| parent | ab9b932c99ab56d74522baee8c7b3414fa17199b (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdlib')
| -rw-r--r-- | lib/libc/stdlib/random.3 | 13 | ||||
| -rw-r--r-- | lib/libc/stdlib/random.c | 11 |
2 files changed, 4 insertions, 20 deletions
diff --git a/lib/libc/stdlib/random.3 b/lib/libc/stdlib/random.3 index bced4aa9b52d..21950846d47d 100644 --- a/lib/libc/stdlib/random.3 +++ b/lib/libc/stdlib/random.3 @@ -189,17 +189,6 @@ About 2/3 the speed of .Xr rand 3 . .Pp The historical implementation used to have a very weak seeding; the -random sequence did not vary much with the seed. For compatibility -reasons, this implementation has been made available until the -next -.Tn FreeBSD -release via the functions -.Fn orandom , -.Fn osrandom , -.Fn oinitstate -and -.Fn osetstate -from the compatibility library, -.Em libcompat . +random sequence did not vary much with the seed. The current implementation employs a better pseudo-random number generator for the initial state calculation. diff --git a/lib/libc/stdlib/random.c b/lib/libc/stdlib/random.c index bc7d8401cce0..965142cc46d9 100644 --- a/lib/libc/stdlib/random.c +++ b/lib/libc/stdlib/random.c @@ -29,20 +29,15 @@ * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. + * + * $Id$ + * */ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)random.c 8.2 (Berkeley) 5/19/95"; #endif /* LIBC_SCCS and not lint */ -#ifdef COMPAT_WEAK_SEEDING -#define USE_WEAK_SEEDING -#define random orandom -#define srandom osrandom -#define initstate oinitstate -#define setstate osetstate -#endif - #include <fcntl.h> /* for srandomdev() */ #include <stdio.h> #include <stdlib.h> |
