tinyrlibc
tinyrlibc copied to clipboard
Set ERRNO in strtol
On success, the function returns the converted integral number as a long int value.
If no valid conversion could be performed, a zero value is returned (0L).
If the value read is out of the range of representable values by a long int, the function returns LONG_MAX or LONG_MIN (defined in [<climits>](https://cplusplus.com/climits)), and [errno](https://cplusplus.com/errno) is set to ERANGE.
Errno should be set to ERANGE when value is out of range. Reimplementing something similar to errno in Newlib might be possible.
Seems like a good idea!