From owner-freebsd-current@FreeBSD.ORG Mon Feb 16 06:07:55 2009 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8CE921065674 for ; Mon, 16 Feb 2009 06:07:55 +0000 (UTC) (envelope-from andrew@areilly.bpa.nu) Received: from nskntmtas04p.mx.bigpond.com (nskntmtas04p.mx.bigpond.com [61.9.168.146]) by mx1.freebsd.org (Postfix) with ESMTP id 03D4B8FC19 for ; Mon, 16 Feb 2009 06:07:54 +0000 (UTC) (envelope-from andrew@areilly.bpa.nu) Received: from nskntotgx01p.mx.bigpond.com ([124.188.162.219]) by nskntmtas04p.mx.bigpond.com with ESMTP id <20090216060740.RTNB1877.nskntmtas04p.mx.bigpond.com@nskntotgx01p.mx.bigpond.com> for ; Mon, 16 Feb 2009 06:07:40 +0000 Received: from areilly.bpa.nu ([124.188.162.219]) by nskntotgx01p.mx.bigpond.com with ESMTP id <20090216060740.FLAA19114.nskntotgx01p.mx.bigpond.com@areilly.bpa.nu> for ; Mon, 16 Feb 2009 06:07:40 +0000 Received: (qmail 71394 invoked by uid 501); 16 Feb 2009 06:07:16 -0000 Date: Mon, 16 Feb 2009 17:07:16 +1100 From: Andrew Reilly To: Christoph Mallon Message-ID: <20090216060716.GC70145@duncan.reilly.home> References: <4995BB1B.7060201@icyb.net.ua> <20090213231513.GA20223@duncan.reilly.home> <4997F105.5020409@icyb.net.ua> <499811DF.6030905@incunabulum.net> <20090215151318.0d17bfb9@ernst.jennejohn.org> <49983868.5010107@incunabulum.net> <20090215182420.774b90c3@ernst.jennejohn.org> <49985807.805@protected-networks.net> <49985AEE.1010709@gmx.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <49985AEE.1010709@gmx.de> User-Agent: Mutt/1.4.2.3i X-RPD-ScanID: Class unknown; VirusThreatLevel unknown, RefID str=0001.0A150201.499902AC.00CD,ss=1,fgs=0 Cc: Michael Butler , Andriy Gapon , Bruce Simpson , freebsd-current@freebsd.org Subject: Re: weeding out c++ keywords from sys/sys X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 16 Feb 2009 06:07:58 -0000 On Sun, Feb 15, 2009 at 07:11:58PM +0100, Christoph Mallon wrote: > Michael Butler schrieb: > > .. stops C++ from mangling the prototyped functions so they'll link > >correctly but does it temporarily disable the "reserved word" tests? > >Should it? ;-) > > No, it doesn't. extern $STRING (the standard only requires "C" and > "C++", but there can be more) just changes the linkage of declarations > (name mangling, calling convention). I've always wondered: why does the extern "C" {} cruft have to be pushed into all C headers, rather than being wrapped around the #include <> lines in the C++ source that includes them? Then you wouldn't need the #ifdef __cplusplus conditional, because you already know that it's C++ code. Common usage seems to have it backwards, but I assume that there must be a reason. Cheers, Andrew