summaryrefslogtreecommitdiff
path: root/defines.h
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-11-18 23:15:01 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-11-18 23:15:01 +0000
commit3dc5049a49914b8662d5db556d98dc3e6c504ad2 (patch)
tree5784a31ab720c100ea480b405463622c5d97b220 /defines.h
parent12e312c5e4cabb3416b41affde4683a277a26333 (diff)
defines.h: hack for the case sizeof(short) == sizeof(int)
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@3061 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
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 b4a1894..cadf52d 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 */