Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* need workaround for OSF/1 cc gagging on "union wait status"
@ 1994-08-15 20:36 Paul Southworth
  1994-08-16  8:04 ` Burkhard Neidecker-Lutz
  0 siblings, 1 reply; 2+ messages in thread
From: Paul Southworth @ 1994-08-15 20:36 UTC (permalink / 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1994-08-16  8:04 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-08-15 20:36 need workaround for OSF/1 cc gagging on "union wait status" Paul Southworth
1994-08-16  8:04 ` Burkhard Neidecker-Lutz

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox