From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2784 Path: news.gmane.org!not-for-mail From: Szabolcs Nagy Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH 2/3] Have different definitions of __pthread_tsd_main agree in size Date: Mon, 11 Feb 2013 15:39:44 +0100 Message-ID: <20130211143944.GF6181@port70.net> References: <1360535367.23424.466.camel@eris.loria.fr> <20130211003158.GP20323@brightrain.aerifal.cx> <1360568420.23424.521.camel@eris.loria.fr> <20130211112237.GB6181@port70.net> <20130211120816.GC6181@port70.net> <1360587084.9132.83.camel@eris.loria.fr> <20130211130906.GE6181@port70.net> <1360589888.9132.104.camel@eris.loria.fr> <20130211134454.GR20323@brightrain.aerifal.cx> <1360591648.9132.117.camel@eris.loria.fr> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1360593597 21837 80.91.229.3 (11 Feb 2013 14:39:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 11 Feb 2013 14:39:57 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2785-gllmg-musl=m.gmane.org@lists.openwall.com Mon Feb 11 15:40:18 2013 Return-path: Envelope-to: gllmg-musl@plane.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by plane.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1U4uYK-0004xt-4Y for gllmg-musl@plane.gmane.org; Mon, 11 Feb 2013 15:40:16 +0100 Original-Received: (qmail 15579 invoked by uid 550); 11 Feb 2013 14:39:56 -0000 Mailing-List: contact musl-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: Original-Received: (qmail 15571 invoked from network); 11 Feb 2013 14:39:56 -0000 Content-Disposition: inline In-Reply-To: <1360591648.9132.117.camel@eris.loria.fr> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2784 Archived-At: * Jens Gustedt [2013-02-11 15:07:28 +0100]: > the current model there is even the danger that environ and __environ > split into two different objects. > > char **environ; > > int main(void) { > return (long)&environ; > } > > When compile-linking this with musl I get both symbols environ and > __environ linked in. > and that is precisely what posix requires > So it would at least be good that the internal use of it in musl would > be consistent and the C library would not see two distinct objects. > no "The ISO C standard and this volume of POSIX.1-2008 do not conflict on the use of environ, but some historical implementations of environ may cause a conflict. As long as environ is treated in the same way as an entry point (for example, fork()), it conforms to both standards. A library can contain fork(), but if there is a user-provided fork(), that fork() is given precedence and no problem ensues. The situation is similar for environ: the definition in this volume of POSIX.1-2008 is to be used if there is no user-provided environ to take precedence. At least three implementations are known to exist that solve this problem."