Subject: Re: Question regarding the array of size 0.
To: Shankar Agarwal <firstname.lastname@example.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
Date: 03/20/2001 14:16:57
> I am getting the following array while trying to compile
> uipc_syscalls.c file.
> /vobs/atm/netbsd/sys/sys/syscallargs.h", line 30: zero or negative subscript
> This is because the code in syscallargs.h is defining an array of size 0.
> Can someone pls tell me if it is possible to define an array of size
In C, no; in gcc, yes.
NetBSD uses gcc. If you expect to build NetBSD code with any other
compiler, you may have work to do; this is a simple example. (I've
seen nods made in the direction of compatability with other compilers,
but they are usually restricted to userland utilities; stuff like
<sys/syscallargs.h> that are used only by the kernel get less attention
in that direction.)
> I am not using the Makefile of FreeBsd
I'm not sure why this is relevant; attempting to build NetBSD source
code (I note .../netbsd/... in the pathname above, and you asked this
on (among others) a NetBSD mailing list) with a FreeBSD Makefile is
bound to be an "on your own" sort of thing.
> and trying to write my own make file which will work for this code.
You will have to either rework it to avoid the zero-size array or
switch to using a compiler that supports a C-like language including
zero-size arrays (such as gcc).
7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B