Subject: Re: SCSIDEBUG not working?
To: Manuel Bouyer <bouyer@antioche.lip6.fr>
From: Greywolf <greywolf@starwolf.com>
List: port-sparc
Date: 12/03/2000 10:10:05
I think something's wrong with the compiler/preprocessor.

I have in the file:

#define DEBUGTYPE	BUS_ATAPI
#define DEBUGTARGET	-1	/* disable yadda yadda yadda comment */

/* The following are to preserve the original values to revert when done */

#undef DEBUGTYPE
#undef DEBUGTARGET
#define DEBUGTYPE	BUS_SCSI
#define DEBUGTARGET	4

I get these as errors during a make (line breaks mine out of courtesy):

:cc -O2 -Werror -Wall -Wstrict-prototypes -Wmissing-prototypes
:-Wpointer-arith -Wno-uninitialized -Wno-main -I. -I../../../../arch
:-I../../../.. -nostdinc -DSUN4M -DLKM -DSCSIDEBUG="0x7f" -DMAXUSERS=32
:-D_KERNEL -c ../../../../dev/ic/isp.c
:
:In file included from ../../../../dev/ic/isp_netbsd.h:83,
:                 from ../../../../dev/ic/isp.c:72:
:../../../../dev/scsipi/scsipi_debug.h:18: warning: `DEBUGTYPE' redefined
:../../../../dev/scsipi/scsipi_debug.h:26: warning: this is the location of
:the previous definition
:../../../../dev/scsipi/scsipi_debug.h:20: warning: `DEBUGTARGET' redefined
:../../../../dev/scsipi/scsipi_debug.h:27: warning: this is the location of
:the previous definition
:
:*** Error code 1
:
:Stop.

Now when, exactly, did the compiler begin ignoring undefs and start looking
forward for "previous" definitions?

				--*greywolf;
--
*BSD: Dave Barry is working on our motto.