Fix test for Ultrix and Solaris
authorPaul Park <pjpark@mit.edu>
Tue, 13 Jun 1995 20:02:23 +0000 (20:02 +0000)
committerPaul Park <pjpark@mit.edu>
Tue, 13 Jun 1995 20:02:23 +0000 (20:02 +0000)
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6053 dc483132-0cff-0310-8789-dd5450dbe970

src/util/berk_db/test/ChangeLog
src/util/berk_db/test/Makefile.in
src/util/berk_db/test/configure.in
src/util/berk_db/test/dbtest.c

index 2dd88de6849a10a617ea4a0da9ca7f1a1c53a2d4..8e202765638435cd402fd1b3d6281998d361b32b 100644 (file)
@@ -1,3 +1,11 @@
+
+Tue Jun 13 16:00:18 EDT 1995   Paul Park       (pjpark@mit.edu)
+       * dbtest.c - Check for HAVE_INDEX.  If we have it, then use it,
+               otherwise use strchr.
+       * configure.in - check for index(3).
+       * Makefile.in - check for /bin/sh5, if present, use it because some
+               system's /bin/sh doesn't understand some Bourne shell syntax.
+
 Sun Jun 11 02:33:32 1995  Tom Yu  (tlyu@dragons-lair)
 
        * configure.in: fix intial value of CDEFS_INCLUDE so that make
index 3ec0c7bfbe1ac18d1e4489ad5f5a0328deb5c22a..a033b4be8f5344bc140c5b3cc0833d3ad20d31ea 100644 (file)
@@ -25,7 +25,11 @@ clean::
 ${OBJS}: Makefile
 
 check::        dbtest
-       /bin/sh $(srcdir)/run.test hash
+       if [ -x /bin/sh5 ] ; then \
+               /bin/sh5 $(srcdir)/run.test hash ; \
+       else \
+               /bin/sh $(srcdir)/run.test hash ; \
+       fi
 
 all::
 
index 2be1a3cdceb22d51c5331c3300c8c22d06b29962..6bf30517dd1d0e620c78ac22fbb43972513d1652 100644 (file)
@@ -7,4 +7,5 @@ dnl
 CDEFS_INCLUDE=['-I$(PORTDIR)']
 AC_HAVE_HEADERS(sys/cdefs.h, CDEFS_INCLUDE=)
 AC_SUBST(CDEFS_INCLUDE)
+AC_FUNC_CHECK(index,AC_DEFINE(HAVE_INDEX))
 V5_AC_OUTPUT_MAKEFILE
index 3cc0e7772f76fe3ca3a825c59ff14a8897d02724..d26b53b3ad083ed784a6de96288edf36c65b72cc 100644 (file)
@@ -83,6 +83,11 @@ int ofd = STDOUT_FILENO;             /* Standard output fd. */
 DB *XXdbp;                             /* Global for gdb. */
 int XXlineno;                          /* Fast breakpoint for gdb. */
 
+/* index(3) not present on sysV machines */
+#ifndef        HAVE_INDEX
+#define        index   strchr
+#endif /* HAVE_INDEX */
+
 int
 main(argc, argv)
        int argc;