* sysdeps/gnu/errlist.awk (BEGIN): Initialize associative array ALIAS,

map EWOULDBLOCK->EAGAIN, EDEADLOCK->EDEADLK.
	(element printer): Check for elt in ALIAS, instead of special case
	for EWOULDBLOCK.
This commit is contained in:
Roland McGrath 1996-07-07 23:55:24 +00:00
parent faf85e08bc
commit 28160ffb1c
3 changed files with 11 additions and 3 deletions

View File

@ -1,5 +1,10 @@
Sun Jul 7 18:42:06 1996 Roland McGrath <roland@delasyd.gnu.ai.mit.edu>
* sysdeps/gnu/errlist.awk (BEGIN): Initialize associative array ALIAS,
map EWOULDBLOCK->EAGAIN, EDEADLOCK->EDEADLK.
(element printer): Check for elt in ALIAS, instead of special case
for EWOULDBLOCK.
* io/Makefile (headers): Add sys/vfs.h.
* io/sys/vfs.h: New file.

View File

@ -23,6 +23,9 @@
# @comment errno 78
BEGIN {
alias["EWOULDBLOCK"] = "EAGAIN";
alias["EDEADLOCK"] = "EDEADLK";
print "/* This file is generated from errno.texi by errlist.awk. */"
print "";
print "#include <errno.h>";
@ -47,8 +50,8 @@ errnoh == 2 && $1 == "@deftypevr" && $2 == "Macro" && $3 == "int" \
errnoh == 3 && $1 == "@comment" && $2 == "errno" \
{
errno = $3 + 0;
if (e == "EWOULDBLOCK")
print "#if defined (EWOULDBLOCK) && EWOULDBLOCK != EAGAIN";
if (alias[e])
printf "#if defined (%s) && %s != %s\n", e, e, alias[e];
else
printf "#ifdef %s\n", e;
printf " [%s] = N_(\"%s\"),\n", e, etext;

View File

@ -323,7 +323,7 @@ const char *_sys_errlist[] =
#ifdef EBADSLT
[EBADSLT] = N_("Invalid slot"),
#endif
#ifdef EDEADLOCK
#if defined (EDEADLOCK) && EDEADLOCK != EDEADLK
[EDEADLOCK] = N_("File locking deadlock error"),
#endif
#ifdef EBFONT