From owner-freebsd-hackers Tue Mar 20 10:52:14 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from relay2.net.com (relay2.net.com [134.56.3.108]) by hub.freebsd.org (Postfix) with ESMTP id 9D94E37B71A for ; Tue, 20 Mar 2001 10:52:09 -0800 (PST) (envelope-from shankar_agarwal@net.com) Received: from isis.net.com (fremont-ns1.net.com [134.56.112.20]) by relay2.net.com (8.11.3/8.9.3) with ESMTP id f2KIok622716 for ; Tue, 20 Mar 2001 10:50:48 -0800 (PST) Received: from west-mail.net.com by isis.net.com (8.9.3/SMI-SVR4) id KAA09105; Tue, 20 Mar 2001 10:50:46 -0800 (PST) Received: from net.com ([134.56.103.239]) by west-mail.net.com (Netscape Messaging Server 3.6) with ESMTP id AAA55A9; Tue, 20 Mar 2001 10:52:04 -0800 Message-ID: <3AB7A76B.2BCF5D6E@net.com> Date: Tue, 20 Mar 2001 10:54:35 -0800 From: Shankar Agarwal Organization: N.E.T. http://www.net.com X-Mailer: Mozilla 4.61C-NETv45 [en] (X11; U; SunOS 5.7 sun4u) X-Accept-Language: en, en-GB, fr, de MIME-Version: 1.0 To: tech-kern@netbsd.org Cc: bsd hackers Subject: Question regarding the array of size 0. References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Hi All, 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. The code that is creating problem is #define syscallarg(x) \ union { \ register_t pad; \ struct { x datum; } le; \ struct { \ int8_t pad[ (sizeof (register_t) < sizeof (x)) \ ? 0 \ : sizeof (register_t) - sizeof (x)]; \ x datum; \ } be; \ } struct sys_exit_args { syscallarg(int) rval; }; struct sys_read_args { syscallarg(int) fd; syscallarg(void *) buf; syscallarg(size_t) nbyte; }; Can someone pls tell me if it is possible to define an array of size 0. If yes then do we need some compiler option for this to work. I am not using the Makefile of FreeBsd and trying to write my own make file which will work for this code. Thanks Regards Shankar To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message