Date: Fri, 5 Feb 1999 09:39:38 -0800 (PST) From: John Polstra <jdp@polstra.com> To: daren@partners-dsi.com Cc: stable@FreeBSD.ORG Subject: Re: struct in sigaltstack wrong?? Message-ID: <199902051739.JAA22573@vashon.polstra.com> In-Reply-To: <010c01be508f$f2497b80$ca98f026@partnersdsi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <010c01be508f$f2497b80$ca98f026@partnersdsi.com>, Daren R. Sefcik <daren@partners-dsi.com> wrote: > While trying to compile the FWTK > it would fail everytime at the /usr/include/sys/signal.h > line 163 with: > > cc -O -pipe -I.. -D_SKEY_INTERNAL -c daemon.c > In file included from daemon.c:14: > /usr/include/sys/signal.h:163: parse error before `size_t' > /usr/include/sys/signal.h:163: warning: no semicolon at end of struct or > union > /usr/include/sys/signal.h:165: parse error before `}' > *** Error code 1 > > from the signal.h file line 163: > > /* > * Structure used in sigaltstack call. > */ > struct sigaltstack { > char *ss_sp; /* signal stack base */ > size_t ss_size; /* signal stack length */ > int ss_flags; /* SS_DISABLE and/or SS_ONSTACK */ > > > > looking at the man page for sigaltstack it uses char & long & int > I changed the size_t to long and the compile finished fine. > Is the signal.h file wrong or is the FWTK wrong??? The work-around is to change FWTK to include <stddef.h> first. But that shouldn't be necessary. I'd say the bug is in <signal.h> (or <sys/signal.h>, which it includes). To be standard conforming, the <signal.h> header file should be self-sufficient. Probably <sys/signal.h> should use _BSD_SIZE_T_ from <machine/ansi.h> if it is defined, to keep from polluting the application's namespace with size_t. Bruce probably has a better answer. John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Nobody ever went broke underestimating the taste of the American public." -- H. L. Mencken To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199902051739.JAA22573>