diff --git a/bin/kill/kill.c b/bin/kill/kill.c index b23c00acf21c..bfa274bc129c 100644 --- a/bin/kill/kill.c +++ b/bin/kill/kill.c @@ -56,7 +56,6 @@ __FBSDID("$FreeBSD$"); #ifdef SHELL #define main killcmd #include "bltin/bltin.h" -#include "error.h" #endif static void nosig(const char *); diff --git a/bin/sh/arith_yacc.h b/bin/sh/arith_yacc.h index 5d8354fa2a16..ca92e6f7fa17 100644 --- a/bin/sh/arith_yacc.h +++ b/bin/sh/arith_yacc.h @@ -81,6 +81,8 @@ #define ARITH_QMARK 37 #define ARITH_COLON 38 +extern const char *arith_buf; + union yystype { arith_t val; char *name; diff --git a/bin/sh/arith_yylex.c b/bin/sh/arith_yylex.c index ad0818426de5..f7eaf3e3fa6d 100644 --- a/bin/sh/arith_yylex.c +++ b/bin/sh/arith_yylex.c @@ -50,8 +50,6 @@ __FBSDID("$FreeBSD$"); #error Arithmetic tokens are out of order. #endif -extern const char *arith_buf; - int yylex(void) { diff --git a/bin/sh/bltin/bltin.h b/bin/sh/bltin/bltin.h index bbf55f1ae79f..a530ab78b2a5 100644 --- a/bin/sh/bltin/bltin.h +++ b/bin/sh/bltin/bltin.h @@ -42,6 +42,7 @@ #include "../shell.h" #include "../mystring.h" #ifdef SHELL +#include "../error.h" #include "../output.h" #include "builtins.h" #define FILE struct output @@ -73,7 +74,6 @@ #include pointer stalloc(int); -void error(const char *, ...) __printf0like(1, 2); int killjob(const char *, int); extern char *commandname; diff --git a/bin/sh/mktokens b/bin/sh/mktokens index 82d7cd7b2d5a..b6f5f97638a1 100644 --- a/bin/sh/mktokens +++ b/bin/sh/mktokens @@ -74,11 +74,11 @@ exec > token.h awk '{print "#define " $1 " " NR-1}' $temp echo ' /* Array indicating which tokens mark the end of a list */ -const char tokendlist[] = {' +static const char tokendlist[] = {' awk '{print "\t" $2 ","}' $temp echo '}; -const char *const tokname[] = {' +static const char *const tokname[] = {' sed -e 's/"/\\"/g' \ -e 's/[^ ]*[ ][ ]*[^ ]*[ ][ ]*\(.*\)/ "\1",/' \ $temp diff --git a/bin/sh/options.h b/bin/sh/options.h index 09948628197d..2048a354b6e5 100644 --- a/bin/sh/options.h +++ b/bin/sh/options.h @@ -73,6 +73,7 @@ struct optent { char val; }; +extern struct optent optlist[NOPTS]; #ifdef DEFINE_OPTIONS struct optent optlist[NOPTS] = { { "errexit", 'e', 0 }, @@ -95,8 +96,6 @@ struct optent optlist[NOPTS] = { { "physical", 'P', 0 }, { "trackall", 'h', 0 }, }; -#else -extern struct optent optlist[NOPTS]; #endif diff --git a/usr.bin/printf/printf.c b/usr.bin/printf/printf.c index 452711e1e39a..8636cc13c1ef 100644 --- a/usr.bin/printf/printf.c +++ b/usr.bin/printf/printf.c @@ -66,7 +66,6 @@ static const char rcsid[] = #ifdef SHELL #define main printfcmd #include "bltin/bltin.h" -#include "error.h" #include "options.h" #endif