From: Peter Stephenson <pws@hydra.ifh.de>
To: zsh-list@sterling.com
Subject: Re: zsh 2.5.03 suggestion
Date: Mon, 04 Dec 1995 15:31:24 +0100 [thread overview]
Message-ID: <9512041431.AA09898@hydra.ifh.de> (raw)
In-Reply-To: "torek@sparc.bsdi.com"'s message of "Sun, 03 Dec 1995 15:21:33 MET." <199512032221.PAA03759@sparc.BSDI.COM>
> We have been trying to change sys_errlist from `const char *const[]'
> back to `char *[]', or, better yet, get people to stop using it
> entirely. Towards the latter, it would be nice if zsh's utils.c
> would use strerror() rather than sys_errlist, with a `backup'
> implementation that uses sys_errlist[argument] for systems that
> lack strerror (perhaps even providing this backup in the form of
> a strerror() implementation).
Well, here's the simplest possibility (which requires re-running
autoconf).
I don't quite understand what's going on if HAVE_SYS_ERRLIST isn't
defined. It's behaving as if there's one being supplied, but I don't
know where it's coming from.
*** Src/signals.h.se Mon Dec 4 13:42:37 1995
--- Src/signals.h Mon Dec 4 13:49:57 1995
***************
*** 31,37 ****
#include "signames.h"
! #ifndef HAVE_SYS_ERRLIST
extern char *sys_errlist[];
#endif
--- 31,37 ----
#include "signames.h"
! #if !defined(HAVE_SYS_ERRLIST) && !defined(HAVE_STRERROR)
extern char *sys_errlist[];
#endif
*** Src/utils.c.se Mon Dec 4 13:42:43 1995
--- Src/utils.c Mon Dec 4 14:00:23 1995
***************
*** 97,108 ****
--- 97,118 ----
errflag = 1;
return;
}
+ #ifdef HAVE_STRERROR
if (num == EIO)
+ fputs(strerror(num), stderr);
+ else {
+ char *errmsg = strerror(num);
+ fputc(tulower(errmsg[0]), stderr);
+ fputs(errmsg + 1, stderr);
+ }
+ #else
+ if (num == EIO)
fputs(sys_errlist[num], stderr);
else {
fputc(tulower(sys_errlist[num][0]), stderr);
fputs(sys_errlist[num] + 1, stderr);
}
+ #endif
break;
}
} else
*** config.h.in.se Tue Nov 21 06:38:48 1995
--- config.h.in Mon Dec 4 14:06:09 1995
***************
*** 248,253 ****
--- 248,256 ----
/* Define if you have the sigsetmask function. */
#undef HAVE_SIGSETMASK
+ /* Define if you have the strerror function. */
+ #undef HAVE_STRERROR
+
/* Define if you have the strftime function. */
#undef HAVE_STRFTIME
*** configure.in.se Mon Dec 4 13:52:35 1995
--- configure.in Mon Dec 4 13:54:10 1995
***************
*** 309,315 ****
AC_CHECK_FUNCS(strftime waitpid select tcsetpgrp tcgetattr strstr lstat \
getlogin setpgid gettimeofday gethostname mkfifo wait3 difftime \
sigblock sigsetmask sigrelse sighold killpg sigaction getrlimit \
! sigprocmask setuid seteuid setreuid setresuid)
dnl -------------
dnl CHECK SIGNALS
--- 309,315 ----
AC_CHECK_FUNCS(strftime waitpid select tcsetpgrp tcgetattr strstr lstat \
getlogin setpgid gettimeofday gethostname mkfifo wait3 difftime \
sigblock sigsetmask sigrelse sighold killpg sigaction getrlimit \
! sigprocmask setuid seteuid setreuid setresuid strerror)
dnl -------------
dnl CHECK SIGNALS
--
Peter Stephenson <pws@ifh.de> Tel: +49 33762 77366
WWW: http://www.ifh.de/~pws/ Fax: +49 33762 77330
Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.
prev parent reply other threads:[~1995-12-04 15:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
1995-12-03 22:21 Chris Torek
1995-01-29 13:21 ` Strange behaviour of the prompt Soter Mule'
1995-12-04 14:31 ` Peter Stephenson [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9512041431.AA09898@hydra.ifh.de \
--to=pws@hydra.ifh.de \
--cc=zsh-list@sterling.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).