From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,7a610664603944b3 X-Google-Attributes: gid103376,public From: "W. Wesley Groleau x4923" Subject: Re: A SPARC curiosity. Date: 1997/10/30 Message-ID: <3458D766.21@pseserv3.fw.hac.com>#1/1 X-Deja-AN: 286878460 Sender: usenet@most.fw.hac.com (News Administration) X-Nntp-Posting-Host: sparc01 References: <345741D3.2162@pseserv3.fw.hac.com> <3457758D.4BAD@gsfc.nasa.gov> Organization: Hughes Defense Communications Newsgroups: comp.lang.ada Date: 1997-10-30T00:00:00+00:00 List-Id: > W. Wesley Groleau x4923 wrote: > > [ C code which changes its behavior on another CPU without > > re-linking ] > Stephen Leake wrote: > > Does the C code behave the same on the two machines? They seem to have > slightly different versions of the OS. If GNAT is calling the C library > for low-level output, a difference in the two libraries would explain > things. Hmm, that assumes the libraries are dynamically linked; does > SunOS on SPARC do that? That's the whole point. The C code doesn't. To be a little more clear, the code is a non-destructive stack unwind, with a check to jump out when the stack gets outside of the main program. With ONE link, it works right on SunOS 5.5.1 on a SPARC workstation but the same executable file under SunOS 5.5.1 on a SPARC server, exits after reading only the first stack address (and the second stack address, by the way, is in the same C file as the first one). SunOS and Solaris allow dynamic linking, but that is not the issue here. By the way, since C's portability was recently discussed in this newsgroup, someone else tried my code on SunOS 4.1.3. Even though we were both using gcc 2.7.2, he had to make significant changes just to get it to compile. But as soon as it did compile (with no changes to the Ada part), it worked! -- ---------------------------------------------------------------------- Wes Groleau, Hughes Defense Communications, Fort Wayne, IN USA Senior Software Engineer - AFATDS Tool-smith Wanna-be wwgrol AT pseserv3.fw.hac.com Don't send advertisements to this domain unless asked! All disk space on fw.hac.com hosts belongs to either Hughes Defense Communications or the United States government. Using email to store YOUR advertising on them is trespassing! ----------------------------------------------------------------------