diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-12-05 15:12:49 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-12-05 15:12:49 -0800 |
commit | 5d6c53bb230b20b4bec8fb462df0031a14f4c995 (patch) | |
tree | 9ea377e5b79271600f277130a89bbe0f18980912 /compat | |
parent | e72c1dd3bd3b6b2255707136348628a99d3b74a5 (diff) | |
parent | ebaa1bd407745c4b4c1c0f20c322929fc4371467 (diff) | |
download | git-5d6c53bb230b20b4bec8fb462df0031a14f4c995.tar.gz |
Merge branch 'na/strtoimax'
* na/strtoimax:
Support sizes >=2G in various config options accepting 'g' sizes.
Compatibility: declare strtoimax() under NO_STRTOUMAX
Add strtoimax() compatibility function.
Diffstat (limited to 'compat')
-rw-r--r-- | compat/strtoimax.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/compat/strtoimax.c b/compat/strtoimax.c new file mode 100644 index 0000000000..ac09ed89e7 --- /dev/null +++ b/compat/strtoimax.c @@ -0,0 +1,10 @@ +#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 +} |