From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.org/gmane.linux.lib.musl.general/502 Path: news.gmane.org!not-for-mail From: Rich Felker Newsgroups: gmane.linux.lib.musl.general Subject: Re: missing extern "C" block Date: Tue, 11 Oct 2011 00:10:15 -0400 Message-ID: <20111011041015.GU132@brightrain.aerifal.cx> References: <20111010164449.GU24939@port70.net> <20111010204946.e90ac65a.idunham@lavabit.com> Reply-To: musl@lists.openwall.com NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1318306700 23947 80.91.229.12 (11 Oct 2011 04:18:20 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 11 Oct 2011 04:18:20 +0000 (UTC) To: musl@lists.openwall.com Original-X-From: musl-return-503-gllmg-musl=m.gmane.org@lists.openwall.com Tue Oct 11 06:18:16 2011 Return-path: Envelope-to: gllmg-musl@lo.gmane.org Original-Received: from mother.openwall.net ([195.42.179.200]) by lo.gmane.org with smtp (Exim 4.69) (envelope-from ) id 1RDTnE-0008OY-3p for gllmg-musl@lo.gmane.org; Tue, 11 Oct 2011 06:18:16 +0200 Original-Received: (qmail 19468 invoked by uid 550); 11 Oct 2011 04:18:15 -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 19460 invoked from network); 11 Oct 2011 04:18:15 -0000 Content-Disposition: inline In-Reply-To: <20111010204946.e90ac65a.idunham@lavabit.com> User-Agent: Mutt/1.5.21 (2010-09-15) Xref: news.gmane.org gmane.linux.lib.musl.general:502 Archived-At: On Mon, Oct 10, 2011 at 08:49:46PM -0700, Isaac Dunham wrote: > On Mon, 10 Oct 2011 18:44:49 +0200 > Szabolcs Nagy wrote: > > > while we are fixing c++ compatibility > > some headers with function prototypes > > do not have extern "C" block for c++ > > > > I'm certainly not saying that this is the right way to handle it, > but this is what GNU libc uses __BEGIN_DECLS & __END_DECLS for (in > sys/cdefs.h). Definitely not the right way. It's a lot slower, and it's not immediately obvious to somebody reading the code what the definitions of these macros might be. The right fix is the audit that was just done, and applying the results of it to fix errors and omissions. Rich