diff options
author | Junio C Hamano <gitster@pobox.com> | 2011-12-28 11:32:33 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2011-12-28 11:32:33 -0800 |
commit | e39888ba21b68888e1db2d989155f23ea78fc842 (patch) | |
tree | 58c214720ef480aa1bbad0d53fd2fa40683346a9 /compat/strtoimax.c | |
parent | Merge branch 'jk/refresh-porcelain-output' into maint (diff) | |
parent | Support sizes >=2G in various config options accepting 'g' sizes. (diff) | |
download | tgif-e39888ba21b68888e1db2d989155f23ea78fc842.tar.xz |
Merge branch 'na/strtoimax' into maint
* 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/strtoimax.c')
-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 +} |