From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/2160 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: [PATCH 2/4] Add basic sys/cdefs.h found on most unix Date: Sat, 20 Oct 2012 19:38:53 -0400 Message-ID: <20121020233852.GS254@brightrain.aerifal.cx> References: <1350764145-10305-1-git-send-email-awg@embtoolkit.org> <1350764145-10305-3-git-send-email-awg@embtoolkit.org> <20121020161841.ef32cdd2.idunham@lavabit.com> <5083360C.3020602@embtoolkit.org> 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 1350776856 17435 80.91.229.3 (20 Oct 2012 23:47:36 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 20 Oct 2012 23:47:36 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-2161-gllmg-musl=m.gmane.org@lists.openwall.com Sun Oct 21 01:47:44 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 1TPilb-0005VY-O3 for gllmg-musl@plane.gmane.org; Sun, 21 Oct 2012 01:47:43 +0200 Original-Received: (qmail 4011 invoked by uid 550); 20 Oct 2012 23:47:36 -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 4003 invoked from network); 20 Oct 2012 23:47:36 -0000 Content-Disposition: inline In-Reply-To: <5083360C.3020602@embtoolkit.org> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:2160 Archived-At: On Sun, Oct 21, 2012 at 01:38:52AM +0200, Abdoulaye Walsimou GAYE wrote: > On 10/21/2012 01:18 AM, Isaac Dunham wrote: > >On Sat, 20 Oct 2012 22:15:43 +0200 > >Abdoulaye Walsimou Gaye wrote: > > > >>Signed-off-by: Abdoulaye Walsimou Gaye > >>--- > >> include/sys/cdefs.h | 22 ++++++++++++++++++++++ > >> 1 file changed, 22 insertions(+) > >> create mode 100644 include/sys/cdefs.h > >I'm pretty sure that the last three times sys/cdefs.h was proposed, > >it was rejected. > > Unfortunately many packages (wrongly?) use to rely on macros defined there, I've found it's really very few; an equivalent sys/cdefs.h does not exist on most systems. It was never intended for use by applications; it's an internal part of glibc (and perhaps also some BSDs?) used for handling backwardsness like pre-ANSI C compilers (abstracting const away as __const, or abstracting away prototypes with __P()) and optional use of GCC-specific features. For things like 'extern "C"', there's no reason to use sys/cdefs.h; the just writing the code it expands to inline is much more clear/informative and provides better performance as a nice side effect. > sometimes indirectly via . I don't see what you mean by this. Rich