Subject: kern/11614: fdc_pcmcia.c doesn't compile due to missing include files
To: None <gnats-bugs@gnats.netbsd.org>
From: None <johani@cafax.se>
List: netbsd-bugs
Date: 11/30/2000 03:16:18
>Number:         11614
>Category:       kern
>Synopsis:       fdc_pcmcia.c (driver for external FDD) doesn't compile
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 30 03:16:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Johan Ihren
>Release:        2000-11-21
>Organization:
	Autonomica AB
>Environment:
	Pentium II, 300MHz laptop
System: NetBSD wanda.cafax.se 1.5K NetBSD 1.5K (WANDA) #5: Wed Nov 29 21:40:02 CET 2000 johani@wanda.cafax.se:/usr/store/source/netbsd/kernels.i386/WANDA i386
Architecture: i386
Machine: i386
>Description:
	Firstly, it includes

<dev/ic/fdcreg.h>
<dev/ic/fdcvar.h>

neither of which exists in my 1.5K. 

However there is an sys/dev/isa/fdcvar.h together with an
sys/isa/fdreg.h (note that it's not fdcreg.h). But, not really
unexpectedly, using these doesn't work:

cc  -O2 -Werror -Wall -Wmissing-prototypes -Wstrict-prototypes  -Wpointer-arith -Wno-uninitialized -Wno-main -I. -I/sys/arch -I/sys -nostdinc -DMSGBUFSIZE="128*1024" -DLKM -DDIAGNOSTIC -DPNPBIOSDEBUG -DMAXUSERS=32 -D_KERNEL -Di386  -c /sys/dev/pcmcia/fdc_pcmcia.c
In file included from /sys/dev/pcmcia/fdc_pcmcia.c:55:
/sys/dev/ic/fdcvar.h:120: syntax error before `isa_chipset_tag_t'
/sys/dev/ic/fdcvar.h:122: field `sc_timo_ch' has incomplete type
/sys/dev/ic/fdcvar.h:123: field `sc_intr_ch' has incomplete type
cc1: warnings being treated as errors
/sys/dev/pcmcia/fdc_pcmcia.c: In function `fdc_conf':
/sys/dev/pcmcia/fdc_pcmcia.c:83: warning: implicit declaration of function `out_fdc_cmd'
/sys/dev/pcmcia/fdc_pcmcia.c:83: `FDC_CMD_VERSION' undeclared (first use in this function)
/sys/dev/pcmcia/fdc_pcmcia.c:83: (Each undeclared identifier is reported only once
/sys/dev/pcmcia/fdc_pcmcia.c:83: for each function it appears in.)
/sys/dev/pcmcia/fdc_pcmcia.c:84: warning: implicit declaration of function `fdcresult'
/sys/dev/pcmcia/fdc_pcmcia.c:88: warning: implicit declaration of function `FDC_ST0'
/sys/dev/pcmcia/fdc_pcmcia.c:88: `FDC_ST0_INVL' undeclared (first use in this function)
/sys/dev/pcmcia/fdc_pcmcia.c:102: `FDC_CMD_DUMPREG' undeclared (first use in this function)
/sys/dev/pcmcia/fdc_pcmcia.c:116: `FDC_CMD_CONFIGURE' undeclared (first use in this function)
/sys/dev/pcmcia/fdc_pcmcia.c:123: warning: implicit declaration of function `FDC_CMD_LOCK'
/sys/dev/pcmcia/fdc_pcmcia.c:123: `FDC_CMD_FLAGS_LOCK' undeclared (first use in this function)
/sys/dev/pcmcia/fdc_pcmcia.c: In function `fdc_pcmcia_attach':
/sys/dev/pcmcia/fdc_pcmcia.c:157: storage size of `fa' isn't known
/sys/dev/pcmcia/fdc_pcmcia.c:195: structure has no member named `sc_flags'
/sys/dev/pcmcia/fdc_pcmcia.c:195: `FDC_HEADSETTLE' undeclared (first use in this function)
/sys/dev/pcmcia/fdc_pcmcia.c:199: warning: implicit declaration of function `fdcfind'
/sys/dev/pcmcia/fdc_pcmcia.c:207: `fdchwintr' undeclared (first use in this function)
/sys/dev/pcmcia/fdc_pcmcia.c:215: `fd_types' undeclared (first use in this function)
/sys/dev/pcmcia/fdc_pcmcia.c:218: `fdprint' undeclared (first use in this function)
/sys/dev/pcmcia/fdc_pcmcia.c:157: warning: unused variable `fa'
*** Error code 1

Stop.

>How-To-Repeat:
	enable "fdc* at pcmcia? function ?" in an i386 kernel config and
	re-build.
>Fix:
	Sorry, beyond my present abilites ;-)
>Release-Note:
>Audit-Trail:
>Unformatted: