1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-10 17:42:29 +03:00

Add in srandom() check to configure

Add appropriate HAVE_{RANDOM,SRANDOM} values to config.h
Add approrpiate #ifdef's to sparc_solaris port files for Solaris v2.6
This commit is contained in:
Marc G. Fournier
1997-09-18 16:09:41 +00:00
parent 2a3e28282e
commit 220941dac5
5 changed files with 18 additions and 4 deletions

View File

@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: port-protos.h,v 1.6 1997/09/08 02:27:06 momjian Exp $
* $Id: port-protos.h,v 1.7 1997/09/18 16:09:14 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@@ -36,8 +36,12 @@
#define pg_dlerror dlerror
/* port.c */
#ifndef HAVE_RANDOM
extern long random(void);
#endif
#ifndef HAVE_SRANDOM
extern void srandom(int seed);
#endif
/* inet_aton.c in backend/port directory */
extern int inet_aton(const char *cp, struct in_addr * addr);

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/port/sparc_solaris/Attic/port.c,v 1.6 1997/09/08 02:27:07 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/port/sparc_solaris/Attic/port.c,v 1.7 1997/09/18 16:09:15 scrappy Exp $
*
*-------------------------------------------------------------------------
*/
@@ -22,17 +22,21 @@
#include "rusagestub.h"
#endif /* HAVE_GETRUSAGE */
#ifndef HAVE_RANDOM
long
random()
{
return (lrand48());
}
#endif
#ifndef HAVE_RANDOM
void
srandom(int seed)
{
srand48((long int) seed);
}
#endif
#ifndef HAVE_GETRUSAGE
int