Subject: bin/14779: usr.sbin/config generates bogus flags on "needs-flag"
To: None <gnats-bugs@gnats.netbsd.org>
From: None <itojun@itojun.org>
List: netbsd-bugs
Date: 11/30/2001 11:11:25
>Number:         14779
>Category:       bin
>Synopsis:       usr.sbin/config generates bogus flags on "needs-flag"
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    bin-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 29 18:16:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Jun-ichiro itojun Hagino
>Release:        NetBSD 1.5Y
>Organization:
	itojun.org
>Environment:
System: NetBSD starfruit.itojun.org 1.5Y NetBSD 1.5Y (STARFRUIT) #: Mon Nov 26 11:55:26 JST 2001 itojun@starfruit.itojun.org:/usr/home/itojun/NetBSD/src/sys/arch/i386/compile/STARFRUIT i386
Architecture: i386
Machine: i386
>Description:
	usr.sbin/config generates bogus flags (NFOO) when "needs-flag" is
	specified on a line in sys/conf/files, and there are conditionals
	used on the kernel configuration file.
>How-To-Repeat:
	see the following line in sys/conf/files:

file    net/if_faith.c                  faith & inet & inet6    needs-flag
file    net/if_stf.c                    stf & inet & inet6      needs-flag

	if you run usr.sbin/config, faith.h and stf.h will contain the
	following:

#define NFAITH 1
#define NINET 1
#define NINET6 1

#define NSTF 1
#define NINET 1
#define NINET6 1

	it should have generated the first line only.

	the "NINET" and "NINET6" symbols will lead to duplicated symbol
	definitions when compiling kernels.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
 	src/sys as of Fri Nov 30 11:07:50 JST 2001