projects
/
musl
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
fix syslog (corrected SIGPIPE blocking, and using dgram instead of stream)
[musl]
/
src
/
stdlib
/
strtoul.c
1
#include <stdlib.h>
2
#include <inttypes.h>
3
#include <errno.h>
4
#include <limits.h>
5
6
unsigned long strtoul(const char *s, char **p, int base)
7
{
8
uintmax_t x = strtoumax(s, p, base);
9
if (x > ULONG_MAX) {
10
errno = ERANGE;
11
return ULONG_MAX;
12
}
13
return x;
14
}