Subject: port-mac68k/3880: -current kernel won't compile (problems in locators.h)
To: None <gnats-bugs@gnats.netbsd.org>
From: Dave Huang <khym@bga.com>
List: netbsd-bugs
Date: 07/17/1997 14:55:03
>Number:         3880
>Category:       port-mac68k
>Synopsis:       -current kernel won't compile (problems in locators.h)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jul 17 13:05:02 1997
>Last-Modified:
>Originator:     Dave Huang
>Organization:
Name: Dave Huang     |   Mammal, mammal / their names are called /
INet: khym@bga.com   |   they raise a paw / the bat, the cat /
FurryMUCK: Dahan     |   dolphin and dog / koala bear and hog -- TMBG
Dahan: Hani G Y+C 21 Y++ L+++ W- C++ T++ A+ E+ S++ V++ F- Q+++ P+ B+ PA+ PL++
>Release:        NetBSD-current as of July 17, 1997
>Environment:
	
System: NetBSD gedd-ser.metonymy.com 1.2G NetBSD 1.2G (GEDD) #253: Mon Jul 14 20:30:58 CDT 1997     khym@dahan.metonymy.com:/usr/src.local/sys/arch/mac68k/compile/GEDD mac68k

>Description:
A kernel with the new z8530tty.c fails to compile, with the following
error:

m68k-netbsd-gcc -g -O2 -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes -msoft-float -I. -I../../../../arch -I../../../.. -nostdinc -DHZ="0x3c" -DEXEC_AOUT -DEXEC_SCRIPT -DSWAPPAGER -DVNODEPAGER -DDEVPAGER -DMAXFDESCS="0x800" -DKTRACE -DLKM -DINSECURE -DUCONSOLE -DDDB -DDIAGNOSTIC -DCOMPAT_43 -DFFS -DNFS -DKERNFS -DFDESC -DPROCFS -DCD9660 -DUNION -DFIFO -DINET -DTCP_COMPAT_42 -DGATEWAY -DPPP_DEFLATE -DM68040 -DFPSP -DZS_CONSOLE_ABORT -DMAXUSERS=16 -D_KERNEL  -Dmc68020 -Dmac68k  -c ../../../../arch/mac68k/dev/z8530tty.c
In file included from ../../../../arch/mac68k/dev/z8530tty.c:71:
locators.h:7: warning: `OBIO_NORMCF_NO' redefined
locators.h:6: warning: this is the location of the previous definition
*** Error code 1

The relevant section of locators.h is:

extern const char *obio_normcf_locnames[];
#define OBIO_NORMCF_ADDR 0
#define OBIO_NORMCF_ADDR_DEFAULT -1
#define OBIO_NORMCF_NO DRQ 1
#define OBIO_NORMCF_NO DRQ_DEFAULT -1
#define OBIO_NORMCF_NO HSK 2
#define OBIO_NORMCF_NO HSK_DEFAULT -1
                      ^
Note the spaces...    |

These seem to be coming from arch/mac68k/conf/files.mac68k:

define obio_norm { [addr = -1], ["no drq" = -1], ["no hsk" = -1] }

>How-To-Repeat:
Try to build a kernel that uses locators.h, such as one with the zs
device.

>Fix:
I don't know... is the "no" supposed to be some special keyword, and
config just isn't doing the right thing when making locators.h? Or are
"no drq" and "no hsk" the actual locator names, in which case they
should probably be changed to "no_drq" and "no_hsk" or something.
>Audit-Trail:
>Unformatted: