mirror of
https://github.com/git/git
synced 2024-08-28 12:09:19 +00:00
![Nick Alcock](/assets/img/avatar_default.png)
Since systems that omit strtoumax() will likely omit strtomax() too, and likewise for strtoull() and strtoll(), we arrange for the make variables NO_STRTOUMAX and NO_STRTOULL to cover both the signed and unsigned functions, and define compatibility implementations for them. Signed-off-by: Nick Alcock <nix@esperi.org.uk> Signed-off-by: Junio C Hamano <gitster@pobox.com>
11 lines
214 B
C
11 lines
214 B
C
#include "../git-compat-util.h"
|
|
|
|
intmax_t gitstrtoimax (const char *nptr, char **endptr, int base)
|
|
{
|
|
#if defined(NO_STRTOULL)
|
|
return strtol(nptr, endptr, base);
|
|
#else
|
|
return strtoll(nptr, endptr, base);
|
|
#endif
|
|
}
|