summaryrefslogtreecommitdiff
path: root/sysdeps/gnu/errlist.awk
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/gnu/errlist.awk')
-rw-r--r--sysdeps/gnu/errlist.awk11
1 files changed, 10 insertions, 1 deletions
diff --git a/sysdeps/gnu/errlist.awk b/sysdeps/gnu/errlist.awk
index f8f7ba5335..3f074ed482 100644
--- a/sysdeps/gnu/errlist.awk
+++ b/sysdeps/gnu/errlist.awk
@@ -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\"),"
}