From 3c6d19015006515dffa1bb79a5ff0575fa899bfe Mon Sep 17 00:00:00 2001 From: Magnus Olsen Date: Sat, 30 Jun 2007 14:12:10 +0000 Subject: [PATCH] accpect pacth in bug 2314, with one smaller change the msvcrt20.def change was not accpect, it need more time for review. and we do not support __set_error in libcntpr. the patch are base on current strtoul, the strtoull are the long long version of strtoul. so he took current stroul and adpate it to long long. and also add missing error code. patch are done by Pierre Schweitzer email heis_spiter at hotmail.com See issue #2314 for more details. svn path=/trunk/; revision=27344 --- reactos/dll/ntdll/def/ntdll.def | 1 + reactos/dll/win32/crtdll/crtdll.def | 1 + reactos/dll/win32/msvcrt/msvcrt.def | 1 + reactos/lib/sdk/libcntpr/libcntpr.rbuild | 1 + reactos/lib/sdk/libcntpr/string/strtoul.c | 4 ++++ 5 files changed, 8 insertions(+) diff --git a/reactos/dll/ntdll/def/ntdll.def b/reactos/dll/ntdll/def/ntdll.def index 233d8f9dc32..b565636186d 100644 --- a/reactos/dll/ntdll/def/ntdll.def +++ b/reactos/dll/ntdll/def/ntdll.def @@ -1065,6 +1065,7 @@ strspn strstr strtol strtoul +strtoull swprintf tan tolower diff --git a/reactos/dll/win32/crtdll/crtdll.def b/reactos/dll/win32/crtdll/crtdll.def index d463c84eddb..a9690a3ff60 100644 --- a/reactos/dll/win32/crtdll/crtdll.def +++ b/reactos/dll/win32/crtdll/crtdll.def @@ -523,6 +523,7 @@ strtod strtok strtol=NTDLL.strtol strtoul +strtoull strxfrm swprintf=crt_swprintf swscanf diff --git a/reactos/dll/win32/msvcrt/msvcrt.def b/reactos/dll/win32/msvcrt/msvcrt.def index 8a53d6ef681..659ba94564b 100644 --- a/reactos/dll/win32/msvcrt/msvcrt.def +++ b/reactos/dll/win32/msvcrt/msvcrt.def @@ -797,6 +797,7 @@ strtod strtok strtol=NTDLL.strtol strtoul +strtoull strxfrm swprintf=crt_swprintf swscanf diff --git a/reactos/lib/sdk/libcntpr/libcntpr.rbuild b/reactos/lib/sdk/libcntpr/libcntpr.rbuild index a03c9403d5a..b8f79ea2d0d 100644 --- a/reactos/lib/sdk/libcntpr/libcntpr.rbuild +++ b/reactos/lib/sdk/libcntpr/libcntpr.rbuild @@ -137,6 +137,7 @@ splitp.c strtol.c strtoul.c + strtoull.c wcstol.c wcstombs.c wcstoul.c diff --git a/reactos/lib/sdk/libcntpr/string/strtoul.c b/reactos/lib/sdk/libcntpr/string/strtoul.c index 3ff15e66230..fcd735485e2 100644 --- a/reactos/lib/sdk/libcntpr/string/strtoul.c +++ b/reactos/lib/sdk/libcntpr/string/strtoul.c @@ -1,7 +1,10 @@ +#include #include +#include #include #include + /* * Convert a string to an unsigned long integer. * @@ -64,6 +67,7 @@ strtoul(const char *nptr, char **endptr, int base) if (any < 0) { acc = ULONG_MAX; + } else if (neg) acc = -acc;