From nobody@FreeBSD.org  Sun Feb  3 01:13:02 2013
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115])
	by hub.freebsd.org (Postfix) with ESMTP id CAAB7809
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  3 Feb 2013 01:13:02 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id A540CDEF
	for <freebsd-gnats-submit@FreeBSD.org>; Sun,  3 Feb 2013 01:13:02 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.5/8.14.5) with ESMTP id r131D2il056822
	for <freebsd-gnats-submit@FreeBSD.org>; Sun, 3 Feb 2013 01:13:02 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.5/8.14.5/Submit) id r131D283056821;
	Sun, 3 Feb 2013 01:13:02 GMT
	(envelope-from nobody)
Message-Id: <201302030113.r131D283056821@red.freebsd.org>
Date: Sun, 3 Feb 2013 01:13:02 GMT
From: Alex Kozlov <spam@rm-rf.kiev.ua>
To: freebsd-gnats-submit@FreeBSD.org
Subject: [parch] Fix Ken Thompson line in calendar.birthday
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         175790
>Category:       bin
>Synopsis:       [patch] Fix Ken Thompson line in calendar.birthday
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    eadler
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Feb 03 01:20:00 UTC 2013
>Closed-Date:    Sun Apr 28 02:26:11 UTC 2013
>Last-Modified:  Sun Apr 28 02:26:11 UTC 2013
>Originator:     Alex Kozlov
>Release:        RELENG_9
>Organization:
private
>Environment:
>Description:
The calendar uses cpp in traditional mode to process calendar files and because of this word 'unix' expands to 1 (see man gcc). The ansi or higher -std modes can't be used because we need to preserve tabs for calendar, therefore I propose to change 'unix' to 'Unix'.
>How-To-Repeat:
$echo unix >/tmp/testcpp.txt

$cpp --version
cpp (GCC) 4.2.2 20070831 prerelease [FreeBSD]
Copyright (C) 2007 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

$cpp -P -traditional -nostdinc /tmp/testcpp.txt
1

$cpp --version
FreeBSD clang version 3.2 (tags/RELEASE_32/final 170710) 20121221
Target: x86_64-unknown-freebsd10.0
Thread model: posix
 
$cpp -P -traditional -nostdinc /tmp/testcpp.txt
1
>Fix:


Patch attached with submission follows:

Index: share/calendar/calendar.birthday
@@ -42,7 +42,7 @@
 01/30	Franklin Delano Roosevelt born in Hyde Park, New York, 1882
 01/31	Jackie Robinson born, 1919
 02/03	Gertrude Stein born, 1874
-02/04	Ken Thompson, creator of unix, born, 1943
+02/04	Ken Thompson, creator of Unix, born, 1943
 02/05	Alex Harvey (SAHB) is born in Glasgow, Scotland, 1935
 02/06	King George VI of UK dies;  his daughter becomes Elizabeth II, 1952
 02/07	Sinclair Lewis born, 1885


>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-bugs->eadler 
Responsible-Changed-By: eadler 
Responsible-Changed-When: Sun Feb 3 01:24:13 UTC 2013 
Responsible-Changed-Why:  
I should not be taking on additional work, but this is too important :) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=175790 
State-Changed-From-To: open->analyzed 
State-Changed-By: eadler 
State-Changed-When: Mon Feb 4 00:40:31 UTC 2013 
State-Changed-Why:  
awaiting approval or review prior to commit (no action needed from 
submitter) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=175790 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: bin/175790: commit references a PR
Date: Mon,  4 Mar 2013 02:21:11 +0000 (UTC)

 Author: eadler
 Date: Mon Mar  4 02:21:03 2013
 New Revision: 247752
 URL: http://svnweb.freebsd.org/changeset/base/247752
 
 Log:
   Due to calendar(1)'s abuse of the C preprocessor "unix" gets expanded to
   "1".  'Fix' this.
   
   PR:		bin/175790
   Submitted by:	ak
   Approved by:	cperciva (mentor)
 
 Modified:
   head/usr.bin/calendar/calendars/calendar.birthday
 
 Modified: head/usr.bin/calendar/calendars/calendar.birthday
 ==============================================================================
 --- head/usr.bin/calendar/calendars/calendar.birthday	Mon Mar  4 02:19:55 2013	(r247751)
 +++ head/usr.bin/calendar/calendars/calendar.birthday	Mon Mar  4 02:21:03 2013	(r247752)
 @@ -6,6 +6,7 @@
  
  #ifndef _calendar_birthday_
  #define _calendar_birthday_
 +#undef	unix
  
  01/01	J.D. Salinger born, 1919
  01/01	Paul Revere born in Boston, 1735
 _______________________________________________
 svn-src-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-src-all
 To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: analyzed->patched 
State-Changed-By: eadler 
State-Changed-When: Mon Mar 4 02:44:41 UTC 2013 
State-Changed-Why:  
committed in 247752 

http://www.freebsd.org/cgi/query-pr.cgi?pr=175790 
State-Changed-From-To: patched->closed 
State-Changed-By: eadler 
State-Changed-When: Sun Apr 28 02:26:08 UTC 2013 
State-Changed-Why:  
Committed. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=175790 
>Unformatted:
