diff options
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 bced4aa..2195084 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 bc7d840..965142c 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> |