fxlibc/src/libc/inttypes/strtoimax.c

17 lines
377 B
C

#include <inttypes.h>
#include <stdlib.h>
#if __INTMAX_WIDTH__ == __LONG_WIDTH__
# define __strtoimax strtol
#elif __INTMAX_WIDTH__ == __LONG_LONG_WIDTH__
# define __strtoimax strtoll
#else
# error How is intmax_t neither long nor long long?
#endif
intmax_t strtoimax(char const * restrict ptr, char ** restrict endptr,
int base)
{
return __strtoimax(ptr, endptr, base);
}