summaryrefslogtreecommitdiff
path: root/sysdeps/gnu/errlist.awk
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-08-27 09:22:36 +0000
committerRoland McGrath <roland@gnu.org>2002-08-27 09:22:36 +0000
commit4022d8ed0374121e9f08aaaf657276de0e7642ed (patch)
tree076faaa602528376dd04e4cac67ca3edae4e8fb9 /sysdeps/gnu/errlist.awk
parentb2ab1f5df8dac098eea5058f02f4d03c4143d5a2 (diff)
downloadglibc-4022d8ed0374121e9f08aaaf657276de0e7642ed.tar.gz
2002-08-26 Roland McGrath <roland@redhat.com>
* sysdeps/gnu/Versions: New file. * sysdeps/unix/sysv/linux/Versions (libc: GLIBC_2.1): Remove _sys_errlist; sys_errlist; _sys_nerr; sys_nerr; from here. * sysdeps/gnu/Makefile ($(..)sysdeps/gnu/errlist-compat.c): New target. ($(objpfx)errlist.d): Depend on $(..)sysdeps/gnu/errlist-compat.c. * sysdeps/gnu/errlist.awk: Make output define _sys_errlist_internal and _sys_nerr_internal instead of anything else. Make it include "errlist-compat.c" if [!NOT_IN_libc && !ERRLIST_NO_COMPAT]. Make it emit some asm magic if [EMIT_ERR_MAX]. * sysdeps/gnu/errlist.c: Regenerated. * sysdeps/gnu/errlist-compat.awk: New file. * sysdeps/gnu/errlist-compat.c: New file (generated). * sysdeps/mach/hurd/errlist.c (ERRLIST_NO_COMPAT): New macro. (_sys_errlist_internal): Define this as a macro for _hurd_errlist. (_sys_nerr_internal): Define this is a macro for _hurd_nerr. (SYS_ERRLIST, SYS_NERR): Macros removed. (sys_nerr, _sys_nerr): Remove these weak aliases. * sysdeps/unix/sysv/linux/errlist.c: File removed. * sysdeps/unix/sysv/linux/errlist.h: File removed. * sysdeps/unix/sysv/linux/arm/errlist.c: File removed.
Diffstat (limited to 'sysdeps/gnu/errlist.awk')
-rw-r--r--sysdeps/gnu/errlist.awk34
1 files changed, 17 insertions, 17 deletions
diff --git a/sysdeps/gnu/errlist.awk b/sysdeps/gnu/errlist.awk
index 317dc44930..b9b1291a59 100644
--- a/sysdeps/gnu/errlist.awk
+++ b/sysdeps/gnu/errlist.awk
@@ -42,22 +42,16 @@ BEGIN {
print "#include <errno.h>";
print "#include <libintl.h>";
print "";
- print "#ifndef SYS_ERRLIST";
- print "# define SYS_ERRLIST _sys_errlist";
- print "# define SYS_ERRLIST_ALIAS sys_errlist";
- print "#endif";
- print "#ifndef SYS_NERR";
- print "# define SYS_NERR _sys_nerr";
- print "# define SYS_NERR_ALIAS sys_nerr";
- print "#endif";
print "#ifndef ERR_REMAP";
print "# define ERR_REMAP(n) n";
print "#endif";
print "";
- print "const char *const SYS_ERRLIST[] =";
+
+ print "const char *const _sys_errlist_internal[] =";
print " {";
print " [0] = N_(\"Success\"),"
}
+
$1 == "@comment" && $2 == "errno.h" { errnoh=1; next }
errnoh == 1 && $1 == "@comment" \
{
@@ -86,6 +80,10 @@ errnoh == 4 && $1 == "@end" && $2 == "deftypevr" \
{
printf "/*%s */\n", desc;
printf " [ERR_REMAP (%s)] = N_(\"%s\"),\n", e, etext;
+ printf "# if %s > ERR_MAX\n", e;
+ print "# undef ERR_MAX";
+ printf "# define ERR_MAX %s\n", e;
+ print "# endif";
print "#endif";
errnoh = 0;
next;
@@ -99,13 +97,15 @@ errnoh == 4 \
END {
print " };";
print "";
- print "const int SYS_NERR = sizeof SYS_ERRLIST / sizeof SYS_ERRLIST [0];";
- print "#ifdef SYS_ERRLIST_ALIAS";
- print "weak_alias (_sys_errlist, SYS_ERRLIST_ALIAS)";
+ print "const int _sys_nerr_internal";
+ print " = sizeof _sys_errlist_internal / sizeof _sys_errlist_internal [0];";
+ print "";
+ print "#if !defined NOT_IN_libc && !ERRLIST_NO_COMPAT";
+ print "# include \"errlist-compat.c\"";
print "#endif";
- print "#ifdef SYS_NERR_ALIAS";
- print "weak_alias (_sys_nerr, SYS_NERR_ALIAS)";
+ print "";
+ print "#ifdef EMIT_ERR_MAX";
+ print "void dummy (void)"
+ print "{ asm volatile (\" @@@ %0 @@@ \" : : \"i\" (ERR_REMAP (ERR_MAX))); }"
print "#endif";
- print "INTVARDEF2(SYS_ERRLIST, _sys_errlist)";
- print "INTVARDEF2(SYS_NERR, _sys_nerr)";
- }
+}