Usenet comp.sys.dec (1990-2013)
 help / color / mirror / Atom feed
From: greg@mobius.viewlogic.com (Gregory Larkin)
Subject: Problem with strtol() on ULTRIX 4.2
Date: 8 Feb 93 19:59:43 GMT	[thread overview]
Message-ID: <1993Feb8.195943.23775@viewlogic.com> (raw)


Hi there,

I am having a problem with the way that strtol() works
on a Decstation 5000 running Ultrix 4.2.

On the Sparcstation, strtol() yields these results:

strtol("7fffffff", (char **)NULL, 16) = 2147483647
strtol("80000000", (char **)NULL, 16) = -2147483648
strtol("ffffffff", (char **)NULL, 16) = -1

However, on the Decstation, strtol() cannot yield
negative numbers.

On the Dec:

strtol("7fffffff", (char **)NULL, 16) = 2147483647
strtol("80000000", (char **)NULL, 16) = 2147483647
strtol("ffffffff", (char **)NULL, 16) = 2147483647

Should I be using something other than strtol() on the Dec
to get it to behave like the Sun does?  Is this a 
C library bug on Ultrix?

Thanks for any help!


-- 
              Greg Larkin, Software Engineer, Waveform Analysis
                 Viewlogic Systems, Inc.  Marlboro, MA 01752
                            greg@Viewlogic.COM


             reply	other threads:[~1993-02-08 19:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1993-02-08 19:59 Gregory Larkin [this message]
1993-02-08 23:47 ` Problem with strtol() on ULTRIX 4.2 Alan Watson
read-only archive

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