Add fallback LLONG_MAX and LLONG_MIN defines to strtonum.c
Found during #39.e3fb770d8c7ee0f38b4b5363946d916f57286951
strtonum.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/strtonum.c b/strtonum.c
@@ -29,6 +29,14 @@
#define TOOSMALL 2
#define TOOLARGE 3
+#ifndef LLONG_MAX
+#define LLONG_MAX 0x7fffffffffffffffLL
+#endif
+
+#ifndef LLONG_MIN
+#define LLONG_MIN (-0x7fffffffffffffffLL-1)
+#endif
+
long long
strtonum(const char *numstr, long long minval, long long maxval,
const char **errstrp)