From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18668 invoked by alias); 14 Jan 2005 16:41:10 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 18619 invoked from network); 14 Jan 2005 16:41:07 -0000 Received: from unknown (HELO gateway.sf.frob.com) (64.81.54.130) by sourceware.org with SMTP; 14 Jan 2005 16:41:07 -0000 Received: from magilla.sf.frob.com (magilla.sf.frob.com [198.49.250.228]) by gateway.sf.frob.com (Postfix) with ESMTP id 063EE357B; Fri, 14 Jan 2005 08:41:05 -0800 (PST) Received: from magilla.sf.frob.com (localhost.localdomain [127.0.0.1]) by magilla.sf.frob.com (8.12.11/8.12.9) with ESMTP id j0EGf5xW014742; Fri, 14 Jan 2005 08:41:05 -0800 Received: (from roland@localhost) by magilla.sf.frob.com (8.12.11/8.12.11/Submit) id j0EGf4lV014739; Fri, 14 Jan 2005 08:41:04 -0800 Date: Fri, 14 Jan 2005 16:41:00 -0000 Message-Id: <200501141641.j0EGf4lV014739@magilla.sf.frob.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit From: Roland McGrath To: Andreas Jaeger Cc: Richard Henderson , Glibc hackers Subject: Re: Aliases ... In-Reply-To: Andreas Jaeger's message of Friday, 14 January 2005 09:54:36 +0100 Emacs: featuring the world's first municipal garbage collector! X-SW-Source: 2005-01/txt/msg00034.txt.bz2 > 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 > > * 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