about summary refs log tree commit diff
path: root/third_party/git/compat/strtoimax.c
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/git/compat/strtoimax.c')
-rw-r--r--third_party/git/compat/strtoimax.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/third_party/git/compat/strtoimax.c b/third_party/git/compat/strtoimax.c
new file mode 100644
index 000000000000..ac09ed89e710
--- /dev/null
+++ b/third_party/git/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
+}