Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 220941d

Browse files
committed
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
1 parent 2a3e282 commit 220941d

File tree

5 files changed

+18
-4
lines changed

5 files changed

+18
-4
lines changed

src/backend/port/sparc_solaris/port-protos.h

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: port-protos.h,v 1.6 1997/09/08 02:27:06 momjian Exp $
9+
* $Id: port-protos.h,v 1.7 1997/09/18 16:09:14 scrappy Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -36,8 +36,12 @@
3636
#define pg_dlerror dlerror
3737

3838
/* port.c */
39+
#ifndef HAVE_RANDOM
3940
extern long random(void);
41+
#endif
42+
#ifndef HAVE_SRANDOM
4043
extern void srandom(int seed);
44+
#endif
4145

4246
/* inet_aton.c in backend/port directory */
4347
extern int inet_aton(const char *cp, struct in_addr * addr);

src/backend/port/sparc_solaris/port.c

+5-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/port/sparc_solaris/Attic/port.c,v 1.6 1997/09/08 02:27:07 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/port/sparc_solaris/Attic/port.c,v 1.7 1997/09/18 16:09:15 scrappy Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -22,17 +22,21 @@
2222
#include "rusagestub.h"
2323
#endif /* HAVE_GETRUSAGE */
2424

25+
#ifndef HAVE_RANDOM
2526
long
2627
random()
2728
{
2829
return (lrand48());
2930
}
31+
#endif
3032

33+
#ifndef HAVE_RANDOM
3134
void
3235
srandom(int seed)
3336
{
3437
srand48((long int) seed);
3538
}
39+
#endif
3640

3741
#ifndef HAVE_GETRUSAGE
3842
int

src/configure

+1-1
Original file line numberDiff line numberDiff line change
@@ -3466,7 +3466,7 @@ else
34663466
fi
34673467
done
34683468

3469-
for ac_func in sigprocmask waitpid setsid random fcvt
3469+
for ac_func in sigprocmask waitpid setsid random srandom fcvt
34703470
do
34713471
echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
34723472
echo "configure:3473: checking for $ac_func" >&5

src/configure.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ AC_FUNC_MEMCMP
416416
AC_TYPE_SIGNAL
417417
AC_FUNC_VPRINTF
418418
AC_CHECK_FUNCS(isinf tzset getrusage vfork memmove sigsetjmp kill sysconf)
419-
AC_CHECK_FUNCS(sigprocmask waitpid setsid random fcvt)
419+
AC_CHECK_FUNCS(sigprocmask waitpid setsid random srandom fcvt)
420420
AC_CHECK_FUNC(inet_aton, AC_DEFINE(HAVE_INET_ATON), INET_ATON='inet_aton.o')
421421
AC_CHECK_FUNC(strerror, AC_DEFINE(HAVE_STRERROR), [STRERROR='strerror.o' STRERROR2='../../backend/port/strerror.o'])
422422
AC_CHECK_FUNC(strdup, AC_DEFINE(HAVE_STRDUP), STRDUP='../../utils/strdup.o')

src/include/config.h.in

+6
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,12 @@
104104
/* Set to 1 if you have strdup() */
105105
#undef HAVE_STRDUP
106106

107+
/* Set to 1 if you have random() */
108+
#undef HAVE_RANDOM
109+
110+
/* Set to 1 if you have srandom() */
111+
#undef HAVE_SRANDOM
112+
107113
/* Set to 1 if you have libreadline.a */
108114
#undef HAVE_LIBREADLINE
109115

0 commit comments

Comments
 (0)