From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/694 Path: news.gmane.org!not-for-mail From: Isaac Dunham Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH] _BSD_SOURCE for unistd.h, take 2 Date: Fri, 6 Apr 2012 22:47:40 -0700 Message-ID: <20120406224740.067a7cf1@newbook> References: <20120405155508.0f782675@newbook> <20120406001049.GA8803@brightrain.aerifal.cx> <20120405184534.77ad0b4b@newbook> <20120406144829.GF8803@brightrain.aerifal.cx> <20120406084808.1c71d502@newbook> <20120406233212.GG8803@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1333777678 4558 80.91.229.3 (7 Apr 2012 05:47:58 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sat, 7 Apr 2012 05:47:58 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-695-gllmg-musl=m.gmane.org@lists.openwall.com Sat Apr 07 07:47:58 2012 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 1SGOVB-0005Kz-M1 for gllmg-musl@plane.gmane.org; Sat, 07 Apr 2012 07:47:57 +0200 Original-Received: (qmail 19741 invoked by uid 550); 7 Apr 2012 05:47: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 19733 invoked from network); 7 Apr 2012 05:47:56 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=oSEe6wdwQvjD4kGU58la8wsKV702XuqheYoCY+7QaVPhXXGlQybeZR7Gql5hfiE+slZUqFKrwbTPjHZgO6Yhm+2Gfm7XdD2Z6IEcJvkK+ArJc8tz/JsmjOSlf3BhSm3ig2921uDdT5vGndJ6EAUEbspKeFLI7cMTIcKODMqnugw=; h=Date:From:To:Subject:Message-ID:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type:Content-Transfer-Encoding; In-Reply-To: <20120406233212.GG8803@brightrain.aerifal.cx> X-Mailer: Claws Mail 3.7.4 (GTK+ 2.20.1; i486-pc-linux-gnu) Xref: news.gmane.org gmane.linux.lib.musl.general:694 Archived-At: > > Still, I tend to prefer having some respect for even unofficial > > namespaces. .. > A more general issue: this patch addresses _BSD_SOURCE enabling the > nonstandard functions, but what should the behavior of _BSD_SOURCE be > with regards to functions that are in XSI but not POSIX base? My > inclination is to make it so _BSD_SOURCE implies _XOPEN_SOURCE and > _POSIX_C_SOURCE everywhere (i.e. add it to all the big || lists in all > the headers) unless there's a strong argument against doing this. As > it stands, defining just _BSD_SOURCE but not _POSIX_C_SOURCE or > _XOPEN_SOURCE would leave you with a fairly broken set of headers, I > think.. There seemed to be large numbers of functions that were _XOPEN_SOURCE but not _BSD_SOURCE, if I'm remembering right. It seemed to mostly fall somewhere between *old* X/Open and POSIX, with some extensions; it definitely should imply POSIX, but I'd avoid *automatically* adding X/Open (see previous comment about respecting nonstandard namespaces). It would be annoying to write a program, use -D_BSD_SOURCE, have it work, move to another libc, and have to change CFLAGS--especially if that's because of disregard for the namespace. In some places assuming _XOPEN_SOURCE would be appropriate; we should look at each case. Isaac Dunham