blob: e39faafe10b35f5cefa695faae381bb9b3079392 (
plain) (
tree)
|
|
#include <wchar.h>
#include <stdlib.h>
#include <inttypes.h>
#include <errno.h>
#include <limits.h>
unsigned long wcstoul(const wchar_t *s, wchar_t **p, int base)
{
uintmax_t x = wcstoumax(s, p, base);
if (x > ULONG_MAX) {
errno = ERANGE;
return ULONG_MAX;
}
return x;
}
|