diff options
author | Paul Ackersviller <packersv@users.sourceforge.net> | 2007-12-09 02:03:36 +0000 |
---|---|---|
committer | Paul Ackersviller <packersv@users.sourceforge.net> | 2007-12-09 02:03:36 +0000 |
commit | 41192750102fdf250a614ab834b34ba77b668b3d (patch) | |
tree | 26ce2fad4ab57e6058a127f57c37cdca14c17a80 /Src/utils.c | |
parent | 5a603537e2130ff5f358c43221c82d272c3bee1d (diff) | |
download | zsh-41192750102fdf250a614ab834b34ba77b668b3d.tar.gz zsh-41192750102fdf250a614ab834b34ba77b668b3d.tar.xz zsh-41192750102fdf250a614ab834b34ba77b668b3d.zip |
Do 24180 on 4.2 branch: reverted (most of) 24148.
Diffstat (limited to 'Src/utils.c')
-rw-r--r-- | Src/utils.c | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/Src/utils.c b/Src/utils.c index a71eddf16..2bc48b6bd 100644 --- a/Src/utils.c +++ b/Src/utils.c @@ -173,34 +173,7 @@ zerrmsg(const char *fmt, const char *str, int num) errflag = 1; return; } -#ifdef HAVE_STRERROR_R - /* - * There are two incompatible strerror_r()s floating round. - * The GNU extension refuses to copy the message into the - * buffer if it can return a constant string. To suppress it - * we need to define _XOPEN_SOURCE to 600. I don't dare do - * this because we're already depending on _GNU_SOURCE. So - * try to handle both by looking for errno being set (for the - * standard version failing) or errbuf being left untouched - * (for the GNU version). One presumes that if strerror_r() - * didn't copy anything to errbuf, then it's safe to - * call strerror() to get the string. - * - * This is a mess, but it's about a decade and half - * too late to shirk from messes in the source. - */ - olderrno = errno; - errno = 0; - errbuf[0] = '\0'; - strerror_r(num, errbuf, ERRBUFSIZE); - if (errno || errbuf[0] == '\0') - errmsg = strerror(num); - else - errmsg = errbuf; - errno = olderrno; -#else errmsg = strerror(num); -#endif /* If the message is not about I/O problems, it looks better * * if we uncapitalize the first letter of the message */ if (num == EIO) |