From 6278781655261a5011376b2fa2600996e32ca889 Mon Sep 17 00:00:00 2001 From: Eric Andersen Date: Fri, 6 Apr 2001 20:28:45 +0000 Subject: Fix include/errno.h to not use kernel header, and instead use bits/errno.h. This required we use _LIBC instead of __LIBC__ to be consistent with glibc. This had some sideffects in sys/syscalls.h. While fixing things, I made everything use __set_errno() for (eventual) thread support. -Erik --- libc/stdlib/strto_l.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libc/stdlib/strto_l.c') diff --git a/libc/stdlib/strto_l.c b/libc/stdlib/strto_l.c index 16b29f5d6..aed6ef346 100644 --- a/libc/stdlib/strto_l.c +++ b/libc/stdlib/strto_l.c @@ -137,7 +137,7 @@ unsigned long _strto_l(const char *str, char **endptr, int base, int uflag) negative = 0; /* since unsigned returns ULONG_MAX */ } #if _STRTO_ERRNO - errno = ERANGE; + __set_errno(ERANGE); #endif } else { number = number * base + digit; @@ -155,7 +155,7 @@ unsigned long _strto_l(const char *str, char **endptr, int base, int uflag) if (negative) { if (!uflag && (number > ((unsigned long)(-(1+LONG_MIN)))+1)) { #if _STRTO_ERRNO - errno = ERANGE; + __set_errno(ERANGE); #endif return (unsigned long) LONG_MIN; } @@ -163,7 +163,7 @@ unsigned long _strto_l(const char *str, char **endptr, int base, int uflag) } else { if (!uflag && (number > (unsigned long) LONG_MAX)) { #if _STRTO_ERRNO - errno = ERANGE; + __set_errno(ERANGE); #endif return LONG_MAX; } -- cgit v1.2.3