(errno): Remove decl; we now assume C89 or better.
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 2 Aug 2004 22:41:37 +0000 (22:41 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 2 Aug 2004 22:41:37 +0000 (22:41 +0000)
21 files changed:
lib/canonicalize.c
lib/chown.c
lib/closeout.c
lib/dup-safer.c
lib/dup2.c
lib/exclude.c
lib/fopen-safer.c
lib/ftruncate.c
lib/full-write.c
lib/getcwd.c
lib/lchown.c
lib/memcoll.c
lib/putenv.c
lib/rmdir.c
lib/savedir.c
lib/setenv.c
lib/stat.c
lib/utime.c
lib/xgetcwd.c
lib/xmemcoll.c
lib/xreadlink.c

index 02bea7c..6d1bfbc 100644 (file)
@@ -50,10 +50,6 @@ void free ();
 #include "xalloc.h"
 #include "xgetcwd.h"
 
-#ifndef errno
-extern int errno;
-#endif
-
 #ifndef __set_errno
 # define __set_errno(Val) errno = (Val)
 #endif
@@ -89,7 +85,7 @@ extern int errno;
 char *
 canonicalize_file_name (const char *name)
 {
-#if HAVE_RESOLVEPATH
+# if HAVE_RESOLVEPATH
 
   char *resolved, *extra_buf = NULL;
   size_t resolved_size;
@@ -146,11 +142,11 @@ canonicalize_file_name (const char *name)
 
   return resolved;
 
-#else
+# else
 
   return canonicalize_filename_mode (name, CAN_EXISTING);
 
-#endif /* !HAVE_RESOLVEPATH */
+# endif /* !HAVE_RESOLVEPATH */
 }
 #endif /* !HAVE_CANONICALIZE_FILE_NAME */
 
index 460e4f6..d761c73 100644 (file)
@@ -36,9 +36,6 @@
 # include <sys/file.h>
 #endif
 #include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
 
 /* Provide a more-closely POSIX-conforming version of chown on
    systems with one or both of the following problems:
index a551d1a..1b0b50c 100644 (file)
 #include "closeout.h"
 
 #include <stdio.h>
-
 #include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
 
 #include "gettext.h"
 #define _(msgid) gettext (msgid)
index f72fd84..4a82038 100644 (file)
@@ -22,9 +22,6 @@
 #endif
 
 #include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
 
 #if HAVE_FCNTL_H
 # include <fcntl.h>
index 32afed5..58d4ad2 100644 (file)
@@ -22,9 +22,6 @@
 #endif
 
 #include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
 
 #if HAVE_FCNTL_H
 # include <fcntl.h>
index 55f1a39..bfc5a16 100644 (file)
@@ -28,9 +28,6 @@
 
 #include <ctype.h>
 #include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
 #include <stddef.h>
 #include <stdio.h>
 #include <stdlib.h>
index 6825f9b..ee41efa 100644 (file)
 #endif
 
 #include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
-
 #include <stdio.h>
 #include <stdio-safer.h>
 
index adf87f6..c062fe8 100644 (file)
@@ -79,9 +79,6 @@ ftruncate (int fd, off_t length)
 #  else /* not F_CHSIZE nor F_FREESP nor HAVE_CHSIZE */
 
 #   include <errno.h>
-#   ifndef errno
-extern int errno;
-#   endif
 
 int
 ftruncate (int fd, off_t length)
index 1513705..0e15f79 100644 (file)
@@ -28,9 +28,6 @@
 #endif
 
 #include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
 
 #ifdef FULL_READ
 # include "safe-read.h"
index 2968a6e..e502078 100644 (file)
 
 #include <stdlib.h>
 #include <string.h>
-
 #include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
-
 #include <sys/types.h>
 
 #include "pathmax.h"
index ec754ea..b04fb36 100644 (file)
@@ -22,9 +22,7 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
+
 #include "lchown.h"
 #include "stat-macros.h"
 
index 34ae767..72ae17f 100644 (file)
 #include "memcoll.h"
 
 #include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
-
 #include <string.h>
 
 /* Compare S1 (with length S1LEN) and S2 (with length S2LEN) according
index 87c5522..2d19404 100644 (file)
 /* Include errno.h *after* sys/types.h to work around header problems
    on AIX 3.2.5.  */
 #include <errno.h>
-#if !_LIBC
-# if !defined errno
-extern int errno;
-# endif
+#ifndef __set_errno
 # define __set_errno(ev) ((errno) = (ev))
 #endif
 
index 55fee53..ddb5c30 100644 (file)
 
 #include <sys/types.h>
 #include <sys/stat.h>
-
 #include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
 
 #include "stat-macros.h"
 
index 01499a9..c92e62e 100644 (file)
@@ -28,9 +28,6 @@
 #include <sys/types.h>
 
 #include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
 
 #if HAVE_DIRENT_H
 # include <dirent.h>
index c3f9dc4..ae4174a 100644 (file)
 #include <alloca.h>
 
 #include <errno.h>
-#if !_LIBC
-# if !defined errno && !defined HAVE_ERRNO_DECL
-extern int errno;
-# endif
+#ifndef __set_errno
 # define __set_errno(ev) ((errno) = (ev))
 #endif
 
index 2088db3..df0be3a 100644 (file)
@@ -27,9 +27,6 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
 #if defined LSTAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK
 # include <stdlib.h>
 # include <string.h>
index 7b87a96..3cac548 100644 (file)
@@ -34,9 +34,6 @@
 
 #include <unistd.h>
 #include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
 
 #include "full-write.h"
 #include "safe-read.h"
index 2089b88..5147f51 100644 (file)
 
 #include <stdio.h>
 #include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
-
 #include <sys/types.h>
 #include <stdlib.h>
 
index 0e30aef..89d6fa8 100644 (file)
 #endif
 
 #include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
-
 #include <stdlib.h>
 
 #include "gettext.h"
index 41f5242..2e66c07 100644 (file)
 
 #include <stdio.h>
 #include <errno.h>
-#ifndef errno
-extern int errno;
-#endif
-
 #include <limits.h>
 #include <sys/types.h>
 #include <stdlib.h>