diff options
author | Sergey Poznyakoff <gray@gnu.org.ua> | 2003-11-28 11:23:07 +0000 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org.ua> | 2003-11-28 11:23:07 +0000 |
commit | 99dfb315e097b21571a655461d8cd7adfb77352f (patch) | |
tree | 38da17ecf80c12861bf41eb7ff213b945933779c | |
parent | 41972568e898cd435026e4a4337f452a5402ca6b (diff) | |
download | cpio-99dfb315e097b21571a655461d8cd7adfb77352f.tar.gz cpio-99dfb315e097b21571a655461d8cd7adfb77352f.tar.bz2 |
Fixed handling of undeclared errno
-rw-r--r-- | mkdir.c | 3 | ||||
-rw-r--r-- | mt.c | 14 | ||||
-rw-r--r-- | rtapelib.c | 2 | ||||
-rw-r--r-- | util.c | 1 |
4 files changed, 14 insertions, 6 deletions
@@ -22,7 +22,8 @@ #include <sys/types.h> #include <sys/stat.h> #include <errno.h> -#ifndef errno + +#if !HAVE_DECL_ERRNO extern int errno; #endif @@ -83,12 +83,20 @@ #include <strings.h> #endif -#if defined(STDC_HEADERS) -#include <stdlib.h> -#else +#if defined(HAVE_STDLIB_H) +# include <stdlib.h> +#endif + +#if !HAVE_DECL_ERRNO extern int errno; +#endif +#if !HAVE_DECL_GETENV char *getenv (); +#endif +#if !HAVE_DECL_ATOI int atoi (); +#endif +#if !HAVE_DECL_EXIT void exit (); #endif @@ -52,7 +52,7 @@ #include <setjmp.h> #include <sys/stat.h> -#ifndef errno +#if! HAVE_DECL_ERRNO extern int errno; #endif @@ -1051,7 +1051,6 @@ chown (path, owner, group) int utime (char *filename, struct utimbuf *utb) { - extern int errno; struct tm *tm; struct ftime filetime; time_t when; |