projects
/
oweals
/
musl.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
use rt_sigprocmask, not legacy sigprocmask, syscall in pthread exit code
[oweals/musl.git]
/
src
/
stdlib
/
wcstoll.c
1
#include <wchar.h>
2
#include <stdlib.h>
3
#include <inttypes.h>
4
#include <errno.h>
5
#include <limits.h>
6
7
long long wcstoll(const wchar_t *s, wchar_t **p, int base)
8
{
9
intmax_t x = wcstoimax(s, p, base);
10
if (x > LLONG_MAX) {
11
errno = ERANGE;
12
return LLONG_MAX;
13
} else if (x < LLONG_MIN) {
14
errno = ERANGE;
15
return LLONG_MIN;
16
}
17
return x;
18
}