Sun-3 vs. Sun-4 run-time library differences?
Russ Poffenberger
poffen at sj.ate.slb.com
Mon Dec 4 12:48:19 AEST 1989
In article <3328 at brazos.Rice.edu> malczews at aludra.usc.edu writes:
>X-Sun-Spots-Digest: Volume 8, Issue 208, message 15 of 19
>
>I was wondering whether there might be differences between the run-time
>librares distributed with the Sun-3 and Sun-4 workstations (e.g.,
>different parameter requirements, different numbers of parameters, etc).
>
>Similarly, might there be any other differences of which one need be aware?
>
>(I'm pretty new to the unix realm, so any help/pointers would be appreciated.)
Besides the obvious distinction that the two libraries are different
binary code, the two differences I am aware of are alloca() and varargs.
If you use alloca(), then on a Sun-4, you MUST #include <alloca.h>. This
is because alloca() does not exist in the library on a Sun-4, it is kind
of a wierd built-in thing. Of course, for good protability, you should
include alloca.h regardless of architecture (there is a #ifdef sparc in
the module so it is a do-nothing on Sun-3).
The other thing to watch out for is the use of varargs. YOU MUST use
varargs.h and do everything as exactly described in varargs.h. Again this
is a built-in type of thing on a Sun-4 and it is critical that you do
thing correctly or it WILL crash.
Russ Poffenberger DOMAIN: poffen at sj.ate.slb.com
Schlumberger Technologies UUCP: {uunet,decwrl,amdahl}!sjsca4!poffen
1601 Technology Drive CIS: 72401,276
San Jose, Ca. 95110
(408)437-5254
More information about the Comp.sys.sun
mailing list