PATCH: Fix binary compatibility loss regarding errno

Daniel Jacobowitz drow@mvista.com
Mon Dec 30 10:55:00 GMT 2002


On Mon, Dec 30, 2002 at 10:51:11AM -0800, H. J. Lu wrote:
> Here is a patch for errno. I don't know if there are any other similar
> issuses.

At least h_errno needs the same treatment.

> 
> 
> H.J.
> ----
> 2002-12-30  H.J. Lu  <hjl@gnu.org>
> 
> 	* sysdeps/generic/errno.c (errno): Fix GLIBC_2_0 version.
> 	(_errno): Likewise.
> 
> --- sysdeps/generic/errno.c.errno	Fri Nov 22 10:22:46 2002
> +++ sysdeps/generic/errno.c	Mon Dec 30 10:46:57 2002
> @@ -29,14 +29,14 @@ extern __thread int __libc_errno __attri
>  /* This differs from plain `int errno;' in that it doesn't create
>     a common definition, but a plain symbol that resides in .bss,
>     which can have an alias.  */
> -int errno __attribute__ ((section (".bss")));
> -strong_alias (errno, _errno)
> +int __old_errno __attribute__ ((section (".bss")));
> +strong_alias (__old_errno, ___old_errno)
>  
>  /* We declare these with compat_symbol so that they are not
>     visible at link time.  Programs must use the accessor functions.  */
>  # if defined HAVE_ELF && defined SHARED && defined DO_VERSIONING
>  #  include <shlib-compat.h>
> -compat_symbol (libc, errno, errno, GLIBC_2_0);
> -compat_symbol (libc, _errno, _errno, GLIBC_2_0);
> +compat_symbol (libc, __old_errno, errno, GLIBC_2_0);
> +compat_symbol (libc, ___old_errno, _errno, GLIBC_2_0);
>  # endif
>  #endif
> 

-- 
Daniel Jacobowitz
MontaVista Software                         Debian GNU/Linux Developer



More information about the Libc-alpha mailing list