From 28160ffb1c1b768e0fca4ccdb2843252100b5b81 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sun, 7 Jul 1996 23:55:24 +0000 Subject: * 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. --- sysdeps/gnu/errlist.awk | 7 +++++-- sysdeps/gnu/errlist.c | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'sysdeps/gnu') diff --git a/sysdeps/gnu/errlist.awk b/sysdeps/gnu/errlist.awk index d14348f0b9..e6ca81a4ad 100644 --- a/sysdeps/gnu/errlist.awk +++ b/sysdeps/gnu/errlist.awk @@ -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 "; @@ -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; diff --git a/sysdeps/gnu/errlist.c b/sysdeps/gnu/errlist.c index 59e7f52b97..fa56553712 100644 --- a/sysdeps/gnu/errlist.c +++ b/sysdeps/gnu/errlist.c @@ -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 -- cgit v1.2.3