summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--template/limits.c.tmpl3
1 files changed, 3 insertions, 0 deletions
diff --git a/template/limits.c.tmpl b/template/limits.c.tmpl
index fc95e0b307..f4ecaf62f9 100644
--- a/template/limits.c.tmpl
+++ b/template/limits.c.tmpl
@@ -58,6 +58,9 @@ Init_limits(void)
rb_define_const(rb_define_module("RbConfig"), "Limits", h);
#ifdef HAVE_LONG_LONG
+#ifndef ULLONG_MAX
+#define ULLONG_MAX ((unsigned LONG_LONG)LLONG_MAX*2+1)
+#endif
#define MAX2NUM(name) ULL2NUM(name ## _MAX)
#define MIN2NUM(name) LL2NUM(name ## _MIN)
#else