Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!cs.utexas.edu!uunet!cadnetix.COM!sharp From: sharp@cadnetix.COM Newsgroups: comp.lang.c++ Subject: OOPS on sparc?? Message-ID: <8326@cadnetix.COM> Date: 7 Jun 89 16:30:20 GMT Sender: news@cadnetix.COM Reply-To: sharp@cadnetix.COM () Organization: Cadnetix Corp., Boulder, CO Lines: 39 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