diff options
author | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-01-06 04:05:35 +0000 |
---|---|---|
committer | levine <levine@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-01-06 04:05:35 +0000 |
commit | af1c6e12eda6b0ae1c5094c49cbf0d1dd8df096e (patch) | |
tree | 0be02b9609e8c10bb278a187aa8edfe97d19d0be | |
parent | 5a6450b14f34f72608051f106ae0a8261feae9fd (diff) | |
download | ATCD-af1c6e12eda6b0ae1c5094c49cbf0d1dd8df096e.tar.gz |
(ACE_Convert, u_long): use ::strtol and cast the result to an unsigned long on Linux/Alpha
-rw-r--r-- | ace/Env_Value_T.i | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/ace/Env_Value_T.i b/ace/Env_Value_T.i index 397a5614e0f..8b8136fb7d2 100644 --- a/ace/Env_Value_T.i +++ b/ace/Env_Value_T.i @@ -89,7 +89,13 @@ ACE_Convert (const char *s, int &i) ACE_INLINE void ACE_Convert (const char *s, u_long &ul) { +#if defined (linux) && defined (__alpha) + // ::strtoul () appears to be broken on Linux 2.0.30/Alpha: + // it returns 0 for a negative number. + ul = (unsigned long) ACE_OS::strtol (s, 0, 10); +#else /* ! linux || ! __alpha */ ul = ACE_OS::strtoul (s, 0, 10); +#endif /* ! linux || ! __alpha */ } ACE_INLINE void |