]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
2.3.3-76 cvs/fedora-glibc-2_3_3-76
authorJakub Jelinek <jakub@redhat.com>
Wed, 10 Nov 2004 09:38:27 +0000 (09:38 +0000)
committerJakub Jelinek <jakub@redhat.com>
Wed, 10 Nov 2004 09:38:27 +0000 (09:38 +0000)
elf/tst-dlmopen3.c
sysdeps/gnu/Makefile
sysdeps/gnu/errlist-compat.awk
sysdeps/gnu/errlist.awk
sysdeps/gnu/errlist.c

index da951ca806aada9335935805c9903d575865cdee..26c86b2dcaeaaaab90702b5534c7e2b4402b00a9 100644 (file)
@@ -1,6 +1,5 @@
 #include <dlfcn.h>
 #include <stdio.h>
-#include <gnu/lib-names.h>
 
 
 static int
index dee0c67bcf3dbbda54f3c8f86b9e77d41f7231eb..0fc33213ae9e782a8fe51ccf0db167a98578d61b 100644 (file)
@@ -49,10 +49,14 @@ endif
 # Make it unwritable so noone will edit it by mistake.
        -chmod a-w $@T
        mv -f $@T $@
-generated += errlist-compat.c
+$(objpfx)errlist-compat.h: $(objpfx)errlist-compat.c
+       sed -n '1p;/ERR_MAX/p' $< > $@T
+       -chmod a-w $@T
+       mv -f $@T $@
+generated += errlist-compat.c errlist-compat.h
 
 # This will force the generation above to happy if need be.
-$(foreach o,.d $(object-suffixes),$(objpfx)errlist$o):$(objpfx)errlist-compat.c
+$(foreach o,.d $(object-suffixes),$(objpfx)errlist$o):$(objpfx)errlist-compat.h
 endif
 
 ifeq ($(subdir),login)
index cb5798034d1cd237455144ab825366f174abdd53..db827f3f7024fe9031c7a55c71aa26e3c4ebfeec 100644 (file)
@@ -59,7 +59,7 @@ END {
 
   count = maxerr + 1;
 
-  if (highest != count) {
+  if (highest < count) {
     printf "*** errlist.c count %d vs Versions sys_errlist@%s count %d\n", \
       count, highest_version, highest > "/dev/stderr";
     exit 1;
@@ -79,6 +79,12 @@ END {
   print "/* This file was generated by errlist-compat.awk; DO NOT EDIT!  */\n";
   print "#include <shlib-compat.h>\n";
 
+  if (highest > count) {
+    printf "*** errlist.c count %d inflated to %s count %d (old errno.h?)\n", \
+      count, highest_version, highest > "/dev/stderr";
+    printf "#define ERR_MAX %d\n\n", highest;
+  }
+
   for (old in compat) {
     new = compat[old];
     n = vcount[old];
index f8f7ba53353dd2c6c9862515aa497f15a29de984..3f074ed482c9c817281e463433aad5b772c6174b 100644 (file)
@@ -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\"),"
   }
index 8131038047d5fbbb60cf0f66585dc61689b0176e..9ae6ec3c1da2881e9cf577bae0a5a67e26415c9c 100644 (file)
@@ -7,7 +7,15 @@
 # define ERR_REMAP(n) n
 #endif
 
-const char *const _sys_errlist_internal[] =
+#if !defined EMIT_ERR_MAX && !defined ERRLIST_NO_COMPAT
+# include <errlist-compat.h>
+#endif
+#ifdef ERR_MAX
+# define ERRLIST_SIZE ERR_MAX + 1
+#else
+# define ERRLIST_SIZE
+#endif
+const char *const _sys_errlist_internal[ERRLIST_SIZE] =
   {
     [0] = N_("Success"),
 #ifdef EPERM