From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/585 Path: news.gmane.org!not-for-mail From: Isaac Dunham Newsgroups: gmane.linux.lib.musl.general Subject: Re: Missing header(s) Date: Mon, 20 Feb 2012 17:15:03 -0800 Message-ID: <20120220171503.22c3896c.idunham@lavabit.com> References: <20120220092459.23c85483.idunham@lavabit.com> <20120220191703.GU146@brightrain.aerifal.cx> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Multipart=_Mon__20_Feb_2012_17_15_03_-0800_1f8Tw75GGOUG4TtD" X-Trace: dough.gmane.org 1329786926 21862 80.91.229.3 (21 Feb 2012 01:15:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 21 Feb 2012 01:15:26 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-586-gllmg-musl=m.gmane.org@lists.openwall.com Tue Feb 21 02:15:22 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 1RzeK5-0004h1-UB for gllmg-musl@plane.gmane.org; Tue, 21 Feb 2012 02:15:18 +0100 Original-Received: (qmail 30426 invoked by uid 550); 21 Feb 2012 01:15:17 -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 30418 invoked from network); 21 Feb 2012 01:15:16 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=lavabit; d=lavabit.com; b=ypo4KwhqjBeBbTcL0kmaH2r4JCOeaajnJhbhWCkwz+kEU8ReBA0vTj/XGmDvTNpmdXlq1CesYb+uZ9RiCRzD2L0ewc1t9UCx8jr7p97YwKPbRqlHw7PpRTkJ0HMdA4sMnKJdmRSeliyYa6ig6knguwgYoVgnLOyKIWZYRp5pCVI=; h=Date:From:To:Subject:Message-Id:In-Reply-To:References:X-Mailer:Mime-Version:Content-Type; In-Reply-To: <20120220191703.GU146@brightrain.aerifal.cx> X-Mailer: Sylpheed 3.0.2 (GTK+ 2.20.1; i486-pc-linux-gnu) Xref: news.gmane.org gmane.linux.lib.musl.general:585 Archived-At: This is a multi-part message in MIME format. --Multipart=_Mon__20_Feb_2012_17_15_03_-0800_1f8Tw75GGOUG4TtD Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Mon, 20 Feb 2012 14:17:03 -0500 Rich Felker wrote: > Doesn't 3.81 already have some important bugs you need to patch > anyway? If so you could add ar.h at the same time. This won't be > needed for musl once I get ar.h added, but it would make the resulting > build more portable anyway. It's running OK without patches, but I haven't pushed too hard. As mentioned, I just copied ar.h to /usr/include. > > By the way, I've put together a sys/cdefs.h header that gets a lot > > of stuff to compile; ~95% of it is backwards-compatability macros. > > If you want, I can submit it; I'd add > I wouldn't mind seeing it, and as long as it's clean I'll probably add > it... > > > #include'ing is semi-portable, though (NetBSD, GNU > > libc)--and the only option if you need to support some old systems > > as well as c99. > > I'm confused how it would be necessary for this. The __STDC__ and > __STDC_VERSION__ macros give you all you need to make the appropriate > definitions yourself if you really need to support pre-standardized C. > If you just need to support C89 and C99, you'd rarely have to test > anything anyway; just use the intersection of the 2 languages (which > is equivalent to C89, except that you can't use C99 keywords like > inline, restrict, _Bool, etc.). It looks like it's meant to have one header allow the same source to build with anything from K&R to C99 (in theory). > As such, I still see apps that include sys/cdefs.h as buggy. > Rich I view it like features.h: nonsense, but if it's a choice between getting it building in a minute or an hour, I'd rather get it building sooner. Once I know how broken it is, I can decide whether to clean it up, forget it, or delete it. I'd rather not waste my time on completely broken code. --Multipart=_Mon__20_Feb_2012_17_15_03_-0800_1f8Tw75GGOUG4TtD Content-Type: text/x-chdr; name="cdefs.h" Content-Disposition: attachment; filename="cdefs.h" Content-Transfer-Encoding: 7bit /* Legacy, meant only for glibc compatability * These were ripped off from glibc sys/cdefs.h */ #warn "sys/cdefs.h is only meant as a temporary measure" #warn "Any code that requires it needs cleanup" #ifndef _SYS_CDEFS_H_ #define _SYS_CDEFS_H_ #undef __P #undef __PMT #undef __NTH #define __THROW #define __P(param) param #define __PMT(param) param #define __NTH(param) param #define __CONCAT(x,y) x ## y #define __STRING(x) #x #define __ptr_t void * #define __long_double_t long double #ifdef __cplusplus # define __BEGIN_DECLS extern "C" { # define __END_DECLS } #else # define __BEGIN_DECLS # define __END_DECLS #endif #endif /* _SYS_CDEFS_H_ --Multipart=_Mon__20_Feb_2012_17_15_03_-0800_1f8Tw75GGOUG4TtD--