This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
> Here's a patch to initialize it - it removes the warning.
This really happens with __thread? The right thing when this issue comes
up is to use __attribute__((nocommon)).
> Ok to commit?
>
> Andreas
>
> 2005-01-14 Andreas Jaeger <aj@suse.de>
>
> * sysdeps/generic/errno.c: Initialize errno.
>
> ============================================================
> Index: sysdeps/generic/errno.c
> --- sysdeps/generic/errno.c 4 Oct 2004 20:59:41 -0000 1.7
> +++ sysdeps/generic/errno.c 14 Jan 2005 08:52:47 -0000
> @@ -1,5 +1,5 @@
> /* Definition of `errno' variable. Canonical version.
> - Copyright (C) 2002, 2004 Free Software Foundation, Inc.
> + Copyright (C) 2002, 2004, 2005 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
> @@ -29,7 +29,9 @@ int rtld_errno attribute_hidden;
>
> #elif USE___THREAD
>
> -__thread int errno;
> +/* We have to initialize errno, since aliasing of a common symbol does
> + not work. */
> +__thread int errno = 0;
> extern __thread int __libc_errno __attribute__ ((alias ("errno")))
> attribute_hidden;
>
>
> --
> Andreas Jaeger, aj@suse.de, http://www.suse.de/~aj
> SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nürnberg, Germany
> GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |