* Porting code problems
@ 1994-04-07 16:03 Chris Johnson
1994-04-07 16:42 ` System Janitor
1994-04-08 17:50 ` Jeff Carter
0 siblings, 2 replies; 3+ messages in thread
From: Chris Johnson @ 1994-04-07 16:03 UTC (permalink / raw)
We just received an Alpha4000 running OSF 1 v2.0. I'm trying to
port code to it that was originally written for Sys V, ported to Sun OS,
ported again to Ultrix. I'd be VERY interested in talking/e-mailing to
anyone really familiar with ports to OSF 1. I'm finding errors that I
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 <sys/wait.h>
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.
Any body been through these ports?
--
============================================================================
Chris Johnson Internet: johnson@chaos.dac.neu.edu
Assistant Director, Systems BITNET: johnson@nuhub
Division of Academic Computing Voice: 617.373.3300
Northeastern University, 39RI FAX: 617.373.8600
360 Huntington, Ave.
Boston, MA., U.S.A. 02115
============================================================================
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Porting code problems
1994-04-07 16:03 Porting code problems Chris Johnson
@ 1994-04-07 16:42 ` System Janitor
1994-04-08 17:50 ` Jeff Carter
1 sibling, 0 replies; 3+ messages in thread
From: System Janitor @ 1994-04-07 16:42 UTC (permalink / raw)
johnson@chaos.dac.neu.edu (Chris Johnson) writes:
> We just received an Alpha4000 running OSF 1 v2.0. I'm trying to
>port code to it that was originally written for Sys V, ported to Sun OS,
>ported again to Ultrix. I'd be VERY interested in talking/e-mailing to
>anyone really familiar with ports to OSF 1. I'm finding errors that I
>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 <sys/wait.h>
>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.
> Any body been through these ports?
Here's some code segments from ``popper'', specifically from
pop_xmit.c, showing what I did to that code to make it run on OSF.
Maybe you can extrapolate a solutution to your problem from this...
/*union wait stat;*/
unsigned stat;
. . .
/*if (stat.w_retcode)*/
if (stat)
-Mike
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Porting code problems
1994-04-07 16:03 Porting code problems Chris Johnson
1994-04-07 16:42 ` System Janitor
@ 1994-04-08 17:50 ` Jeff Carter
1 sibling, 0 replies; 3+ messages in thread
From: Jeff Carter @ 1994-04-08 17:50 UTC (permalink / raw)
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 <sys/wait.h>
> 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)
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1994-04-08 17:50 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-04-07 16:03 Porting code problems Chris Johnson
1994-04-07 16:42 ` System Janitor
1994-04-08 17:50 ` Jeff Carter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox