summaryrefslogtreecommitdiff
path: root/defines.h
diff options
context:
space:
mode:
Diffstat (limited to 'defines.h')
-rw-r--r--defines.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/defines.h b/defines.h
index b4a1894d71..cadf52dcf6 100644
--- a/defines.h
+++ b/defines.h
@@ -74,11 +74,16 @@ void xfree _((void*));
# define SIZEOF_BDIGITS SIZEOF_INT
# define BDIGIT_DBL unsigned long
# define BDIGIT_DBL_SIGNED long
-#else
+#elif SIZEOF_SHORT*2 <= SIZEOF_LONG
# define BDIGIT unsigned short
# define SIZEOF_BDIGITS SIZEOF_SHORT
# define BDIGIT_DBL unsigned long
# define BDIGIT_DBL_SIGNED long
+#else
+# define BDIGIT unsigned short
+# define SIZEOF_BDIGITS (SIZEOF_LONG/2)
+# define BDIGIT_DBL unsigned long
+# define BDIGIT_DBL_SIGNED long
#endif
/* define RUBY_USE_EUC/SJIS for default kanji-code */