From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,b7d01e91d81d0b34 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-04-08 10:50:58 PST Path: gmd.de!newsserver.jvnc.net!yale.edu!yale!zip.eecs.umich.edu!yeshua.marcam.com!MathWorks.Com!news.kei.com!bloom-beacon.mit.edu!paperboy.osf.org!jeffc From: jeffc@soba.osf.org (Jeff Carter) Newsgroups: comp.unix.osf.osf1 Subject: Re: Porting code problems Date: 8 Apr 1994 17:50:58 GMT Organization: Open Software Foundation Distribution: world Message-ID: <2o45i2$ffb@paperboy.osf.org> References: <2o1arm$lbg@chaos.dac.neu.edu> NNTP-Posting-Host: soba.osf.org In article <2o1arm$lbg@chaos.dac.neu.edu>, johnson@chaos.dac.neu.edu (Chris Johnson) writes: > believe to be (but aren't sure) related to structures not being defined > when I include them from /usr/include. The simplest example I have, > which works fine with Ultrix, is the following. > > #include > main() > { struct wait abd; > } > > That compiler claims that the storage size for abc is unknown. There > are other problem as well but this is one of them. The 'union wait' is a Berkley-ism. If you want the "wait" family of interfaces that use the union, compile as: cc foo.c -D_BSD -lbsd For code that came from Ultrix, this is probably the path of least resistance. To make the code more portable, you can change to the POSIX.1 form (which is an int, rather than a union) and the associated macros (WIF*, etc)