diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2012-07-10 22:44:06 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2012-07-10 22:44:06 -0700 |
commit | 5ebbef1dc0d12fa5402c97e8aa8c0c85553b87ee (patch) | |
tree | 90d30a96a919a0631a6b2c86a3a8ca6bb6f82210 /lib-src | |
parent | 9af577566add17398ee3b778ac9934bc391eecf7 (diff) | |
download | emacs-5ebbef1dc0d12fa5402c97e8aa8c0c85553b87ee.tar.gz |
Assume strerror.
Diffstat (limited to 'lib-src')
-rw-r--r-- | lib-src/ChangeLog | 6 | ||||
-rw-r--r-- | lib-src/emacsclient.c | 21 | ||||
-rw-r--r-- | lib-src/movemail.c | 22 | ||||
-rw-r--r-- | lib-src/update-game-score.c | 16 |
4 files changed, 6 insertions, 59 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 0c517b0d571..ce4afdfec1e 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,9 @@ +2012-07-11 Paul Eggert <eggert@cs.ucla.edu> + + Assume strerror. + * emacsclient.c, movemail.c, update-game-score.c (strerror) + [!HAVE_STRERROR]: Remove. + 2012-07-10 Paul Eggert <eggert@cs.ucla.edu> EMACS_TIME simplification (Bug#11875). diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c index 5487c147079..0ba6535b79d 100644 --- a/lib-src/emacsclient.c +++ b/lib-src/emacsclient.c @@ -749,8 +749,6 @@ main (int argc, char **argv) #define AUTH_KEY_LENGTH 64 #define SEND_BUFFER_SIZE 4096 -extern char *strerror (int); - /* Buffer to accumulate data to send in TCP connections. */ char send_buffer[SEND_BUFFER_SIZE + 1]; int sblen = 0; /* Fill pointer for the send buffer. */ @@ -1850,22 +1848,3 @@ main (int argc, char **argv) } #endif /* HAVE_SOCKETS && HAVE_INET_SOCKETS */ - - -#ifndef HAVE_STRERROR -char * -strerror (errnum) - int errnum; -{ - extern char *sys_errlist[]; - extern int sys_nerr; - - if (errnum >= 0 && errnum < sys_nerr) - return sys_errlist[errnum]; - return (char *) "Unknown error"; -} - -#endif /* ! HAVE_STRERROR */ - - -/* emacsclient.c ends here */ diff --git a/lib-src/movemail.c b/lib-src/movemail.c index b9a1be8a7f1..aa5fd989a6d 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -133,10 +133,6 @@ static char *mail_spool_name (char *); #endif #endif -#ifndef HAVE_STRERROR -char *strerror (int); -#endif - static _Noreturn void fatal (const char *s1, const char *s2, const char *s3); static void error (const char *s1, const char *s2, const char *s3); static _Noreturn void pfatal_with_name (char *name); @@ -920,21 +916,3 @@ mbx_delimit_end (FILE *mbf) } #endif /* MAIL_USE_POP */ - -#ifndef HAVE_STRERROR -char * -strerror (errnum) - int errnum; -{ - extern char *sys_errlist[]; - extern int sys_nerr; - - if (errnum >= 0 && errnum < sys_nerr) - return sys_errlist[errnum]; - return (char *) "Unknown error"; -} - -#endif /* ! HAVE_STRERROR */ - - -/* movemail.c ends here */ diff --git a/lib-src/update-game-score.c b/lib-src/update-game-score.c index 94de662e589..40397536fad 100644 --- a/lib-src/update-game-score.c +++ b/lib-src/update-game-score.c @@ -94,22 +94,6 @@ lose (const char *msg) exit (EXIT_FAILURE); } -/* Taken from sysdep.c. */ -#ifndef HAVE_STRERROR -#ifndef WINDOWSNT -char * -strerror (int errnum) -{ - extern char *sys_errlist[]; - extern int sys_nerr; - - if (errnum >= 0 && errnum < sys_nerr) - return sys_errlist[errnum]; - return (char *) "Unknown error"; -} -#endif /* not WINDOWSNT */ -#endif /* ! HAVE_STRERROR */ - static _Noreturn void lose_syserr (const char *msg) { |