From Jos.Backus@nl.origin-it.com  Thu Jan  6 01:10:22 2000
Return-Path: <Jos.Backus@nl.origin-it.com>
Received: from gw-nl4.philips.com (gw-nl4.philips.com [192.68.44.36])
	by hub.freebsd.org (Postfix) with ESMTP id 487AD14F70
	for <FreeBSD-gnats-submit@freebsd.org>; Thu,  6 Jan 2000 01:10:14 -0800 (PST)
	(envelope-from Jos.Backus@nl.origin-it.com)
Received: from smtprelay-nl1.philips.com (localhost.philips.com [127.0.0.1])
          by gw-nl4.philips.com with ESMTP id KAA21020
          for <FreeBSD-gnats-submit@freebsd.org>; Thu, 6 Jan 2000 10:09:37 +0100 (MET)
          (envelope-from Jos.Backus@nl.origin-it.com)
Received: from smtprelay-eur1.philips.com(130.139.36.3) by gw-nl4.philips.com via mwrap (4.0a)
	id xma021017; Thu, 6 Jan 00 10:09:37 +0100
Received: from hal.mpn.cp.philips.com (hal.mpn.cp.philips.com [130.139.64.195]) 
	by smtprelay-nl1.philips.com (8.9.3/8.8.5-1.2.2m-19990317) with SMTP id KAA23393
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 6 Jan 2000 10:09:36 +0100 (MET)
Received: (qmail 78073 invoked by uid 666); 6 Jan 2000 09:08:15 -0000
Message-Id: <20000106090815.78072.qmail@hal.mpn.cp.philips.com>
Date: 6 Jan 2000 09:08:15 -0000
From: Jos Backus <Jos.Backus@nl.origin-it.com>
Reply-To: Jos Backus <Jos.Backus@nl.origin-it.com>
To: FreeBSD-gnats-submit@freebsd.org
Subject: /usr/bin/cpp behavioral change breaks calendar(1)
X-Send-Pr-Version: 3.2

>Number:         15932
>Category:       bin
>Synopsis:       /usr/bin/cpp behavioral change breaks calendar(1)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    obrien
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Jan  6 01:20:00 PST 2000
>Closed-Date:    Sun Jan 9 22:25:13 PST 2000
>Last-Modified:  Sun Jan  9 22:25:35 PST 2000
>Originator:     Jos Backus
>Release:        FreeBSD 4.0-CURRENT i386
>Organization:
Origin B.V.
>Environment:

	-current as of yesterday

>Description:

	calendar(1) runs /usr/bin/cpp to preprocess its data files. Apparently
	some recent change in /usr/bin/cpp broke parsing of these files, in
	particular single quotes yield syntax errors (it seems cpp wants to
	interpret them as C-type strings).

>How-To-Repeat:

hal:~% calendar |& head
In file included from :3:
/usr/share/calendar/calendar.birthday:93: unterminated character constant
/usr/share/calendar/calendar.birthday:103: unterminated character constant
/usr/share/calendar/calendar.birthday:117: unterminated character constant
/usr/share/calendar/calendar.birthday:170: unterminated character constant
/usr/share/calendar/calendar.birthday:182: unterminated character constant
/usr/share/calendar/calendar.birthday:225: unterminated character constant
/usr/share/calendar/calendar.birthday:232: unterminated character constant
In file included from :4:
/usr/share/calendar/calendar.christian:26: unterminated character constant	

>Fix:

Add -traditional to the cpp commandline:

hal:/usr/src/usr.bin/calendar# diff -u io.c.orig io.c
--- io.c.orig   Thu Jan  6 09:59:05 2000
+++ io.c        Thu Jan  6 09:56:30 2000
@@ -274,7 +274,7 @@
                        warnx("setuid failed");
                        _exit(1);
                }
-               execl(_PATH_CPP, "cpp", "-P", "-I.", _PATH_INCLUDE, NULL);
+               execl(_PATH_CPP, "cpp", "-P", "-traditional", "-I.", _PATH_INCLUDE, NULL);
                warn(_PATH_CPP);
                _exit(1);
        }


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->obrien 
Responsible-Changed-By: brian 
Responsible-Changed-When: Sat Jan 8 02:03:08 PST 2000 
Responsible-Changed-Why:  
This belongs to our compiler guru :-) 
State-Changed-From-To: open->closed 
State-Changed-By: obrien 
State-Changed-When: Sun Jan 9 22:25:13 PST 2000 
State-Changed-Why:  
fixed. 
>Unformatted:
