]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* sysdeps/mach/_strerror.c (__strerror_r): Add libc_hidden_def.
authorRoland McGrath <roland@gnu.org>
Fri, 30 Aug 2002 01:31:18 +0000 (01:31 +0000)
committerRoland McGrath <roland@gnu.org>
Fri, 30 Aug 2002 01:31:18 +0000 (01:31 +0000)
* sysdeps/mach/hurd/pwrite64.c: No libc_hidden_def (__libc_pwrite64).

* sysdeps/mach/hurd/dl-sysdep.c (__GI_abort): Define alias for abort.

* include/assert.h (__assert_perror_fail): Declare it, do hidden_proto.
* assert/assert-perr.c: Add libc_hidden_def.
* elf/dl-minimal.c [! NDEBUG] (__assert_perror_fail): New function.

* sysdeps/gnu/errlist-compat.awk: Don't fail if there are no versions
found at all.
* sysdeps/gnu/Versions: File removed.  Moved all #errlist-compat
sys_errlist stuff to ...
* sysdeps/unix/sysv/linux/Versions: ... here.

* mach/mach.h: Include <features.h>.

ChangeLog
assert/assert-perr.c
elf/dl-minimal.c
include/assert.h
mach/mach.h
sysdeps/gnu/Versions [deleted file]
sysdeps/gnu/errlist-compat.awk
sysdeps/mach/_strerror.c
sysdeps/mach/hurd/dl-sysdep.c
sysdeps/mach/hurd/pwrite64.c
sysdeps/unix/sysv/linux/Versions

index d2d72db499b9502ab773ebcf6183476e12eb3a47..394789a143caa28f189c732b6eb300cc89c29a6f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,23 @@
 2002-08-29  Roland McGrath  <roland@redhat.com>
 
+       * sysdeps/mach/_strerror.c (__strerror_r): Add libc_hidden_def.
+
+       * sysdeps/mach/hurd/pwrite64.c: No libc_hidden_def (__libc_pwrite64).
+
+       * sysdeps/mach/hurd/dl-sysdep.c (__GI_abort): Define alias for abort.
+
+       * include/assert.h (__assert_perror_fail): Declare it, do hidden_proto.
+       * assert/assert-perr.c: Add libc_hidden_def.
+       * elf/dl-minimal.c [! NDEBUG] (__assert_perror_fail): New function.
+
+       * sysdeps/gnu/errlist-compat.awk: Don't fail if there are no versions
+       found at all.
+       * sysdeps/gnu/Versions: File removed.  Moved all #errlist-compat
+       sys_errlist stuff to ...
+       * sysdeps/unix/sysv/linux/Versions: ... here.
+
+       * mach/mach.h: Include <features.h>.
+
        * elf/dl-runtime.c (IN_DL_RUNTIME): Define this macro first thing.
        * sysdeps/i386/dl-machine.h: Only declare fixup, profile_fixup and
        define ELF_MACHINE_RUNTIME_TRAMPOLINE under #ifdef IN_DL_RUNTIME.
index 1144530640c7d2e7c5f4238aec26849302a2314f..3017c9fd9cc1119dc60070d107100d4720de87df 100644 (file)
@@ -83,3 +83,4 @@ __assert_perror_fail (int errnum,
 
   abort ();
 }
+libc_hidden_def (__assert_perror_fail)
index 893a3b1f2e49ac2544e29004e87c01db43e043b2..f4b7e28782f203759009d0c847bbc8d9420879f0 100644 (file)
@@ -209,6 +209,19 @@ Inconsistency detected by ld.so: %s: %u: %s%sAssertion `%s' failed!\n",
 }
 rtld_hidden_weak(__assert_fail)
 
+void weak_function
+__assert_perror_fail (int errnum,
+                     const char *file, unsigned int line,
+                     const char *function)
+{
+  char errbuf[400];
+  _dl_fatal_printf ("\
+Inconsistency detected by ld.so: %s: %u: %s%sUnexpected error: %s.\n",
+                   file, line, function ?: "", function ? ": " : "",
+                   __strerror_r (errnum, errbuf, sizeof errbuf));
+
+}
+rtld_hidden_weak (__assert_perror_fail)
 #endif
 
 unsigned long int weak_function
index 780d7ae37313a7fbcb4e606b89a60120fb4c964a..b53313de8f68cd465a1e64a3243bb648dd2fe87d 100644 (file)
@@ -7,6 +7,13 @@ extern void __assert_fail (__const char *__assertion, __const char *__file,
                           unsigned int __line, __const char *__function)
   __THROW __attribute__ ((__noreturn__));
 
+/* Likewise, but prints the error text for ERRNUM.  */
+extern void __assert_perror_fail (int __errnum, __const char *__file,
+                                 unsigned int __line,
+                                 __const char *__function)
+     __THROW __attribute__ ((__noreturn__));
+
 #if !defined NOT_IN_libc || defined IS_IN_rtld
 hidden_proto (__assert_fail)
+hidden_proto (__assert_perror_fail)
 #endif
index 819c75561bd4d034a06953790caf90e9e8eeef72..f8fd44bb00b3df90851a46a0dcf4d9ab60e987e6 100644 (file)
@@ -1,5 +1,5 @@
 /* Standard header for all Mach programs.
-   Copyright (C) 1993, 1994, 1996, 1997 Free Software Foundation, Inc.
+   Copyright (C) 1993,94,96,97,2002 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
 
 #define        _MACH_H 1
 
+/* We must include this before using __need_FILE with <stdio.h> below.  */
+#include <features.h>
+
+
 /* Get the basic types used by Mach.  */
 #include <mach/mach_types.h>
 
diff --git a/sysdeps/gnu/Versions b/sysdeps/gnu/Versions
deleted file mode 100644 (file)
index 145dd0a..0000000
+++ /dev/null
@@ -1,19 +0,0 @@
-libc {
-  # The comment lines with "#errlist-compat" are magic; see errlist-compat.awk.
-  # When you get an error from errlist-compat.awk, you need to add a new
-  # version here.  Don't do this blindly, since this means changing the ABI
-  # for all GNU/Linux configurations.
-
-  GLIBC_2.0 {
-    #errlist-compat    123
-    _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
-  }
-  GLIBC_2.1 {
-    #errlist-compat    125
-    _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
-  }
-  GLIBC_2.3 {
-    #errlist-compat    126
-    _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
-  }
-}
index c9a7a9cc44ae6b902ed43900b4dd9bfd29c46c1b..4ab9786e633f1e5c83bb827ab042a2c6f85d1182 100644 (file)
@@ -52,6 +52,11 @@ $1 == "#errlist-compat" {
 }
 
 END {
+  if (! highest_version) {
+    print "/* No sys_errlist/sys_nerr symbols defined on this platform.  */";
+    exit 0;
+  }
+
   count = maxerr + 1;
 
   if (highest != count) {
index f96ac151160a686fd91ab68127b1a44a2fecb185..a67bbb96256d06d872c8520917ba95dc987d1c0f 100644 (file)
@@ -1,5 +1,4 @@
-/* Copyright (C) 1993, 1995, 1996, 1997, 1998, 2000
-   Free Software Foundation, Inc.
+/* Copyright (C) 1993,95,96,97,98,2000,02 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
@@ -118,4 +117,5 @@ __strerror_r (int errnum, char *buf, size_t buflen)
 
   return (char *) _(es->subsystem[sub].codes[code]);
 }
+libc_hidden_def (__strerror_r)
 weak_alias (__strerror_r, strerror_r)
index 12591167a3b9656a02f2d2913ed18f2ba5e918db..e0e182c2089ebdb662ec32233ea3acbdf30e1dba 100644 (file)
@@ -602,6 +602,10 @@ abort (void)
     /* Try for ever and ever.  */
     ABORT_INSTRUCTION;
 }
+
+/* We need this alias to satisfy references from libc_pic.a objects
+   that were affected by the libc_hidden_proto declaration for abort.  */
+strong_alias (abort, __GI_abort)
 \f
 /* This function is called by interruptible RPC stubs.  For initial
    dynamic linking, just use the normal mach_msg.  Since this defn is
index ec290329774d7ef3778c605add6b9ceee8ffac7b..2637003ca8fdbd298245614ef7cd5fbb35d3a943 100644 (file)
@@ -34,7 +34,6 @@ __libc_pwrite64 (int fd, const void *buf, size_t nbytes, off64_t offset)
 }
 
 #ifndef __libc_pwrite64
-libc_hidden_def (__libc_pwrite64)
 weak_alias (__libc_pwrite64, __pwrite64)
 libc_hidden_weak (__pwrite64)
 weak_alias (__libc_pwrite64, pwrite64)
index 53cd880425e03a516808d77170132923ba02e9ff..9dd6b2a2758a571c45031723071cde0d56940479 100644 (file)
@@ -1,4 +1,9 @@
 libc {
+  # The comment lines with "#errlist-compat" are magic; see errlist-compat.awk.
+  # When you get an error from errlist-compat.awk, you need to add a new
+  # version here.  Don't do this blindly, since this means changing the ABI
+  # for all GNU/Linux configurations.
+
   GLIBC_2.0 {
     # functions used in inline functions or macros
     __cmsg_nxthdr;
@@ -50,6 +55,9 @@ libc {
 
     # u*
     umount; uselib;
+
+    #errlist-compat    123
+    _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
   }
   GLIBC_2.1 {
     # functions used in inline functions or macros
@@ -75,6 +83,9 @@ libc {
 
     # u*
     umount2;
+
+    #errlist-compat    125
+    _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
   }
   GLIBC_2.2 {
     # needed in other libraries.
@@ -90,6 +101,9 @@ libc {
   GLIBC_2.3 {
     # r*
     readahead;
+
+    #errlist-compat    126
+    _sys_errlist; sys_errlist; _sys_nerr; sys_nerr;
   }
   GLIBC_PRIVATE {
     # needed by libpthread.