From 42a2c62292ca811bbca455ef738fcde861644d53 Mon Sep 17 00:00:00 2001 From: Dan Nicolaescu Date: Thu, 1 Apr 2010 20:10:33 -0700 Subject: [PATCH] Remove extern errno declarations. * xterm.c: * xrdb.c: * w32term.c: * unexec.c: * unexaix.c: * sysdep.c: * process.c: * lread.c: * keyboard.c: * floatfns.c: * filelock.c: * fileio.c: * emacs.c (main): * ecrt0.c: * dispnew.c: * callproc.c: * buffer.c: Remove errno extern declarations. * s/netbsd.h (NEED_ERRNO): Remove. * movemail.c: * etags.c: * emacsclient.c: Remove extern errno declarations. --- lib-src/ChangeLog | 7 +++++++ lib-src/emacsclient.c | 1 - lib-src/etags.c | 3 --- lib-src/movemail.c | 3 --- src/ChangeLog | 22 ++++++++++++++++++++++ src/buffer.c | 6 ------ src/callproc.c | 5 ----- src/dispnew.c | 3 --- src/ecrt0.c | 4 ---- src/emacs.c | 3 --- src/fileio.c | 6 ------ src/filelock.c | 3 --- src/floatfns.c | 4 ---- src/keyboard.c | 4 ---- src/lread.c | 4 ---- src/process.c | 4 ---- src/s/netbsd.h | 2 -- src/sysdep.c | 6 ------ src/unexaix.c | 1 - src/unexec.c | 3 --- src/w32term.c | 4 ---- src/xrdb.c | 3 +-- src/xterm.c | 2 -- 23 files changed, 30 insertions(+), 73 deletions(-) diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 4e9c7e19ff7..ad7ce6da3c2 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,10 @@ +2010-04-02 Dan Nicolaescu + + Remove extern errno declarations. + * movemail.c: + * etags.c: + * emacsclient.c: Remove extern errno declarations. + 2010-03-20 Glenn Morris * Makefile.in (KRB4LIB, DESLIB, KRB5LIB, CRYPTOLIB, COM_ERRLIB) diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 01241b518bb..1e7ec7d9678 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -723,7 +723,6 @@ main (argc, argv) #define SEND_BUFFER_SIZE 4096 extern char *strerror (); -extern int errno; /* Buffer to accumulate data to send in TCP connections. */ char send_buffer[SEND_BUFFER_SIZE + 1]; diff --git a/lib-src/etags.c b/lib-src/etags.c index 17aad9a2252..89edc6c1b27 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -188,9 +188,6 @@ char pot_etags_version[] = "@(#) pot revision number is 17.38.1.4"; #include #include #include -#ifndef errno - extern int errno; -#endif #include #include diff --git a/lib-src/movemail.c b/lib-src/movemail.c index e0eb4d48b89..a887eb216ac 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -140,9 +140,6 @@ static char *mail_spool_name (); #endif #endif -#ifndef errno -extern int errno; -#endif char *strerror (); #ifdef HAVE_INDEX extern char *index __P ((const char *, int)); diff --git a/src/ChangeLog b/src/ChangeLog index 08c40c6048c..cd8eac76a3a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,25 @@ +2010-04-02 Dan Nicolaescu + + Remove extern errno declarations. + * xterm.c: + * xrdb.c: + * w32term.c: + * unexec.c: + * unexaix.c: + * sysdep.c: + * process.c: + * lread.c: + * keyboard.c: + * floatfns.c: + * filelock.c: + * fileio.c: + * emacs.c (main): + * ecrt0.c: + * dispnew.c: + * callproc.c: + * buffer.c: Remove errno extern declarations. + * s/netbsd.h (NEED_ERRNO): Remove. + 2010-04-01 Dan Nicolaescu Remove all uses of LIBX11_SYSTEM. diff --git a/src/buffer.c b/src/buffer.c index 0c6e57d45be..9035a986b4c 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -28,11 +28,6 @@ along with GNU Emacs. If not, see . */ #include #include -#ifndef USE_CRT_DLL -extern int errno; -#endif - - #ifdef HAVE_UNISTD_H #include #endif @@ -4627,7 +4622,6 @@ buffer_slot_type_mismatch (newval, type) #endif #include -#include #if MAP_ANON == 0 #include diff --git a/src/callproc.c b/src/callproc.c index bed3302e508..378c647f385 100644 --- a/src/callproc.c +++ b/src/callproc.c @@ -25,10 +25,6 @@ along with GNU Emacs. If not, see . */ #include #include -#ifndef USE_CRT_DLL -extern int errno; -#endif - /* Define SIGCHLD as an alias for SIGCLD. */ #if !defined (SIGCHLD) && defined (SIGCLD) @@ -61,7 +57,6 @@ extern int errno; #include #include #include -#include #endif /* MSDOS */ #ifndef O_RDONLY diff --git a/src/dispnew.c b/src/dispnew.c index 52d7f38728f..2be00c9c3b0 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -5809,9 +5809,6 @@ window_change_signal (signalnum) /* If we don't have an argument, */ int signalnum; /* some compilers complain in signal calls. */ { int width, height; -#ifndef USE_CRT_DLL - extern int errno; -#endif int old_errno = errno; struct tty_display_info *tty; diff --git a/src/ecrt0.c b/src/ecrt0.c index 7dbbd6c5ef1..40549884935 100644 --- a/src/ecrt0.c +++ b/src/ecrt0.c @@ -59,10 +59,6 @@ And always: int data_start = 0; -#ifdef NEED_ERRNO -int errno; -#endif - #ifndef MSDOS char **environ; #endif diff --git a/src/emacs.c b/src/emacs.c index 0d90776df83..400a6b0e594 100644 --- a/src/emacs.c +++ b/src/emacs.c @@ -756,9 +756,6 @@ main (int argc, char **argv) char stack_bottom_variable; int do_initial_setlocale; int skip_args = 0; -#ifndef USE_CRT_DLL - extern int errno; -#endif #ifdef HAVE_SETRLIMIT struct rlimit rlim; #endif diff --git a/src/fileio.c b/src/fileio.c index 4ae74de5c67..c62d5724eff 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -53,12 +53,6 @@ along with GNU Emacs. If not, see . */ #include #include -#ifndef vax11c -#ifndef USE_CRT_DLL -extern int errno; -#endif -#endif - #include "lisp.h" #include "intervals.h" #include "buffer.h" diff --git a/src/filelock.c b/src/filelock.c index 7c69ea954fc..b11338c58b6 100644 --- a/src/filelock.c +++ b/src/filelock.c @@ -47,9 +47,6 @@ along with GNU Emacs. If not, see . */ #endif /* __FreeBSD__ */ #include -#ifndef errno -extern int errno; -#endif #include "lisp.h" #include "buffer.h" diff --git a/src/floatfns.c b/src/floatfns.c index 97d9ec00aae..3f7030b7605 100644 --- a/src/floatfns.c +++ b/src/floatfns.c @@ -99,10 +99,6 @@ extern double logb (); #ifdef FLOAT_CHECK_ERRNO # include - -#ifndef USE_CRT_DLL -extern int errno; -#endif #endif #ifdef FLOAT_CATCH_SIGILL diff --git a/src/keyboard.c b/src/keyboard.c index 3cd042fb21e..f2aeff89542 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -79,10 +79,6 @@ along with GNU Emacs. If not, see . */ #include "nsterm.h" #endif -#ifndef USE_CRT_DLL -extern int errno; -#endif - /* Variables for blockinput.h: */ /* Non-zero if interrupt input is blocked right now. */ diff --git a/src/lread.c b/src/lread.c index 90edca90a16..83ebc8b3b10 100644 --- a/src/lread.c +++ b/src/lread.c @@ -73,10 +73,6 @@ along with GNU Emacs. If not, see . */ #define file_tell ftell #endif -#ifndef USE_CRT_DLL -extern int errno; -#endif - /* hash table read constants */ Lisp_Object Qhash_table, Qdata; Lisp_Object Qtest, Qsize; diff --git a/src/process.c b/src/process.c index 43fa78c7bd4..3c539024b0a 100644 --- a/src/process.c +++ b/src/process.c @@ -195,10 +195,6 @@ extern int serial_open (char *port); extern void serial_configure (struct Lisp_Process *p, Lisp_Object contact); #endif -#ifndef USE_CRT_DLL -extern int errno; -#endif - #ifndef HAVE_H_ERRNO extern int h_errno; #endif diff --git a/src/s/netbsd.h b/src/s/netbsd.h index 5552aece50a..682b9482352 100644 --- a/src/s/netbsd.h +++ b/src/s/netbsd.h @@ -28,8 +28,6 @@ along with GNU Emacs. If not, see . */ #define LIBS_TERMCAP -ltermcap -#define NEED_ERRNO - #define START_FILES pre-crt0.o /usr/lib/crt0.o START_FILES_1 /usr/lib/crtbegin.o #define LIB_STANDARD -lgcc -lc -lgcc /usr/lib/crtend.o END_FILES_1 #undef LIB_GCC diff --git a/src/sysdep.c b/src/sysdep.c index 71b2a0f461b..37e7dfbaf9c 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -94,12 +94,6 @@ extern int etext; extern unsigned start __asm__ ("start"); #endif -#ifndef USE_CRT_DLL -#ifndef errno -extern int errno; -#endif -#endif - #include #ifdef HAVE_FCNTL_H diff --git a/src/unexaix.c b/src/unexaix.c index 97b69d7e5c7..2657d144296 100644 --- a/src/unexaix.c +++ b/src/unexaix.c @@ -435,7 +435,6 @@ write_segment (int new, char *ptr, char *end) { int i, nwrite, ret; char buf[80]; - extern int errno; char zeros[UnexBlockSz]; for (i = 0; ptr < end;) diff --git a/src/unexec.c b/src/unexec.c index 6cb27b35c36..1a27db1232d 100644 --- a/src/unexec.c +++ b/src/unexec.c @@ -466,9 +466,6 @@ write_segment (new, ptr, end) { register int i, nwrite, ret; char buf[80]; -#ifndef USE_CRT_DLL - extern int errno; -#endif /* This is the normal amount to write at once. It is the size of block that NFS uses. */ int writesize = 1 << 13; diff --git a/src/w32term.c b/src/w32term.c index 4ed7beda233..7222e26efd2 100644 --- a/src/w32term.c +++ b/src/w32term.c @@ -228,10 +228,6 @@ static int input_signal_count; extern Lisp_Object Vcommand_line_args, Vsystem_name; -#ifndef USE_CRT_DLL -extern int errno; -#endif - /* A mask of extra modifier bits to put into every keyboard char. */ extern EMACS_INT extra_keyboard_modifiers; diff --git a/src/xrdb.c b/src/xrdb.c index c8cb55cb7b8..7808bacc59f 100644 --- a/src/xrdb.c +++ b/src/xrdb.c @@ -28,6 +28,7 @@ along with GNU Emacs. If not, see . */ #include #endif +#include #include #include @@ -734,8 +735,6 @@ fatal (msg, prog, x1, x2, x3, x4, x5) char *msg, *prog; int x1, x2, x3, x4, x5; { - extern int errno; - if (errno) perror (prog); diff --git a/src/xterm.c b/src/xterm.c index 1114fcccc53..90db15d9ed4 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -309,8 +309,6 @@ extern Lisp_Object Vx_no_window_manager; extern Lisp_Object Qeql; -extern int errno; - /* A mask of extra modifier bits to put into every keyboard char. */ extern EMACS_INT extra_keyboard_modifiers; -- 2.39.5