summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan Nicolaescu <dann@ics.uci.edu>2010-04-01 20:10:33 -0700
committerDan Nicolaescu <dann@ics.uci.edu>2010-04-01 20:10:33 -0700
commit42a2c62292ca811bbca455ef738fcde861644d53 (patch)
tree047edcf83a31d6a0c29297a5ecb3ccfccafebe97 /src
parent8224f93d18d7470f54d5894cb74da0168bddee44 (diff)
downloademacs-42a2c62292ca811bbca455ef738fcde861644d53.tar.gz
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.
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog22
-rw-r--r--src/buffer.c6
-rw-r--r--src/callproc.c5
-rw-r--r--src/dispnew.c3
-rw-r--r--src/ecrt0.c4
-rw-r--r--src/emacs.c3
-rw-r--r--src/fileio.c6
-rw-r--r--src/filelock.c3
-rw-r--r--src/floatfns.c4
-rw-r--r--src/keyboard.c4
-rw-r--r--src/lread.c4
-rw-r--r--src/process.c4
-rw-r--r--src/s/netbsd.h2
-rw-r--r--src/sysdep.c6
-rw-r--r--src/unexaix.c1
-rw-r--r--src/unexec.c3
-rw-r--r--src/w32term.c4
-rw-r--r--src/xrdb.c3
-rw-r--r--src/xterm.c2
19 files changed, 23 insertions, 66 deletions
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 <dann@ics.uci.edu>
+
+ 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 <dann@ics.uci.edu>
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 <http://www.gnu.org/licenses/>. */
#include <stdio.h>
#include <setjmp.h>
-#ifndef USE_CRT_DLL
-extern int errno;
-#endif
-
-
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
@@ -4627,7 +4622,6 @@ buffer_slot_type_mismatch (newval, type)
#endif
#include <stdio.h>
-#include <errno.h>
#if MAP_ANON == 0
#include <fcntl.h>
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 <http://www.gnu.org/licenses/>. */
#include <stdio.h>
#include <setjmp.h>
-#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 <fcntl.h>
#include <sys/stat.h>
#include <sys/param.h>
-#include <errno.h>
#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 <http://www.gnu.org/licenses/>. */
#include <ctype.h>
#include <errno.h>
-#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 <http://www.gnu.org/licenses/>. */
#endif /* __FreeBSD__ */
#include <errno.h>
-#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 <errno.h>
-
-#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 <http://www.gnu.org/licenses/>. */
#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 <http://www.gnu.org/licenses/>. */
#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 <http://www.gnu.org/licenses/>. */
#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 <sys/file.h>
#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 <http://www.gnu.org/licenses/>. */
#include <unistd.h>
#endif
+#include <errno.h>
#include <epaths.h>
#include <stdio.h>
@@ -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;