Missing defines for LLONG_MAX and LLONG_MIN

Some systems may not yet have defined LLONG_MAX and LLONG_MIN in
limits.h, in particular older GLIBC installs are affected.

Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
This commit is contained in:
Joachim Nilsson committed 2018-02-28 10:43:08 +01:00
1 parent 261cf3a01b
commit 34f23a77f8
1 file changed
+9
+9
View File
@@ -26,6 +26,15 @@
#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)