From owner-freebsd-current@FreeBSD.ORG Sat Nov 10 06:46:26 2012 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 915C735E; Sat, 10 Nov 2012 06:46:26 +0000 (UTC) (envelope-from grog@lemis.com) Received: from w3.lemis.com (w3.lemis.com [208.86.224.149]) by mx1.freebsd.org (Postfix) with ESMTP id 579668FC0C; Sat, 10 Nov 2012 06:46:26 +0000 (UTC) Received: from eureka.lemis.com (1032.x.rootbsd.net [208.86.224.149]) by w3.lemis.com (Postfix) with ESMTP id 22A943B86E; Sat, 10 Nov 2012 06:46:24 +0000 (UTC) Received: by eureka.lemis.com (Postfix, from userid 1004) id 5348BF74EB; Sat, 10 Nov 2012 17:46:21 +1100 (EST) Date: Sat, 10 Nov 2012 17:46:21 +1100 From: Greg 'groggy' Lehey To: Dimitry Andric Subject: Traditional cpp (was: /usr/bin/calendar broken on current) Message-ID: <20121110064621.GA10902@eureka.lemis.com> References: <201211090658.qA96whII081757@pozo.com> <20121109072631.GQ77848@eureka.lemis.com> <509CFC88.7050606@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="VS++wcV0S1rZb1Fb" Content-Disposition: inline In-Reply-To: <509CFC88.7050606@FreeBSD.org> User-Agent: Mutt/1.4.2.3i Organization: The FreeBSD Project Phone: +61-3-5346-1370 Mobile: +61-418-838-708 WWW-Home-Page: http://www.FreeBSD.org/ X-PGP-Fingerprint: 9A1B 8202 BCCE B846 F92F 09AC 22E6 F290 507A 4223 Cc: freebsd-current@freebsd.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 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: Sat, 10 Nov 2012 06:46:26 -0000 --VS++wcV0S1rZb1Fb Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Friday, 9 November 2012 at 13:52:24 +0100, Dimitry Andric wrote: > On 2012-11-09 08:26, Greg 'groggy' Lehey wrote:> On Thursday, 8 November > 2012 at 22:58:37 -0800, Manfred Antar wrote: >>> Sometime in the last week calendar stopped working. >>> not sure the cause >>> here is some of the output: >>> /usr/share/calendar/calendar.music:231:17: warning: missing terminating ' >>> character [-Winvalid-pp-token] >>> 12/16 Don McLean's "American Pie" is released, 1971 >>> ^ >> >> This is unexpected fallout from the transition from gcc to clang. >> calendar invokes cpp, and it seems that clang's cpp doesn't like what >> it sees. This patch works around the issue: >> >> --- pathnames.h (revision 242777) >> +++ pathnames.h (working copy) >> @@ -32,5 +32,5 @@ >> >> #include >> >> -#define _PATH_CPP "/usr/bin/cpp" >> +#define _PATH_CPP "/usr/bin/gcpp" >> #define _PATH_INCLUDE "/usr/share/calendar" >> >> Clearly that's not the solution. I'll investigate. > > Looks like yet another cpp -traditional abuse. Use or abuse? In any case, it's not the only one. In the Good Old Days people did things like that. So, it seems, does imake, and I'm sure others will come out of the woodwork. > Clang will most likely never support traditional preprocessing. OK. > It is probably better to just use sed or awk for this kind of > trickery. I'm not sure that's the way to go. It's more work than it's worth. What we really need is a traditional cpp. That's not difficult: there's one in 4.3BSD (all 32 kB of source). OpenBSD also had one, though it's gone now, so presumably that one has a clean license. Both appear to be from pcc. Should we import it into the tree as, say, tradcpp? Greg -- Sent from my desktop computer. Finger grog@FreeBSD.org for PGP public key. See complete headers for address and phone numbers. This message is digitally signed. If your Microsoft MUA reports problems, please read http://tinyurl.com/broken-mua --VS++wcV0S1rZb1Fb Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlCd+DwACgkQIubykFB6QiPOaACfal8cv7TnIyYtiID4DzURyOMy L/UAoI2Z4JYxCGYbi8pFK6se4wn9t9PR =M5fQ -----END PGP SIGNATURE----- --VS++wcV0S1rZb1Fb--