Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 09 Nov 2012 13:52:24 +0100
From:      Dimitry Andric <dim@FreeBSD.org>
To:        Greg 'groggy' Lehey <grog@FreeBSD.org>
Cc:        freebsd-current@freebsd.org
Subject:   Re: /usr/bin/calendar broken on current
Message-ID:  <509CFC88.7050606@FreeBSD.org>
In-Reply-To: <20121109072631.GQ77848@eureka.lemis.com>
References:  <201211090658.qA96whII081757@pozo.com> <20121109072631.GQ77848@eureka.lemis.com>

index | next in thread | previous in thread | raw e-mail

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 <paths.h>
>
> -#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.  Clang will most likely
never support traditional preprocessing.

It is probably better to just use sed or awk for this kind of trickery.


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?509CFC88.7050606>