Untangle NEWDB/NDBM options.

Enable praliases.c to not use NDBM.
This commit is contained in:
Peter Wemm 1996-10-24 14:04:03 +00:00
parent 2855b0343c
commit 0ee48eaae9
3 changed files with 10 additions and 5 deletions

View File

@ -2,8 +2,7 @@
PROG= praliases
MAN8= praliases.8
CFLAGS+=-I${.CURDIR}/../src
DPADD= ${LIBDBM}
CFLAGS+=-I${.CURDIR}/../src -DNEWDB
.include "../../Makefile.inc"
.include <bsd.prog.mk>

View File

@ -56,8 +56,10 @@ main(argc, argv)
{
extern char *optarg;
extern int optind;
#ifdef NDBM
DBM *dbp;
datum content, key;
#endif
char *filename;
int ch;
#ifdef NEWDB
@ -101,8 +103,11 @@ main(argc, argv)
newdbkey.data);
}
}
else {
#endif
#ifdef NDBM
#ifdef NEWDB
else {
#endif /* NEWDB */
if ((dbp = dbm_open(filename, O_RDONLY, 0)) == NULL) {
(void)fprintf(stderr,
"praliases: %s: %s\n", filename, strerror(errno));
@ -128,6 +133,7 @@ main(argc, argv)
}
#ifdef NEWDB
}
#endif
#endif /* NEWDB */
#endif /* NDBM */
exit(EX_OK);
}

View File

@ -2,7 +2,7 @@
PROG= smrsh
MAN8= smrsh.8
CFLAGS+=-I${.CURDIR}/../src -DNDBM -DNEWDB
CFLAGS+=-I${.CURDIR}/../src -DNEWDB
BINDIR= /usr/libexec
.include <bsd.prog.mk>