sharp@cadnetix.COM (06/07/89)
Recently there was a request posted regarding OOPS ported to a Sun4. Our news
has been acting up lately and we somehow missed the conversation.
Anyhow I just started porting the OOPS library to sparc and ran into some
nonportable/bad code in the error facility. I could fairly easily rewrite
the offending code, but my guess is that there are probably numerous other
snags.
Has anyone already ported OOPS to Sun4? (Apologies if this has already been
asked.) Will the new NIH library be available for Sun4, or has it been
'fixed' to be more portable? Or how about OS4 (shared libraries)?
By the way, the offending code that I ran into first is in the file errors.c
in the function: int seterror(int err,int sev ... ) It basically tries to do
the following:
typedef union anyv {
int i;
double d;
} AnyVal;
AnyVal arg;
arg.i = 0;
sprintf(buf, "%d", arg); // Notice that arg is used here, not arg.i or arg.d
// This is an artifact of the way the function is
// implemented.
This works fine on a Sun3 (puts "0" in buf) but on a Sun4 it puts "-134218968"
in buf.
Thanx in advance.
Jim Sharpe (303) 444-8075 x 686
Cadnetix Corporation Internet: sharp@cadnetix.com
5775 Flatiron Pkwy. UUCP: cadnetix!sharp
Boulder, CO 80301 {uunet,boulder,nbires}!cadnetix!sharp