From 43d5792ce14b9aadeb177755d94f8075c8d5ca1f Mon Sep 17 00:00:00 2001 From: Daniel Jacobowitz Date: Sun, 29 Jun 2003 04:01:39 +0000 Subject: * configure.in: Check whether we need to prototype strerror. * server.h: Optionally prototype strerror. * gdbreplay.c (perror_with_name): Use strerror. * linux-low.c (linux_attach_lwp): Use strerror. * utils.c (perror_with_name): Use strerror. * config.in, configure: Regenerated. --- gdb/gdbserver/utils.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'gdb/gdbserver/utils.c') diff --git a/gdb/gdbserver/utils.c b/gdb/gdbserver/utils.c index e13eda8..20244d6 100644 --- a/gdb/gdbserver/utils.c +++ b/gdb/gdbserver/utils.c @@ -33,16 +33,13 @@ void perror_with_name (char *string) { #ifndef STDC_HEADERS - extern int sys_nerr; - extern char *sys_errlist[]; extern int errno; #endif const char *err; char *combined; - if (errno < sys_nerr) - err = sys_errlist[errno]; - else + err = strerror (errno); + if (err == NULL) err = "unknown error"; combined = (char *) alloca (strlen (err) + strlen (string) + 3); -- cgit v1.1