diff options
author | Roland McGrath <roland@gnu.org> | 2004-10-20 10:04:57 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 2004-10-20 10:04:57 +0000 |
commit | 4b359a27dd5c9d76e507db782a8e907e20c1df95 (patch) | |
tree | 4f3828f0c7b8c93b35716f90f88b0b326180f323 /sysdeps/gnu/errlist.awk | |
parent | 13772215fc3cfd7b15674698e276cd18d44f1c1f (diff) | |
download | glibc-4b359a27dd5c9d76e507db782a8e907e20c1df95.tar.gz glibc-4b359a27dd5c9d76e507db782a8e907e20c1df95.tar.xz glibc-4b359a27dd5c9d76e507db782a8e907e20c1df95.zip |
2004-10-20 Roland McGrath <roland@redhat.com>
* sysdeps/gnu/errlist-compat.awk: Don't bail if Versions gives a count higher than ERR_MAX reports. Instead, emit a #define ERR_MAX. * sysdeps/gnu/Makefile ($(objpfx)errlist-compat.h): New target. (generated): Add errlist-compat.h. * sysdeps/gnu/errlist.awk: Make output #include <errlist-compat.h> to define ERR_MAX and use that for table size.
Diffstat (limited to 'sysdeps/gnu/errlist.awk')
-rw-r--r-- | sysdeps/gnu/errlist.awk | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/sysdeps/gnu/errlist.awk b/sysdeps/gnu/errlist.awk index 952cb8073c..3f074ed482 100644 --- a/sysdeps/gnu/errlist.awk +++ b/sysdeps/gnu/errlist.awk @@ -1,4 +1,4 @@ -# Copyright (C) 1991-1999, 2002 Free Software Foundation, Inc. +# Copyright (C) 1991-1999,2002,2004 Free Software Foundation, Inc. # This file is part of the GNU C Library. # The GNU C Library is free software; you can redistribute it and/or @@ -47,7 +47,16 @@ BEGIN { print "#endif"; print ""; - print "const char *const _sys_errlist_internal[] ="; + print "#if !defined EMIT_ERR_MAX && !defined ERRLIST_NO_COMPAT"; + print "# include <errlist-compat.h>"; + print "#endif"; + print "#ifdef ERR_MAX"; + print "# define ERRLIST_SIZE ERR_MAX + 1"; + print "#else" + print "# define ERRLIST_SIZE"; + print "#endif"; + + print "const char *const _sys_errlist_internal[ERRLIST_SIZE] ="; print " {"; print " [0] = N_(\"Success\")," } |