mrand48.c revision 1.7
11.7Slukem/* $NetBSD: mrand48.c,v 1.7 2005/06/12 05:21:28 lukem Exp $ */ 21.5Sperry 31.1Sbrezak/* 41.1Sbrezak * Copyright (c) 1993 Martin Birgmeier 51.1Sbrezak * All rights reserved. 61.1Sbrezak * 71.1Sbrezak * You may redistribute unmodified or modified versions of this source 81.1Sbrezak * code provided that the above copyright notice and this and the 91.1Sbrezak * following conditions are retained. 101.1Sbrezak * 111.1Sbrezak * This software is provided ``as is'', and comes with no warranties 121.1Sbrezak * of any kind. I shall in no event be liable for anything that happens 131.1Sbrezak * to anyone/anything when using this software. 141.1Sbrezak */ 151.1Sbrezak 161.7Slukem#include <sys/cdefs.h> 171.7Slukem#if defined(LIBC_SCCS) && !defined(lint) 181.7Slukem__RCSID("$NetBSD: mrand48.c,v 1.7 2005/06/12 05:21:28 lukem Exp $"); 191.7Slukem#endif /* LIBC_SCCS and not lint */ 201.7Slukem 211.4Sjtc#include "namespace.h" 221.1Sbrezak#include "rand48.h" 231.1Sbrezak 241.4Sjtc#ifdef __weak_alias 251.6Smycroft__weak_alias(mrand48,_mrand48) 261.4Sjtc#endif 271.1Sbrezak 281.1Sbrezaklong 291.1Sbrezakmrand48(void) 301.1Sbrezak{ 311.3Sjtc __dorand48(__rand48_seed); 321.3Sjtc return ((long) __rand48_seed[2] << 16) + (long) __rand48_seed[1]; 331.1Sbrezak} 34