mirror of
https://github.com/cc65/cc65.git
synced 2024-12-26 08:32:00 +00:00
Use _seterrno instead of assigning to _errno.
git-svn-id: svn://svn.cc65.org/cc65/trunk@4705 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
parent
eac4711731
commit
aa8f817182
@ -71,7 +71,7 @@ long __fastcall__ strtol (const char* nptr, char** endptr, int base)
|
||||
} else if (isupper (*S)) {
|
||||
DigitVal = *S - ('A' - 10);
|
||||
} else if (islower (*S)) {
|
||||
DigitVal = *S - ('a' - 10);
|
||||
DigitVal = *S - ('a' - 10);
|
||||
} else {
|
||||
/* Unknown character */
|
||||
break;
|
||||
@ -110,7 +110,7 @@ long __fastcall__ strtol (const char* nptr, char** endptr, int base)
|
||||
|
||||
/* Handle overflow */
|
||||
if (Ovf) {
|
||||
errno = ERANGE;
|
||||
_seterrno (ERANGE);
|
||||
if (Minus) {
|
||||
return LONG_MIN;
|
||||
} else {
|
||||
|
@ -105,7 +105,7 @@ unsigned long __fastcall__ strtoul (const char* nptr, char** endptr, int base)
|
||||
|
||||
/* Handle overflow */
|
||||
if (Ovf) {
|
||||
errno = ERANGE;
|
||||
_seterrno (ERANGE);
|
||||
return ULONG_MAX;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user