mirror of
https://github.com/postgres/postgres.git
synced 2025-05-12 16:21:30 +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:
parent
2a3e28282e
commit
220941dac5
@ -6,7 +6,7 @@
|
|||||||
*
|
*
|
||||||
* Copyright (c) 1994, Regents of the University of California
|
* 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
|
#define pg_dlerror dlerror
|
||||||
|
|
||||||
/* port.c */
|
/* port.c */
|
||||||
|
#ifndef HAVE_RANDOM
|
||||||
extern long random(void);
|
extern long random(void);
|
||||||
|
#endif
|
||||||
|
#ifndef HAVE_SRANDOM
|
||||||
extern void srandom(int seed);
|
extern void srandom(int seed);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* inet_aton.c in backend/port directory */
|
/* inet_aton.c in backend/port directory */
|
||||||
extern int inet_aton(const char *cp, struct in_addr * addr);
|
extern int inet_aton(const char *cp, struct in_addr * addr);
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* 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"
|
#include "rusagestub.h"
|
||||||
#endif /* HAVE_GETRUSAGE */
|
#endif /* HAVE_GETRUSAGE */
|
||||||
|
|
||||||
|
#ifndef HAVE_RANDOM
|
||||||
long
|
long
|
||||||
random()
|
random()
|
||||||
{
|
{
|
||||||
return (lrand48());
|
return (lrand48());
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef HAVE_RANDOM
|
||||||
void
|
void
|
||||||
srandom(int seed)
|
srandom(int seed)
|
||||||
{
|
{
|
||||||
srand48((long int) seed);
|
srand48((long int) seed);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef HAVE_GETRUSAGE
|
#ifndef HAVE_GETRUSAGE
|
||||||
int
|
int
|
||||||
|
2
src/configure
vendored
2
src/configure
vendored
@ -3466,7 +3466,7 @@ else
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
for ac_func in sigprocmask waitpid setsid random fcvt
|
for ac_func in sigprocmask waitpid setsid random srandom fcvt
|
||||||
do
|
do
|
||||||
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
|
||||||
echo "configure:3473: checking for $ac_func" >&5
|
echo "configure:3473: checking for $ac_func" >&5
|
||||||
|
@ -416,7 +416,7 @@ AC_FUNC_MEMCMP
|
|||||||
AC_TYPE_SIGNAL
|
AC_TYPE_SIGNAL
|
||||||
AC_FUNC_VPRINTF
|
AC_FUNC_VPRINTF
|
||||||
AC_CHECK_FUNCS(isinf tzset getrusage vfork memmove sigsetjmp kill sysconf)
|
AC_CHECK_FUNCS(isinf tzset getrusage vfork memmove sigsetjmp kill sysconf)
|
||||||
AC_CHECK_FUNCS(sigprocmask waitpid setsid random fcvt)
|
AC_CHECK_FUNCS(sigprocmask waitpid setsid random srandom fcvt)
|
||||||
AC_CHECK_FUNC(inet_aton, AC_DEFINE(HAVE_INET_ATON), INET_ATON='inet_aton.o')
|
AC_CHECK_FUNC(inet_aton, AC_DEFINE(HAVE_INET_ATON), INET_ATON='inet_aton.o')
|
||||||
AC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR), [STRERROR='strerror.o' STRERROR2='../../backend/port/strerror.o'])
|
AC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR), [STRERROR='strerror.o' STRERROR2='../../backend/port/strerror.o'])
|
||||||
AC_CHECK_FUNC(strdup, AC_DEFINE(HAVE_STRDUP), STRDUP='../../utils/strdup.o')
|
AC_CHECK_FUNC(strdup, AC_DEFINE(HAVE_STRDUP), STRDUP='../../utils/strdup.o')
|
||||||
|
@ -104,6 +104,12 @@
|
|||||||
/* Set to 1 if you have strdup() */
|
/* Set to 1 if you have strdup() */
|
||||||
#undef HAVE_STRDUP
|
#undef HAVE_STRDUP
|
||||||
|
|
||||||
|
/* Set to 1 if you have random() */
|
||||||
|
#undef HAVE_RANDOM
|
||||||
|
|
||||||
|
/* Set to 1 if you have srandom() */
|
||||||
|
#undef HAVE_SRANDOM
|
||||||
|
|
||||||
/* Set to 1 if you have libreadline.a */
|
/* Set to 1 if you have libreadline.a */
|
||||||
#undef HAVE_LIBREADLINE
|
#undef HAVE_LIBREADLINE
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user