summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@sun.com>2006-08-10 15:58:18 -0700
committerAlan Coopersmith <alan.coopersmith@sun.com>2006-08-10 15:58:18 -0700
commit644ff9232d48a32dcc16a1eeba2b51c8686eb33e (patch)
treec442eb622f38409ef6918e46d3a0a74a49d3477f
parent048d2bb6b48dce7b2afea39cd429f3253d8e77ca (diff)
Use AC_CHECK_FUNCS instead of #ifdef SYSV to check for srand48 & lrand48
-rw-r--r--GenKey.c2
-rw-r--r--configure.ac2
2 files changed, 3 insertions, 1 deletions
diff --git a/GenKey.c b/GenKey.c
index 0d70256..1469082 100644
--- a/GenKey.c
+++ b/GenKey.c
@@ -50,7 +50,7 @@ getbits (long data, unsigned char *dst)
#include <stdlib.h>
-#if defined(SYSV) || defined(SVR4)
+#if defined(HAVE_LRAND48) && defined(HAVE_SRAND48)
#define srandom srand48
#define random lrand48
#endif
diff --git a/configure.ac b/configure.ac
index 4d66597..79556ce 100644
--- a/configure.ac
+++ b/configure.ac
@@ -37,6 +37,8 @@ AC_LIBTOOL_WIN32_DLL
AM_PROG_LIBTOOL
AC_PROG_MAKE_SET
+AC_CHECK_FUNCS([srand48 lrand48])
+
AC_SEARCH_LIBS([recvfrom],[socket])
PKG_CHECK_MODULES(XDMCP, xproto)