mirror of
https://github.com/fluencelabs/musl
synced 2025-06-25 12:42:02 +00:00
15 lines
263 B
C
15 lines
263 B
C
#include <stdlib.h>
|
|
#include <inttypes.h>
|
|
#include <errno.h>
|
|
#include <limits.h>
|
|
|
|
unsigned long long strtoull(const char *s, char **p, int base)
|
|
{
|
|
uintmax_t x = strtoumax(s, p, base);
|
|
if (x > ULLONG_MAX) {
|
|
errno = ERANGE;
|
|
return ULLONG_MAX;
|
|
}
|
|
return x;
|
|
}
|