summaryrefslogtreecommitdiff
path: root/ar
diff options
context:
space:
mode:
authorRobert de Bath <rdebath@poboxes.com>2004-01-24 16:27:32 +0100
committerLubomir Rintel <lkundrak@v3.sk>2013-10-23 23:48:49 +0200
commitbeba34dc223aa0dcf3e5f696966c5e8408b022c3 (patch)
treeea0523ac242bd3e877338e9a771b975d4cd3839a /ar
parentb5dac1e3bdd01a2ce105df747a9073ff0d6a94e2 (diff)
downloaddev86-beba34dc223aa0dcf3e5f696966c5e8408b022c3.tar.gz
Import Dev86src-0.16.15.tar.gzv0.16.15
Diffstat (limited to 'ar')
-rw-r--r--ar/ar.c23
1 files changed, 2 insertions, 21 deletions
diff --git a/ar/ar.c b/ar/ar.c
index b0694ac..8443fd9 100644
--- a/ar/ar.c
+++ b/ar/ar.c
@@ -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