From 02aa41ec2539e6bd53a7ebc8fdd9b77e10c21097 Mon Sep 17 00:00:00 2001 From: zrj Date: Fri, 26 Apr 2019 19:32:29 +0300 Subject: [PATCH] sh(1): Exclude better for BOOTSTRAPPING. --- bin/sh/histedit.c | 8 +++++--- bin/sh/input.c | 4 ++++ bin/sh/trap.c | 1 - 3 files changed, 9 insertions(+), 4 deletions(-) diff --git a/bin/sh/histedit.c b/bin/sh/histedit.c index 540c63b610..6b4febb6cf 100644 --- a/bin/sh/histedit.c +++ b/bin/sh/histedit.c @@ -56,11 +56,14 @@ __FBSDID("$FreeBSD$"); #include "mystring.h" #ifndef NO_HISTORY #include "myhistedit.h" +#endif #include "error.h" #include "eval.h" #include "memalloc.h" #include "builtins.h" +#ifndef NO_HISTORY + #define MAXHISTLOOPS 4 /* max recursions through fc */ #define DEFEDITOR "ed" /* default editor *should* be $EDITOR */ @@ -481,10 +484,9 @@ bindcmd(int argc, char **argv) } #else -#include "error.h" int -histcmd(int argc, char **argv) +histcmd(int argc __unused, char **argv __unused) { error("not compiled with history support"); @@ -493,7 +495,7 @@ histcmd(int argc, char **argv) } int -bindcmd(int argc, char **argv) +bindcmd(int argc __unused, char **argv __unused) { error("not compiled with line editing support"); diff --git a/bin/sh/input.c b/bin/sh/input.c index 80630980e0..51071a855f 100644 --- a/bin/sh/input.c +++ b/bin/sh/input.c @@ -59,7 +59,9 @@ __FBSDID("$FreeBSD$"); #include "error.h" #include "alias.h" #include "parser.h" +#ifndef NO_HISTORY #include "myhistedit.h" +#endif #include "trap.h" #define EOF_NLEFT -99 /* value of parsenleft when EOF pushed back */ @@ -102,7 +104,9 @@ static struct parsefile basepf = { /* top level input file */ static struct parsefile *parsefile = &basepf; /* current input file */ int whichprompt; /* 1 == PS1, 2 == PS2 */ +#ifndef NO_HISTORY EditLine *el; /* cookie for editline package */ +#endif static void pushfile(void); static int preadfd(void); diff --git a/bin/sh/trap.c b/bin/sh/trap.c index 4e11a7aa68..de0a92db4a 100644 --- a/bin/sh/trap.c +++ b/bin/sh/trap.c @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); #include "trap.h" #include "mystring.h" #include "builtins.h" -#include "myhistedit.h" /* -- 2.41.0