Subject: awk problem breaks kernel vnode_if.h
To: None <port-pmax@netbsd.org>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
List: port-pmax
Date: 11/30/1994 01:27:39
> 
> 
> When compiling a kernel on the NetBSD box itself, which I believe I should
> be able to do now, (right?) I get:
> 
> cc  -O -I. -I../../../../arch -I../../../.. -I../../../../sys -DGENERIC -DDS31
00 -DTCP_COMPAT_42 -DINET -DKERNFS -DLOFS -DNFSSERVER -DNFSCLIENT -DMFS -DFFS -D
FIFO -DNKMEMCLUSTERS=1024 -DKTRACE -DCOMPAT_ULTRIX -DCOMPAT_43 -DDIAGNOSTIC -DDE
VPAGER -DVNODEPAGER -DSWAPPAGER -DKERNEL -Dpmax -D__NetBSD__ -G0  -c vnode_if.c
> In file included from ../../../../sys/vnode.h:355,
>                  from vnode_if.c:47:
> ./vnode_if.h:55: parse error before `)'
> ./vnode_if.h: In function `VOP_LOOKUP':
> ./vnode_if.h:58: declaration for parameter `cnp' but no such parameter
> ./vnode_if.h:57: declaration for parameter `vpp' but no such parameter
> ./vnode_if.h:56: declaration for parameter `dvp' but no such parameter
> ./vnode_if.h: At top level:
> ./vnode_if.h:76: parse error before `)'
> ./vnode_if.h: In function `VOP_CREATE':
> 

awk is adding an extra comma at the end of every prototype declaration
in vnode_if.h.  I had no problems when using the FSF's release of gawk
2.15 patchlevel 5. (that is, an Ultrix binary of that gawk, running in
compatibility mode on NetBSD.)  This seems to be the same release as
the NetBSD binary. I find that confusing, to say the least.

I don't know if it's awk that's messing up, or shell quoting in the
/bin/sh script containing the awk script, or what.  Creating a
vnode_if.h on another system (from a consistent template!)  and
copying it to the NetBSD system, is perfectly safe. (I just use NFS on
a single tree, myself).

Alternatively, manually change the pattern ", )" in vnode_if.h
to be just ", )" and proceed :)