diff --git a/bin/sh/Makefile b/bin/sh/Makefile index 48b6d2852444..f9e827c58d26 100644 --- a/bin/sh/Makefile +++ b/bin/sh/Makefile @@ -25,7 +25,8 @@ SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS} # utilities of the same name are handled with the associated manpage, # builtin.1 in share/man/man1/. -LIBADD= edit +#LIBADD= edit +CFLAGS+= -DNO_HISTORY CFLAGS+=-DSHELL -I. -I${.CURDIR} # for debug: diff --git a/bin/sh/input.c b/bin/sh/input.c index 2ba4c7dd9e00..1a3b8bab000c 100644 --- a/bin/sh/input.c +++ b/bin/sh/input.c @@ -366,8 +366,10 @@ setinputfile(const char *fname, int push, int verify) int fd2; int oflags = O_RDONLY | O_CLOEXEC; +#ifdef O_VERIFY if (verify == 1 || (verify == -1 && verifyflag)) oflags |= O_VERIFY; +#endif INTOFF; if ((fd = open(fname, oflags)) < 0) { diff --git a/bin/sh/main.c b/bin/sh/main.c index 7a4dbc254f81..565709f5e098 100644 --- a/bin/sh/main.c +++ b/bin/sh/main.c @@ -259,8 +259,10 @@ read_profile(const char *name) const char *expandedname; int oflags = O_RDONLY | O_CLOEXEC; +#ifdef O_VERIFY if (verifyflag) oflags |= O_VERIFY; +#endif expandedname = expandstr(name); if (expandedname == NULL) diff --git a/bin/sh/myhistedit.h b/bin/sh/myhistedit.h index ef84a90bf5b0..8941fb1078a7 100644 --- a/bin/sh/myhistedit.h +++ b/bin/sh/myhistedit.h @@ -31,6 +31,7 @@ * @(#)myhistedit.h 8.2 (Berkeley) 5/4/95 */ +#ifndef NO_HISTORY #include extern History *hist; @@ -44,3 +45,4 @@ void sethistsize(const char *); void setterm(const char *); void histload(void); void histsave(void); +#endif