aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRicardo Cerqueira <cyanogenmod@cerqueira.org>2013-07-25 22:35:34 +0100
committerRicardo Cerqueira <cyanogenmod@cerqueira.org>2013-07-25 22:35:34 +0100
commit5e693987c7554457fa7b2d2bef5a130fd98c2b44 (patch)
treef19e73a15ce725be20c1f30077f3694514911160
parentf4b417c62a4f272c4cf9a074d0f7a3a97201f9db (diff)
downloadandroid_external_bash-cm-10.2.tar.gz
android_external_bash-cm-10.2.tar.bz2
android_external_bash-cm-10.2.zip
Change-Id: Icbbcf959deb199e7e584642027ea0383f6450fdc
-rw-r--r--CWRU/misc/hpux10-dlfcn.h2
-rw-r--r--aclocal.m42
-rw-r--r--autom4te.cache/output.02
-rw-r--r--bashhist.c2
-rw-r--r--builtins/bind.c2
-rw-r--r--builtins/bind.def2
-rw-r--r--builtins/caller.c2
-rw-r--r--builtins/caller.def2
-rw-r--r--builtins/cd.c2
-rw-r--r--builtins/cd.def2
-rw-r--r--builtins/common.c2
-rw-r--r--builtins/evalfile.c2
-rw-r--r--builtins/evalstring.c2
-rw-r--r--builtins/exec.c2
-rw-r--r--builtins/exec.def2
-rw-r--r--builtins/fc.c2
-rw-r--r--builtins/fc.def2
-rw-r--r--builtins/help.c2
-rw-r--r--builtins/help.def2
-rw-r--r--builtins/history.c2
-rw-r--r--builtins/history.def2
-rw-r--r--builtins/kill.c2
-rw-r--r--builtins/kill.def2
-rw-r--r--builtins/mapfile.c2
-rw-r--r--builtins/mapfile.def2
-rw-r--r--builtins/mkbuiltins.c2
-rw-r--r--builtins/printf.c2
-rw-r--r--builtins/printf.def2
-rw-r--r--builtins/psize.c2
-rw-r--r--builtins/pushd.c2
-rw-r--r--builtins/pushd.def2
-rw-r--r--builtins/read.c2
-rw-r--r--builtins/read.def2
-rw-r--r--builtins/source.c2
-rw-r--r--builtins/source.def2
-rw-r--r--builtins/ulimit.c2
-rw-r--r--builtins/ulimit.def2
-rwxr-xr-xconfigure2
-rw-r--r--error.c2
-rw-r--r--examples/loadables/cat.c2
-rw-r--r--examples/loadables/getconf.c2
-rw-r--r--examples/loadables/head.c2
-rw-r--r--examples/loadables/ln.c2
-rw-r--r--examples/loadables/logname.c2
-rw-r--r--examples/loadables/mkdir.c2
-rw-r--r--examples/loadables/pathchk.c2
-rw-r--r--examples/loadables/perl/bperl.c2
-rw-r--r--examples/loadables/print.c2
-rw-r--r--examples/loadables/push.c2
-rw-r--r--examples/loadables/rmdir.c2
-rw-r--r--examples/loadables/tee.c2
-rw-r--r--examples/loadables/template.c2
-rw-r--r--examples/loadables/uname.c2
-rw-r--r--examples/loadables/unlink.c2
-rw-r--r--execute_cmd.c2
-rw-r--r--findcmd.c2
-rw-r--r--general.c2
-rw-r--r--input.c2
-rw-r--r--jobs.c2
-rw-r--r--lib/intl/dcigettext.c2
-rw-r--r--lib/readline/bind.c2
-rw-r--r--lib/readline/complete.c2
-rw-r--r--lib/readline/examples/rlcat.c2
-rw-r--r--lib/readline/histfile.c2
-rw-r--r--lib/readline/input.c2
-rw-r--r--lib/readline/readline.c2
-rw-r--r--lib/readline/rltty.c2
-rw-r--r--lib/sh/eaccess.c2
-rw-r--r--lib/sh/fmtulong.c2
-rw-r--r--lib/sh/getcwd.c2
-rw-r--r--lib/sh/getenv.c2
-rw-r--r--lib/sh/input_avail.c2
-rw-r--r--lib/sh/netopen.c2
-rw-r--r--lib/sh/oslib.c2
-rw-r--r--lib/sh/pathcanon.c2
-rw-r--r--lib/sh/pathphys.c2
-rw-r--r--lib/sh/rename.c2
-rw-r--r--lib/sh/strerror.c2
-rw-r--r--lib/sh/strtod.c2
-rw-r--r--lib/sh/strtol.c2
-rw-r--r--lib/sh/tmpfile.c2
-rw-r--r--lib/sh/winsize.c2
-rw-r--r--lib/sh/zcatfd.c2
-rw-r--r--lib/sh/zgetline.c2
-rw-r--r--lib/sh/zmapfd.c2
-rw-r--r--lib/sh/zread.c2
-rw-r--r--lib/sh/zwrite.c2
-rw-r--r--locale.c2
-rw-r--r--mksyntax.c2
-rw-r--r--nojobs.c2
-rw-r--r--parse.y2
-rw-r--r--redir.c2
-rw-r--r--shell.c2
-rw-r--r--subst.c2
-rw-r--r--support/xcase.c2
-rw-r--r--test.c2
-rw-r--r--trap.c2
-rw-r--r--y.tab.c2
98 files changed, 98 insertions, 98 deletions
diff --git a/CWRU/misc/hpux10-dlfcn.h b/CWRU/misc/hpux10-dlfcn.h
index 49d4428..d5c35eb 100644
--- a/CWRU/misc/hpux10-dlfcn.h
+++ b/CWRU/misc/hpux10-dlfcn.h
@@ -43,7 +43,7 @@
#include <errno.h>
#ifndef errno
-extern int errno;
+#include <errno.h>
#endif
#define RTLD_LAZY BIND_DEFERRED
diff --git a/aclocal.m4 b/aclocal.m4
index 716a043..f9edef0 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1946,7 +1946,7 @@ AC_CACHE_VAL(bash_cv_wcontinued_broken,
#include <errno.h>
#ifndef errno
-extern int errno;
+#include <errno.h>
#endif
main()
{
diff --git a/autom4te.cache/output.0 b/autom4te.cache/output.0
index 5ddaaa6..9df95cb 100644
--- a/autom4te.cache/output.0
+++ b/autom4te.cache/output.0
@@ -29020,7 +29020,7 @@ cat >>conftest.$ac_ext <<_ACEOF
#include <errno.h>
#ifndef errno
-extern int errno;
+#include <errno.h>
#endif
main()
{
diff --git a/bashhist.c b/bashhist.c
index 7240a5b..a970535 100644
--- a/bashhist.c
+++ b/bashhist.c
@@ -60,7 +60,7 @@ extern int rl_done, rl_dispatching; /* should really include readline.h */
#endif
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
static int histignore_item_func __P((struct ign *));
diff --git a/builtins/bind.c b/builtins/bind.c
index 60a3a0b..34cd65f 100644
--- a/builtins/bind.c
+++ b/builtins/bind.c
@@ -17,7 +17,7 @@
#include <stdio.h>
#include <errno.h>
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
#include <readline/readline.h>
diff --git a/builtins/bind.def b/builtins/bind.def
index d0c953b..76d1144 100644
--- a/builtins/bind.def
+++ b/builtins/bind.def
@@ -71,7 +71,7 @@ $END
#include <stdio.h>
#include <errno.h>
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
#include <readline/readline.h>
diff --git a/builtins/caller.c b/builtins/caller.c
index d40438c..342d769 100644
--- a/builtins/caller.c
+++ b/builtins/caller.c
@@ -29,7 +29,7 @@
#endif
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
int
diff --git a/builtins/caller.def b/builtins/caller.def
index 7ddbdad..4218fc3 100644
--- a/builtins/caller.def
+++ b/builtins/caller.def
@@ -64,7 +64,7 @@ $END
#endif
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
int
diff --git a/builtins/cd.c b/builtins/cd.c
index 85be7d1..014461f 100644
--- a/builtins/cd.c
+++ b/builtins/cd.c
@@ -31,7 +31,7 @@
#include "bashgetopt.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
extern int posixly_correct;
diff --git a/builtins/cd.def b/builtins/cd.def
index b1aae26..dd98aad 100644
--- a/builtins/cd.def
+++ b/builtins/cd.def
@@ -50,7 +50,7 @@ $PRODUCES cd.c
#include "bashgetopt.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
extern int posixly_correct;
diff --git a/builtins/common.c b/builtins/common.c
index 83f65d8..5e1c3ff 100644
--- a/builtins/common.c
+++ b/builtins/common.c
@@ -64,7 +64,7 @@
#endif
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
extern int indirection_level, subshell_environment;
diff --git a/builtins/evalfile.c b/builtins/evalfile.c
index 4d69acb..6f7b751 100644
--- a/builtins/evalfile.c
+++ b/builtins/evalfile.c
@@ -52,7 +52,7 @@
#include "common.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
/* Flags for _evalfile() */
diff --git a/builtins/evalstring.c b/builtins/evalstring.c
index 333a56e..df5b5d8 100644
--- a/builtins/evalstring.c
+++ b/builtins/evalstring.c
@@ -55,7 +55,7 @@
#include "builtext.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
#define IS_BUILTIN(s) (builtin_address_internal(s, 0) != (struct builtin *)NULL)
diff --git a/builtins/exec.c b/builtins/exec.c
index 681eee3..b1824ae 100644
--- a/builtins/exec.c
+++ b/builtins/exec.c
@@ -33,7 +33,7 @@
/* Not all systems declare ERRNO in errno.h... and some systems #define it! */
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
extern int subshell_environment;
diff --git a/builtins/exec.def b/builtins/exec.def
index 5d1e625..7e1a180 100644
--- a/builtins/exec.def
+++ b/builtins/exec.def
@@ -71,7 +71,7 @@ $END
/* Not all systems declare ERRNO in errno.h... and some systems #define it! */
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
extern int subshell_environment;
diff --git a/builtins/fc.c b/builtins/fc.c
index b0f9361..39b3b4e 100644
--- a/builtins/fc.c
+++ b/builtins/fc.c
@@ -36,7 +36,7 @@
#include "common.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
extern int current_command_line_count;
diff --git a/builtins/fc.def b/builtins/fc.def
index 257029d..dc4e41c 100644
--- a/builtins/fc.def
+++ b/builtins/fc.def
@@ -82,7 +82,7 @@ $END
#include "common.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
extern int current_command_line_count, saved_command_line_count;
diff --git a/builtins/help.c b/builtins/help.c
index d274535..6f632da 100644
--- a/builtins/help.c
+++ b/builtins/help.c
@@ -31,7 +31,7 @@
#include <glob/glob.h>
#ifndef errno
-extern int errno;
+#include <errno.h>
#endif
extern const char * const bash_copyright;
diff --git a/builtins/help.def b/builtins/help.def
index 8fb0e2b..a2081f4 100644
--- a/builtins/help.def
+++ b/builtins/help.def
@@ -71,7 +71,7 @@ $END
#include <glob/glob.h>
#ifndef errno
-extern int errno;
+#include <errno.h>
#endif
extern const char * const bash_copyright;
diff --git a/builtins/history.c b/builtins/history.c
index c5c5818..5e9b312 100644
--- a/builtins/history.c
+++ b/builtins/history.c
@@ -28,7 +28,7 @@
#include "common.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
extern int current_command_line_count;
diff --git a/builtins/history.def b/builtins/history.def
index e8249e9..6c27e82 100644
--- a/builtins/history.def
+++ b/builtins/history.def
@@ -80,7 +80,7 @@ $END
#include "common.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
extern int current_command_line_count;
diff --git a/builtins/kill.c b/builtins/kill.c
index e68b345..d6f7ba3 100644
--- a/builtins/kill.c
+++ b/builtins/kill.c
@@ -24,7 +24,7 @@
/* Not all systems declare ERRNO in errno.h... and some systems #define it! */
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
extern int posixly_correct;
diff --git a/builtins/kill.def b/builtins/kill.def
index adf022c..abf15ec 100644
--- a/builtins/kill.def
+++ b/builtins/kill.def
@@ -64,7 +64,7 @@ $END
/* Not all systems declare ERRNO in errno.h... and some systems #define it! */
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
extern int posixly_correct;
diff --git a/builtins/mapfile.c b/builtins/mapfile.c
index 8b79c37..d3c5419 100644
--- a/builtins/mapfile.c
+++ b/builtins/mapfile.c
@@ -26,7 +26,7 @@
#include "bashgetopt.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
#if defined (ARRAY_VARS)
diff --git a/builtins/mapfile.def b/builtins/mapfile.def
index ec1e32e..c788430 100644
--- a/builtins/mapfile.def
+++ b/builtins/mapfile.def
@@ -84,7 +84,7 @@ $END
#include "bashgetopt.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
#if defined (ARRAY_VARS)
diff --git a/builtins/mkbuiltins.c b/builtins/mkbuiltins.c
index cdfdfb1..897acba 100644
--- a/builtins/mkbuiltins.c
+++ b/builtins/mkbuiltins.c
@@ -56,7 +56,7 @@
#define DOCFILE "builtins.texi"
#ifndef errno
-extern int errno;
+#include <errno.h>
#endif
static char *xmalloc (), *xrealloc ();
diff --git a/builtins/printf.c b/builtins/printf.c
index 2bb1178..3c42fa7 100644
--- a/builtins/printf.c
+++ b/builtins/printf.c
@@ -51,7 +51,7 @@
#endif
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
#define PC(c) \
diff --git a/builtins/printf.def b/builtins/printf.def
index 7892cb5..96c6b64 100644
--- a/builtins/printf.def
+++ b/builtins/printf.def
@@ -99,7 +99,7 @@ $END
#endif
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
#define PC(c) \
diff --git a/builtins/psize.c b/builtins/psize.c
index 30881fb..0afe799 100644
--- a/builtins/psize.c
+++ b/builtins/psize.c
@@ -42,7 +42,7 @@
#include "../sig.h"
#ifndef errno
-extern int errno;
+#include <errno.h>
#endif
int nw;
diff --git a/builtins/pushd.c b/builtins/pushd.c
index 2de6b64..1a431a8 100644
--- a/builtins/pushd.c
+++ b/builtins/pushd.c
@@ -39,7 +39,7 @@
#endif
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
/* The list of remembered directories. */
diff --git a/builtins/pushd.def b/builtins/pushd.def
index 05b7529..b693ef1 100644
--- a/builtins/pushd.def
+++ b/builtins/pushd.def
@@ -143,7 +143,7 @@ $END
#endif
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
/* The list of remembered directories. */
diff --git a/builtins/read.c b/builtins/read.c
index 3eb4ceb..4cde065 100644
--- a/builtins/read.c
+++ b/builtins/read.c
@@ -42,7 +42,7 @@
#endif
#if !defined(errno)
-extern int errno;
+#include <errno.h>
#endif
struct ttsave
diff --git a/builtins/read.def b/builtins/read.def
index c4a668a..855dd15 100644
--- a/builtins/read.def
+++ b/builtins/read.def
@@ -102,7 +102,7 @@ $END
#endif
#if !defined(errno)
-extern int errno;
+#include <errno.h>
#endif
struct ttsave
diff --git a/builtins/source.c b/builtins/source.c
index 2926553..40abc8b 100644
--- a/builtins/source.c
+++ b/builtins/source.c
@@ -30,7 +30,7 @@
#include "../trap.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
extern int posixly_correct;
diff --git a/builtins/source.def b/builtins/source.def
index 71908b8..a6027ca 100644
--- a/builtins/source.def
+++ b/builtins/source.def
@@ -76,7 +76,7 @@ $END
#include "../trap.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
extern int posixly_correct;
diff --git a/builtins/ulimit.c b/builtins/ulimit.c
index 44f0b34..1b33a1a 100644
--- a/builtins/ulimit.c
+++ b/builtins/ulimit.c
@@ -27,7 +27,7 @@
#include "pipesize.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
/* For some reason, HPUX chose to make these definitions visible only if
diff --git a/builtins/ulimit.def b/builtins/ulimit.def
index 03cbe8a..a9bb1c6 100644
--- a/builtins/ulimit.def
+++ b/builtins/ulimit.def
@@ -89,7 +89,7 @@ $END
#include "pipesize.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
/* For some reason, HPUX chose to make these definitions visible only if
diff --git a/configure b/configure
index 7ec72fe..7e111bd 100755
--- a/configure
+++ b/configure
@@ -30378,7 +30378,7 @@ cat >>conftest.$ac_ext <<_ACEOF
#include <errno.h>
#ifndef errno
-extern int errno;
+#include <errno.h>
#endif
main()
{
diff --git a/error.c b/error.c
index 72da9f5..3cc0ab8 100644
--- a/error.c
+++ b/error.c
@@ -37,7 +37,7 @@
#include <errno.h>
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
#include "bashansi.h"
diff --git a/examples/loadables/cat.c b/examples/loadables/cat.c
index 1ce2e2d..30fe789 100644
--- a/examples/loadables/cat.c
+++ b/examples/loadables/cat.c
@@ -29,7 +29,7 @@
#include "shell.h"
#ifndef errno
-extern int errno;
+#include <errno.h>
#endif
extern char *strerror ();
diff --git a/examples/loadables/getconf.c b/examples/loadables/getconf.c
index d3dec41..b70f531 100644
--- a/examples/loadables/getconf.c
+++ b/examples/loadables/getconf.c
@@ -72,7 +72,7 @@
#include "getconf.h"
#ifndef errno
-extern int errno;
+#include <errno.h>
#endif
struct conf_variable
diff --git a/examples/loadables/head.c b/examples/loadables/head.c
index 22cf6ab..ac93f78 100644
--- a/examples/loadables/head.c
+++ b/examples/loadables/head.c
@@ -42,7 +42,7 @@
#include "common.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
static void
diff --git a/examples/loadables/ln.c b/examples/loadables/ln.c
index ec73636..16514ee 100644
--- a/examples/loadables/ln.c
+++ b/examples/loadables/ln.c
@@ -39,7 +39,7 @@
#include "common.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
typedef int unix_link_syscall_t __P((const char *, const char *));
diff --git a/examples/loadables/logname.c b/examples/loadables/logname.c
index 95b7e21..c3d2538 100644
--- a/examples/loadables/logname.c
+++ b/examples/loadables/logname.c
@@ -32,7 +32,7 @@
#include "common.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
logname_builtin (list)
diff --git a/examples/loadables/mkdir.c b/examples/loadables/mkdir.c
index f41f171..7410b60 100644
--- a/examples/loadables/mkdir.c
+++ b/examples/loadables/mkdir.c
@@ -37,7 +37,7 @@
#include "common.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
#define ISOCTAL(c) ((c) >= '0' && (c) <= '7')
diff --git a/examples/loadables/pathchk.c b/examples/loadables/pathchk.c
index c5fd24a..6c510e1 100644
--- a/examples/loadables/pathchk.c
+++ b/examples/loadables/pathchk.c
@@ -66,7 +66,7 @@
#include "common.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
#if !defined (_POSIX_PATH_MAX)
diff --git a/examples/loadables/perl/bperl.c b/examples/loadables/perl/bperl.c
index 77e3f7c..c12fd7a 100644
--- a/examples/loadables/perl/bperl.c
+++ b/examples/loadables/perl/bperl.c
@@ -10,7 +10,7 @@
#include "shell.h"
#ifndef errno
-extern int errno;
+#include <errno.h>
#endif
extern char **make_builtin_argv ();
diff --git a/examples/loadables/print.c b/examples/loadables/print.c
index e17597b..fa22bf7 100644
--- a/examples/loadables/print.c
+++ b/examples/loadables/print.c
@@ -39,7 +39,7 @@
#include "common.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
int print_builtin ();
diff --git a/examples/loadables/push.c b/examples/loadables/push.c
index b076073..ca5de75 100644
--- a/examples/loadables/push.c
+++ b/examples/loadables/push.c
@@ -32,7 +32,7 @@
#include "common.h"
#ifndef errno
-extern int errno;
+#include <errno.h>
#endif
extern int dollar_dollar_pid;
diff --git a/examples/loadables/rmdir.c b/examples/loadables/rmdir.c
index 0cfe6c7..5d7bf8c 100644
--- a/examples/loadables/rmdir.c
+++ b/examples/loadables/rmdir.c
@@ -29,7 +29,7 @@
#include "common.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
rmdir_builtin (list)
diff --git a/examples/loadables/tee.c b/examples/loadables/tee.c
index 8b5715f..2f7e4d0 100644
--- a/examples/loadables/tee.c
+++ b/examples/loadables/tee.c
@@ -43,7 +43,7 @@
#include "common.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
typedef struct flist {
diff --git a/examples/loadables/template.c b/examples/loadables/template.c
index 3a5814f..d8ee271 100644
--- a/examples/loadables/template.c
+++ b/examples/loadables/template.c
@@ -16,7 +16,7 @@
#include "bashgetopt.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
extern char *strerror ();
diff --git a/examples/loadables/uname.c b/examples/loadables/uname.c
index a1bddd5..14a9bbb 100644
--- a/examples/loadables/uname.c
+++ b/examples/loadables/uname.c
@@ -56,7 +56,7 @@ struct utsname {
#define FLAG_ALL 0x1f
#ifndef errno
-extern int errno;
+#include <errno.h>
#endif
static void uprint();
diff --git a/examples/loadables/unlink.c b/examples/loadables/unlink.c
index 07e3f3d..3c829e3 100644
--- a/examples/loadables/unlink.c
+++ b/examples/loadables/unlink.c
@@ -35,7 +35,7 @@
#include "common.h"
#ifndef errno
-extern int errno;
+#include <errno.h>
#endif
unlink_builtin (list)
diff --git a/execute_cmd.c b/execute_cmd.c
index 485b0c7..89001a5 100644
--- a/execute_cmd.c
+++ b/execute_cmd.c
@@ -54,7 +54,7 @@
#include <errno.h>
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
#define NEED_FPURGE_DECL
diff --git a/findcmd.c b/findcmd.c
index 330e395..e4cf148 100644
--- a/findcmd.c
+++ b/findcmd.c
@@ -45,7 +45,7 @@
#include "findcmd.h" /* matching prototypes and declarations */
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
extern int posixly_correct;
diff --git a/general.c b/general.c
index fdadf1d..6c6af6d 100644
--- a/general.c
+++ b/general.c
@@ -44,7 +44,7 @@
#include <tilde/tilde.h>
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
extern int expand_aliases;
diff --git a/input.c b/input.c
index 2731e29..9c30f28 100644
--- a/input.c
+++ b/input.c
@@ -44,7 +44,7 @@
#include "quit.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
#if defined (EAGAIN)
diff --git a/jobs.c b/jobs.c
index d63c5dd..7d65b68 100644
--- a/jobs.c
+++ b/jobs.c
@@ -74,7 +74,7 @@
#include "builtins/common.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
#if !defined (HAVE_KILLPG)
diff --git a/lib/intl/dcigettext.c b/lib/intl/dcigettext.c
index c0f347e..64b3875 100644
--- a/lib/intl/dcigettext.c
+++ b/lib/intl/dcigettext.c
@@ -55,7 +55,7 @@ char *alloca ();
#include <errno.h>
#ifndef errno
-extern int errno;
+#include <errno.h>
#endif
#ifndef __set_errno
# define __set_errno(val) errno = (val)
diff --git a/lib/readline/bind.c b/lib/readline/bind.c
index 59e7964..40de74e 100644
--- a/lib/readline/bind.c
+++ b/lib/readline/bind.c
@@ -49,7 +49,7 @@
#include <errno.h>
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
#include "posixstat.h"
diff --git a/lib/readline/complete.c b/lib/readline/complete.c
index 6e5b4f8..bd7240b 100644
--- a/lib/readline/complete.c
+++ b/lib/readline/complete.c
@@ -45,7 +45,7 @@
#include <errno.h>
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
#if defined (HAVE_PWD_H)
diff --git a/lib/readline/examples/rlcat.c b/lib/readline/examples/rlcat.c
index fa9e06f..db03e87 100644
--- a/lib/readline/examples/rlcat.c
+++ b/lib/readline/examples/rlcat.c
@@ -46,7 +46,7 @@ extern void exit();
#endif
#ifndef errno
-extern int errno;
+#include <errno.h>
#endif
#if defined (READLINE_LIBRARY)
diff --git a/lib/readline/histfile.c b/lib/readline/histfile.c
index 30a6182..5e1da98 100644
--- a/lib/readline/histfile.c
+++ b/lib/readline/histfile.c
@@ -90,7 +90,7 @@
#include <errno.h>
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
#include "history.h"
diff --git a/lib/readline/input.c b/lib/readline/input.c
index 7c74c99..a53d89f 100644
--- a/lib/readline/input.c
+++ b/lib/readline/input.c
@@ -55,7 +55,7 @@
#include <errno.h>
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
/* System-specific feature definitions and include files. */
diff --git a/lib/readline/readline.c b/lib/readline/readline.c
index f2e4d93..e0bea55 100644
--- a/lib/readline/readline.c
+++ b/lib/readline/readline.c
@@ -52,7 +52,7 @@
#include <errno.h>
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
/* System-specific feature definitions and include files. */
diff --git a/lib/readline/rltty.c b/lib/readline/rltty.c
index d237b1c..cfc9e2b 100644
--- a/lib/readline/rltty.c
+++ b/lib/readline/rltty.c
@@ -46,7 +46,7 @@
#include "rlprivate.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
rl_vintfunc_t *rl_prep_term_function = rl_prep_terminal;
diff --git a/lib/sh/eaccess.c b/lib/sh/eaccess.c
index d9bca8c..8817644 100644
--- a/lib/sh/eaccess.c
+++ b/lib/sh/eaccess.c
@@ -34,7 +34,7 @@
#include <errno.h>
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
#if !defined (_POSIX_VERSION) && defined (HAVE_SYS_FILE_H)
diff --git a/lib/sh/fmtulong.c b/lib/sh/fmtulong.c
index 214b146..1f81e15 100644
--- a/lib/sh/fmtulong.c
+++ b/lib/sh/fmtulong.c
@@ -51,7 +51,7 @@
#include <typemax.h>
#ifndef errno
-extern int errno;
+#include <errno.h>
#endif
#define x_digs "0123456789abcdef"
diff --git a/lib/sh/getcwd.c b/lib/sh/getcwd.c
index 07eb817..25a078f 100644
--- a/lib/sh/getcwd.c
+++ b/lib/sh/getcwd.c
@@ -57,7 +57,7 @@
#include <xmalloc.h>
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
#if !defined (HAVE_LSTAT)
diff --git a/lib/sh/getenv.c b/lib/sh/getenv.c
index 8b5e340..c86f861 100644
--- a/lib/sh/getenv.c
+++ b/lib/sh/getenv.c
@@ -32,7 +32,7 @@
#include <shell.h>
#ifndef errno
-extern int errno;
+#include <errno.h>
#endif
extern char **environ;
diff --git a/lib/sh/input_avail.c b/lib/sh/input_avail.c
index ac157a9..c2ecbc1 100644
--- a/lib/sh/input_avail.c
+++ b/lib/sh/input_avail.c
@@ -49,7 +49,7 @@
#include <errno.h>
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
#if !defined (O_NDELAY) && defined (O_NONBLOCK)
diff --git a/lib/sh/netopen.c b/lib/sh/netopen.c
index 736d413..f82aaa6 100644
--- a/lib/sh/netopen.c
+++ b/lib/sh/netopen.c
@@ -59,7 +59,7 @@
#include <xmalloc.h>
#ifndef errno
-extern int errno;
+#include <errno.h>
#endif
#if !defined (HAVE_INET_ATON)
diff --git a/lib/sh/oslib.c b/lib/sh/oslib.c
index b3470d1..c3aeb46 100644
--- a/lib/sh/oslib.c
+++ b/lib/sh/oslib.c
@@ -48,7 +48,7 @@
#include <shell.h>
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
/* Make the functions strchr and strrchr if they do not exist. */
diff --git a/lib/sh/pathcanon.c b/lib/sh/pathcanon.c
index 98e41ce..4090126 100644
--- a/lib/sh/pathcanon.c
+++ b/lib/sh/pathcanon.c
@@ -39,7 +39,7 @@
#include "shell.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
#if defined (__CYGWIN__)
diff --git a/lib/sh/pathphys.c b/lib/sh/pathphys.c
index 15fcd25..e494108 100644
--- a/lib/sh/pathphys.c
+++ b/lib/sh/pathphys.c
@@ -43,7 +43,7 @@
#endif
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
extern char *get_working_directory __P((char *));
diff --git a/lib/sh/rename.c b/lib/sh/rename.c
index e410b5e..ef2c7fb 100644
--- a/lib/sh/rename.c
+++ b/lib/sh/rename.c
@@ -35,7 +35,7 @@
#include <stdc.h>
#ifndef errno
-extern int errno;
+#include <errno.h>
#endif
int
diff --git a/lib/sh/strerror.c b/lib/sh/strerror.c
index 4081e9c..376a952 100644
--- a/lib/sh/strerror.c
+++ b/lib/sh/strerror.c
@@ -37,7 +37,7 @@
#include <shell.h>
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
/* Return a string corresponding to the error number E. From
diff --git a/lib/sh/strtod.c b/lib/sh/strtod.c
index 851d99b..bd09981 100644
--- a/lib/sh/strtod.c
+++ b/lib/sh/strtod.c
@@ -26,7 +26,7 @@
#include <errno.h>
#ifndef errno
-extern int errno;
+#include <errno.h>
#endif
#include <chartypes.h>
diff --git a/lib/sh/strtol.c b/lib/sh/strtol.c
index 8aa7478..bf7985e 100644
--- a/lib/sh/strtol.c
+++ b/lib/sh/strtol.c
@@ -26,7 +26,7 @@
#include <errno.h>
#ifndef errno
-extern int errno;
+#include <errno.h>
#endif
#ifndef __set_errno
diff --git a/lib/sh/tmpfile.c b/lib/sh/tmpfile.c
index 0bbc287..680d7bd 100644
--- a/lib/sh/tmpfile.c
+++ b/lib/sh/tmpfile.c
@@ -37,7 +37,7 @@
#include <shell.h>
#ifndef errno
-extern int errno;
+#include <errno.h>
#endif
#define BASEOPENFLAGS (O_CREAT | O_TRUNC | O_EXCL | O_BINARY)
diff --git a/lib/sh/winsize.c b/lib/sh/winsize.c
index 64a9858..ad02075 100644
--- a/lib/sh/winsize.c
+++ b/lib/sh/winsize.c
@@ -60,7 +60,7 @@
#define input_tty() (shell_tty != -1) ? shell_tty : fileno (stderr)
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
extern int shell_tty;
diff --git a/lib/sh/zcatfd.c b/lib/sh/zcatfd.c
index bdbcd91..5c7bdc4 100644
--- a/lib/sh/zcatfd.c
+++ b/lib/sh/zcatfd.c
@@ -31,7 +31,7 @@
#include <stdc.h>
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
extern ssize_t zread __P((int, char *, size_t));
diff --git a/lib/sh/zgetline.c b/lib/sh/zgetline.c
index 33ac830..655afd0 100644
--- a/lib/sh/zgetline.c
+++ b/lib/sh/zgetline.c
@@ -31,7 +31,7 @@
#include "xmalloc.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
extern ssize_t zread __P((int, char *, size_t));
diff --git a/lib/sh/zmapfd.c b/lib/sh/zmapfd.c
index 4000c4a..22e3657 100644
--- a/lib/sh/zmapfd.c
+++ b/lib/sh/zmapfd.c
@@ -33,7 +33,7 @@
#include "general.h"
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
extern ssize_t zread __P((int, char *, size_t));
diff --git a/lib/sh/zread.c b/lib/sh/zread.c
index 0fd1199..da90c0e 100644
--- a/lib/sh/zread.c
+++ b/lib/sh/zread.c
@@ -29,7 +29,7 @@
#include <errno.h>
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
#ifndef SEEK_CUR
diff --git a/lib/sh/zwrite.c b/lib/sh/zwrite.c
index 3240f4f..b260572 100644
--- a/lib/sh/zwrite.c
+++ b/lib/sh/zwrite.c
@@ -29,7 +29,7 @@
#include <errno.h>
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
/* Write NB bytes from BUF to file descriptor FD, retrying the write if
diff --git a/locale.c b/locale.c
index 722a707..afc7bd2 100644
--- a/locale.c
+++ b/locale.c
@@ -36,7 +36,7 @@
#include "input.h" /* For bash_input */
#ifndef errno
-extern int errno;
+#include <errno.h>
#endif
extern int dump_translatable_strings, dump_po_strings;
diff --git a/mksyntax.c b/mksyntax.c
index 56ade2e..d9255b8 100644
--- a/mksyntax.c
+++ b/mksyntax.c
@@ -37,7 +37,7 @@ extern int optind;
extern char *optarg;
#ifndef errno
-extern int errno;
+#include <errno.h>
#endif
#ifndef HAVE_STRERROR
diff --git a/nojobs.c b/nojobs.c
index d43d1d4..a1a6c75 100644
--- a/nojobs.c
+++ b/nojobs.c
@@ -69,7 +69,7 @@
#define input_tty() (shell_tty != -1) ? shell_tty : fileno (stderr)
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
extern int interactive, interactive_shell, login_shell;
diff --git a/parse.y b/parse.y
index b5c94e7..e265a89 100644
--- a/parse.y
+++ b/parse.y
@@ -128,7 +128,7 @@ extern sh_builtin_func_t *last_shell_builtin, *this_shell_builtin;
extern int bash_input_fd_changed;
#endif
-extern int errno;
+#include <errno.h>
/* **************************************************************** */
/* */
/* "Forward" declarations */
diff --git a/redir.c b/redir.c
index 921be8c..a81eb5b 100644
--- a/redir.c
+++ b/redir.c
@@ -39,7 +39,7 @@
#include <errno.h>
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
#include "bashansi.h"
diff --git a/shell.c b/shell.c
index 9e74f3b..ed81d8f 100644
--- a/shell.c
+++ b/shell.c
@@ -88,7 +88,7 @@ extern struct passwd *getpwuid ();
#endif /* !HAVE_GETPW_DECLS */
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif
#if defined (NO_MAIN_ENV_ARG)
diff --git a/subst.c b/subst.c
index 145e937..7fdf283 100644
--- a/subst.c
+++ b/subst.c
@@ -63,7 +63,7 @@
#include <glob/strmatch.h>
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
/* The size that strings change by. */
diff --git a/support/xcase.c b/support/xcase.c
index efd11be..12fddf7 100644
--- a/support/xcase.c
+++ b/support/xcase.c
@@ -33,7 +33,7 @@
#include <errno.h>
#ifndef errno
-extern int errno;
+#include <errno.h>
#endif
#define LOWER 1
diff --git a/test.c b/test.c
index e0cc19d..e21b8a8 100644
--- a/test.c
+++ b/test.c
@@ -42,7 +42,7 @@
#include <errno.h>
#if !defined (errno)
-extern int errno;
+#include <errno.h>
#endif /* !errno */
#if !defined (_POSIX_VERSION) && defined (HAVE_SYS_FILE_H)
diff --git a/trap.c b/trap.c
index 86665e7..da8445b 100644
--- a/trap.c
+++ b/trap.c
@@ -45,7 +45,7 @@
#include "builtins/builtext.h"
#ifndef errno
-extern int errno;
+#include <errno.h>
#endif
/* Flags which describe the current handling state of a signal. */
diff --git a/y.tab.c b/y.tab.c
index d8280fc..85c96d7 100644
--- a/y.tab.c
+++ b/y.tab.c
@@ -279,7 +279,7 @@ extern sh_builtin_func_t *last_shell_builtin, *this_shell_builtin;
extern int bash_input_fd_changed;
#endif
-extern int errno;
+#include <errno.h>
/* **************************************************************** */
/* */
/* "Forward" declarations */