Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!rice!sun-spots-request From: poffen@sj.ate.slb.com (Russ Poffenberger) Newsgroups: comp.sys.sun Subject: Re: Sun-3 vs. Sun-4 run-time library differences? Keywords: SunOS Message-ID: <3724@brazos.Rice.edu> Date: 4 Dec 89 01:48:19 GMT Sender: root@rice.edu Organization: Sun-Spots Lines: 30 Approved: Sun-Spots@rice.edu X-Refs: Original: v8n208 X-Sun-Spots-Digest: Volume 8, Issue 215, message 4 of 12 In article <3328@brazos.Rice.edu> malczews@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 . 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@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