diff options
author | Robert de Bath <rdebath@poboxes.com> | 2004-01-24 16:27:32 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2013-10-23 23:48:49 +0200 |
commit | beba34dc223aa0dcf3e5f696966c5e8408b022c3 (patch) | |
tree | ea0523ac242bd3e877338e9a771b975d4cd3839a /ar | |
parent | b5dac1e3bdd01a2ce105df747a9073ff0d6a94e2 (diff) | |
download | dev86-beba34dc223aa0dcf3e5f696966c5e8408b022c3.tar.gz |
Import Dev86src-0.16.15.tar.gzv0.16.15
Diffstat (limited to 'ar')
-rw-r--r-- | ar/ar.c | 23 |
1 files changed, 2 insertions, 21 deletions
@@ -37,8 +37,6 @@ #define HAVE_RENAME #undef HAVE_FSYNC #define SHORT_FILENAME -extern char **sys_errlist; -extern int sys_nerr; #else #define HAVE_FCHMOD #define HAVE_RENAME @@ -46,8 +44,6 @@ extern int sys_nerr; #endif #define HAVE_TRAILING_SLASH_IN_NAME -extern int errno; - #ifdef __GNUC__ # ifndef alloca # define alloca __builtin_alloca @@ -66,9 +62,6 @@ extern int errno; /* Locking is normally disabled because fcntl hangs on the Sun and it isn't supported properly across NFS anyway. */ -#ifdef LOCKS -#include <errno.h> -#endif /* This structure is used internally to represent the info on a member of an archive. This is to make it easier to change format. */ @@ -2055,26 +2048,14 @@ void perror_with_name (name) char *name; { - char *s; - - if (errno < sys_nerr) - s = concat ("", sys_errlist[errno], " for %s"); - else - s = "unknown error for %s"; - error (s, name); + error (concat ("", strerror(errno), " for %s"), name); } void pfatal_with_name (name) char *name; { - char *s; - - if (errno < sys_nerr) - s = concat ("", sys_errlist[errno], " for %s"); - else - s = "cannot open %s"; - fatal (s, name); + fatal (concat ("", strerror(errno), " for %s"), name); } /* Return a newly-allocated string whose contents |