From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,2412a175a10afe4a,start X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-08-15 13:43:10 PST Path: bga.com!news.sprintlink.net!hookup!swrinde!gatech!newsxfer.itd.umich.edu!news.cic.net!locust.cic.net!pauls From: pauls@locust.cic.net (Paul Southworth) Newsgroups: comp.unix.osf.osf1 Subject: need workaround for OSF/1 cc gagging on "union wait status" Date: 15 Aug 1994 20:36:46 GMT Organization: CICNet, Inc. Message-ID: <32ojkv$gbe@spruce.cic.net> NNTP-Posting-Host: locust.cic.net I seem to be bitten by this {feature|bug|strictly-enforced-standard|whatever} fairly frequently and I would like to know what the workaround is. This code snippet is from the BSD rlogin code, for example, and I see this syntax elsewhere as well. Please send email if you know an easy workaround for it. catch_child() { union wait status; int pid; for (;;) { pid = wait3((int *)&status, WNOHANG|WUNTRACED, (struct rusage *)0); if (pid == 0) return; /* if the child (reader) dies, just quit */ if (pid < 0 || pid == child && !WIFSTOPPED(status)) done((int)(status.w_termsig | status.w_retcode)); } /* NOTREACHED */ } That results in the following: % cc -c rlogin.c /usr/lib/cmplrs/cc/cfe: Error: rlogin.c, line 328: storage size for 'status' isn't known union wait status; -----------^ /usr/lib/cmplrs/cc/cfe: Error: rlogin.c, line 328: Reference an expression of void type or an incomplete type. union wait status; -----------^ /usr/lib/cmplrs/cc/cfe: Error: rlogin.c, line 337: Reference an expression of void type or an incomplete type. if (pid < 0 || pid == child && !( (((status) & 0177 ) == 0177 ) && !(((status) & 0377) == 0377) )) -------------------------------------^ -- Paul Southworth CICNet Systems Support pauls@cic.net