mirror of
https://github.com/reactos/reactos.git
synced 2025-06-10 20:34:59 +00:00
Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys.
This commit is contained in:
parent
b94e2d8ca0
commit
c2c66aff7d
24198 changed files with 0 additions and 37285 deletions
32
sdk/lib/crt/string/strtoul.c
Normal file
32
sdk/lib/crt/string/strtoul.c
Normal file
|
@ -0,0 +1,32 @@
|
|||
#include <precomp.h>
|
||||
|
||||
/* Based on Wine Staging 1.9.9 - dlls/msvcrt/string.c */
|
||||
/******************************************************************
|
||||
* _strtoul_l (MSVCRT.@)
|
||||
*/
|
||||
unsigned long CDECL _strtoul_l(const char* nptr, char** end, int base, _locale_t locale)
|
||||
{
|
||||
__int64 ret = _strtoi64_l(nptr, end, base, locale);
|
||||
|
||||
if(ret > ULONG_MAX) {
|
||||
ret = ULONG_MAX;
|
||||
#ifndef _LIBCNT_
|
||||
*_errno() = ERANGE;
|
||||
#endif
|
||||
}else if(ret < -(__int64)ULONG_MAX) {
|
||||
ret = 1;
|
||||
#ifndef _LIBCNT_
|
||||
*_errno() = ERANGE;
|
||||
#endif
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
/******************************************************************
|
||||
* strtoul (MSVCRT.@)
|
||||
*/
|
||||
unsigned long CDECL strtoul(const char* nptr, char** end, int base)
|
||||
{
|
||||
return _strtoul_l(nptr, end, base, NULL);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue