]> granicus.if.org Git - postgresql/commitdiff
Add in srandom() check to configure
authorMarc G. Fournier <scrappy@hub.org>
Thu, 18 Sep 1997 16:09:41 +0000 (16:09 +0000)
committerMarc G. Fournier <scrappy@hub.org>
Thu, 18 Sep 1997 16:09:41 +0000 (16:09 +0000)
Add appropriate HAVE_{RANDOM,SRANDOM} values to config.h
Add approrpiate #ifdef's to sparc_solaris port files for Solaris v2.6

src/backend/port/sparc_solaris/port-protos.h
src/backend/port/sparc_solaris/port.c
src/configure
src/configure.in
src/include/config.h.in

index 36a423df67ce6eae0d71041521c842f70179d8fc..3f15b052c932c3301be1d0e9da6b57d0bab85885 100644 (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 $
  *
  *-------------------------------------------------------------------------
  */
 #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);
index 69980d6ea8ada159bd9f930605193a0ca0ccba4a..d578c69e5242aa05cce91857f5c41a7ac0086c92 100644 (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 $
  *
  *-------------------------------------------------------------------------
  */
 #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
index 287da38cb9c1cbd2f7b346ef6174ed32ac8c586b..9ebe604acc4fddc0a0227516bd864aa4278843ef 100755 (executable)
@@ -3466,7 +3466,7 @@ else
 fi
 done
 
-for ac_func in sigprocmask waitpid setsid random fcvt
+for ac_func in sigprocmask waitpid setsid random srandom fcvt
 do
 echo $ac_n "checking for $ac_func""... $ac_c" 1>&6
 echo "configure:3473: checking for $ac_func" >&5
index a59aa46bfa2364ba983dc56e5c129ce4ea7bb618..cf6a0c2879754aa740896b5bf08271aea29fa9e9 100644 (file)
@@ -416,7 +416,7 @@ AC_FUNC_MEMCMP
 AC_TYPE_SIGNAL
 AC_FUNC_VPRINTF
 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(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')
index 2d2b599fd56a60faf2a9b307f19e3bb13877c644..265927672f0bc9ad2df6db62150966e6f7796848 100644 (file)
 /* Set to 1 if you 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 */
 #undef HAVE_LIBREADLINE