comp.lang.ada
 help / color / mirror / Atom feed
From: "W. Wesley Groleau x4923" <wwgrol@pseserv3.fw.hac.com>
Subject: Re: A SPARC curiosity.
Date: 1997/10/30
Date: 1997-10-30T00:00:00+00:00	[thread overview]
Message-ID: <3458D766.21@pseserv3.fw.hac.com> (raw)
In-Reply-To: 3457758D.4BAD@gsfc.nasa.gov


> 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!
----------------------------------------------------------------------




      reply	other threads:[~1997-10-30  0:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-10-29  0:00 A SPARC curiosity W. Wesley Groleau x4923
1997-10-29  0:00 ` Robert S. White
1997-10-29  0:00 ` Stephen Leake
1997-10-30  0:00   ` W. Wesley Groleau x4923 [this message]
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox