Re: Traditional cpp (was: /usr/bin/calendar broken on current)
On Sat, Nov 10, 2012 at 05:46:21PM +1100, Greg 'groggy' Lehey wrote: > On Friday, 9 November 2012 at 13:52:24 +0100, Dimitry Andric wrote: > > 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. ... > 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? There is also a public domain one in the X11R5 sources. And the well writen http://mcpp.sourceforge.net/ (BSD-style-licensed), with a test suite, etc.. See 'lmcpp-summary-272.pdf' there. -- -- David (obr...@freebsd.org) ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Traditional cpp (was: /usr/bin/calendar broken on current)
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 g...@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 pgpVnv5G7Pjwb.pgp Description: PGP signature
Re: /usr/bin/calendar broken on current
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. Clang will most likely never support traditional preprocessing. It is probably better to just use sed or awk for this kind of trickery. ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"
Re: /usr/bin/calendar broken on current
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. Greg -- Sent from my desktop computer. Finger g...@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 pgp2YopGowaIb.pgp Description: PGP signature
/usr/bin/calendar broken on current
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 ^ In file included from :16: /usr/share/calendar/calendar.freebsd:13:59: warning: missing terminating ' character [-Winvalid-pp-token] 01/02 Patrick Li born in Beijing, People's Republic of China, 1985 ^ /usr/share/calendar/calendar.freebsd:63:49: warning: missing terminating ' character [-Winvalid-pp-token] 02/14 Erwin Lansing born in 's-Hertogenbosch, the Netherlands, 1975 ^ /usr/share/calendar/calendar.freebsd:119:61: warning: missing terminating ' character [-Winvalid-pp-token] 04/03 Tong Liu born in Beijing, People's Republic of China, 1981 ^ /usr/share/calendar/calendar.freebsd:204:59: warning: missing terminating ' character [-Winvalid-pp-token] 06/28 Xin Li born in Beijing, People's Republic of China, 1982 ^ /usr/share/calendar/calendar.freebsd:214:67: warning: missing terminating ' character [-Winvalid-pp-token] 07/04 Florent Thoumie born in Montmorency, Val d'Oise, France, 1982 ^ 245 warnings generated. || n...@pozo.com || || Ph. (415) 681-6235 || -- This message has been scanned for viruses and dangerous content by MailScanner, and is believed to be clean. ___ freebsd-current@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-current To unsubscribe, send any mail to "freebsd-current-unsubscr...@freebsd.org"