projects
/
musl
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
fix missing SIG_DFL, SIG_IGN, SIG_ERR without posix in signal.h
[musl]
/
src
/
stdlib
/
strtoll.c
1
#include <stdlib.h>
2
#include <inttypes.h>
3
#include <errno.h>
4
#include <limits.h>
5
6
long long strtoll(const char *s, char **p, int base)
7
{
8
intmax_t x = strtoimax(s, p, base);
9
if (x > LLONG_MAX) {
10
errno = ERANGE;
11
return LLONG_MAX;
12
} else if (x < LLONG_MIN) {
13
errno = ERANGE;
14
return LLONG_MIN;
15
}
16
return x;
17
}