Untangle NEWDB/NDBM options.
Enable praliases.c to not use NDBM.
This commit is contained in:
parent
2855b0343c
commit
0ee48eaae9
@ -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>
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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>
|
||||
|
Loading…
Reference in New Issue
Block a user