NetBSD Problem Report #46771

From bsiegert@edamame.mirbsd.org  Sun Aug  5 19:20:15 2012
Return-Path: <bsiegert@edamame.mirbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id A4FA863B85F
	for <gnats-bugs@gnats.NetBSD.org>; Sun,  5 Aug 2012 19:20:15 +0000 (UTC)
Message-Id: <20120805173957.78BF81884FC@edamame.mirbsd.org>
Date: Sun,  5 Aug 2012 17:39:57 +0000 (UTC)
From: bsiegert@edamame.mirbsd.org
Reply-To: bsiegert@NetBSD.org
To: gnats-bugs@gnats.NetBSD.org
Subject: syntax error in net/if_types.h
X-Send-Pr-Version: 3.95

>Number:         46771
>Category:       kern
>Synopsis:       syntax error in net/if_types.h
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Aug 05 19:25:00 +0000 2012
>Closed-Date:    Wed Aug 22 22:48:39 +0000 2012
>Last-Modified:  Wed Aug 22 22:48:39 +0000 2012
>Originator:     Benny Siegert <bsiegert@NetBSD.org>
>Release:        NetBSD 5.99.51
>Organization:
The NetBSD Foundation
>Environment:
System: NetBSD edamame.mirbsd.org 5.99.51 NetBSD 5.99.51 (EDAMAME_DOM0) #0: Thu Jun 2 16:17:30 CEST 2011 root@edamame:/usr/obj/sys/arch/amd64/compile/EDAMAME_DOM0 amd64
Architecture: x86_64
Machine: amd64
>Description:
The IFT_PON622 constant in src/sys/net/if_types.h contains two closing comment
marks. This means that the constant expands to "0x0d */", leading to syntax
errors in code using it. This error was introduced in r1.20, in 2002.

The fix below is trivial. However, I never commit in src/sys so I would prefer
for somebody else to do this change -- including maybe a pullup to NetBSD-5
and -6.
>How-To-Repeat:
cat > foo.c << EOF
#include <net/if_types.h>

IFT_PON622
EOF
gcc -E foo.c

>Fix:
--- if_types.h.orig	2012-08-05 17:31:33.000000000 +0000
+++ if_types.h	2012-08-05 17:32:02.000000000 +0000
@@ -249,7 +249,7 @@
 #define IFT_DOCSCABLEUPSTREAMCHANNEL 0xcd /* CATV Upstream Channel */
 #define IFT_ECONET		   0xce /* Acorn Econet */
 #define IFT_PON155		   0xcf /* FSAN 155Mb Symetrical PON interface */
-#define IFT_PON622		   0xd0 /* FSAN 622Mb Symetrical PON interface */*/
+#define IFT_PON622		   0xd0 /* FSAN 622Mb Symetrical PON interface */
 #define IFT_BRIDGE		   0xd1 /* Transparent bridge interface */
 #define IFT_LINEGROUP		   0xd2 /* Interface common to multiple lines */
 #define IFT_VOICEEMFGD		   0xd3 /* voice E&M Feature Group D */

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->pending-pullups
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Sun, 05 Aug 2012 21:27:06 +0000
State-Changed-Why:
Committed, and pullups requested (1786 for 5, 464 for 6)


From: "Thomas Klausner" <wiz@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46771 CVS commit: src/sys/net
Date: Sun, 5 Aug 2012 21:21:42 +0000

 Module Name:	src
 Committed By:	wiz
 Date:		Sun Aug  5 21:21:41 UTC 2012

 Modified Files:
 	src/sys/net: if_types.h

 Log Message:
 Avoid ambiguity by having only one comment close mark.
 PR 46771 by bsiegert.


 To generate a diff of this commit:
 cvs rdiff -u -r1.25 -r1.26 src/sys/net/if_types.h

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Martin Husemann" <martin@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46771 CVS commit: [netbsd-6] src/sys/net
Date: Wed, 8 Aug 2012 15:35:15 +0000

 Module Name:	src
 Committed By:	martin
 Date:		Wed Aug  8 15:35:15 UTC 2012

 Modified Files:
 	src/sys/net [netbsd-6]: if_types.h

 Log Message:
 Pull up following revision(s) (requested by wiz in ticket #464):
 	sys/net/if_types.h: revision 1.26
 Avoid ambiguity by having only one comment close mark.
 PR 46771 by bsiegert.


 To generate a diff of this commit:
 cvs rdiff -u -r1.25 -r1.25.104.1 src/sys/net/if_types.h

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: "Manuel Bouyer" <bouyer@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/46771 CVS commit: [netbsd-5] src/sys/net
Date: Wed, 22 Aug 2012 21:16:33 +0000

 Module Name:	src
 Committed By:	bouyer
 Date:		Wed Aug 22 21:16:33 UTC 2012

 Modified Files:
 	src/sys/net [netbsd-5]: if_types.h

 Log Message:
 Pull up following revision(s) (requested by wiz in ticket #1786):
 	sys/net/if_types.h: revision 1.26
 Avoid ambiguity by having only one comment close mark.
 PR 46771 by bsiegert.


 To generate a diff of this commit:
 cvs rdiff -u -r1.25 -r1.25.74.1 src/sys/net/if_types.h

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: pending-pullups->closed
State-Changed-By: wiz@NetBSD.org
State-Changed-When: Wed, 22 Aug 2012 22:48:39 +0000
State-Changed-Why:
Fixed and pulled up to -5 and -6. Thanks!


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.