From c9216080c1501cf0a0e14f5d60ac55c6cf77e3a9 Mon Sep 17 00:00:00 2001 From: Paul Park Date: Tue, 13 Jun 1995 20:02:23 +0000 Subject: [PATCH] Fix test for Ultrix and Solaris git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@6053 dc483132-0cff-0310-8789-dd5450dbe970 --- src/util/berk_db/test/ChangeLog | 8 ++++++++ src/util/berk_db/test/Makefile.in | 6 +++++- src/util/berk_db/test/configure.in | 1 + src/util/berk_db/test/dbtest.c | 5 +++++ 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/util/berk_db/test/ChangeLog b/src/util/berk_db/test/ChangeLog index 2dd88de68..8e2027656 100644 --- a/src/util/berk_db/test/ChangeLog +++ b/src/util/berk_db/test/ChangeLog @@ -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 diff --git a/src/util/berk_db/test/Makefile.in b/src/util/berk_db/test/Makefile.in index 3ec0c7bfb..a033b4be8 100644 --- a/src/util/berk_db/test/Makefile.in +++ b/src/util/berk_db/test/Makefile.in @@ -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:: diff --git a/src/util/berk_db/test/configure.in b/src/util/berk_db/test/configure.in index 2be1a3cdc..6bf30517d 100644 --- a/src/util/berk_db/test/configure.in +++ b/src/util/berk_db/test/configure.in @@ -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 diff --git a/src/util/berk_db/test/dbtest.c b/src/util/berk_db/test/dbtest.c index 3cc0e7772..d26b53b3a 100644 --- a/src/util/berk_db/test/dbtest.c +++ b/src/util/berk_db/test/dbtest.c @@ -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; -- 2.26.2