oksh-noxz

[fork] Portable OpenBSD ksh, based on the Public Domain Korn Shell (pdksh).
git clone https://noxz.tech/git/oksh-noxz.git
oksh-noxz

commit: e3fb770d8c7ee0f38b4b5363946d916f57286951
parent: c74e56d4050f90a9c7cfb75df873992f67f3a853
author: Brian Callahan <ibara@users.noreply.github.com>
date:   Sat, 28 Mar 2020 17:18:48 -0400
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)