From: pauls@locust.cic.net (Paul Southworth)
Subject: need workaround for OSF/1 cc gagging on "union wait status"
Date: 15 Aug 1994 20:36:46 GMT [thread overview]
Message-ID: <32ojkv$gbe@spruce.cic.net> (raw)
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
next reply other threads:[~1994-08-15 20:36 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-08-15 20:36 Paul Southworth [this message]
1994-08-16 8:04 ` need workaround for OSF/1 cc gagging on "union wait status" Burkhard Neidecker-Lutz
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox