2003-11-12 00:52:45 +01:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
*
|
|
|
|
* srandom.c
|
|
|
|
* srandom() wrapper
|
|
|
|
*
|
2004-12-31 23:04:05 +01:00
|
|
|
* Portions Copyright (c) 1996-2005, PostgreSQL Global Development Group
|
2003-11-12 00:52:45 +01:00
|
|
|
* Portions Copyright (c) 1994, Regents of the University of California
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* IDENTIFICATION
|
2004-12-31 23:04:05 +01:00
|
|
|
* $PostgreSQL: pgsql/src/port/srandom.c,v 1.5 2004/12/31 22:03:53 pgsql Exp $
|
2003-11-12 00:52:45 +01:00
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
2001-08-24 16:07:50 +02:00
|
|
|
|
|
|
|
#include "c.h"
|
1997-12-19 14:35:17 +01:00
|
|
|
|
1999-02-07 23:07:02 +01:00
|
|
|
#include <stdlib.h>
|
1999-07-16 05:14:30 +02:00
|
|
|
#include <math.h>
|
1997-12-19 03:27:20 +01:00
|
|
|
#include <errno.h>
|
1999-02-07 23:07:02 +01:00
|
|
|
|
1997-12-19 03:27:20 +01:00
|
|
|
void
|
1997-12-19 03:46:25 +01:00
|
|
|
srandom(unsigned int seed)
|
1997-12-19 03:27:20 +01:00
|
|
|
{
|
|
|
|
srand48((long int) seed);
|
|
|
|
}
|