summaryrefslogtreecommitdiff
path: root/numeric.c
diff options
context:
space:
mode:
authorngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-05 13:28:50 +0000
committerngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2011-08-05 13:28:50 +0000
commit2bd1e021cee59142057d21a2d42cf11bb6edad8a (patch)
treee5c634eeecba65017c6cb37a0a0523b6bb31dea2 /numeric.c
parent1a4d9503c053dfd89464dcb24b3492ced36a334b (diff)
* numeric.c (rb_infinity, rb_nan): use WORDS_BIGENDIAN to get endian.
fix [Bug #5160] [ruby-dev:44356] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_9_3@32863 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r--numeric.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/numeric.c b/numeric.c
index 272bbd1e76..46b2e8cf17 100644
--- a/numeric.c
+++ b/numeric.c
@@ -65,14 +65,14 @@
#endif
#ifdef HAVE_INFINITY
-#elif BYTE_ORDER == LITTLE_ENDIAN
+#elif !defined(WORDS_BIGENDIAN) /* BYTE_ORDER == LITTLE_ENDIAN */
const unsigned char rb_infinity[] = "\x00\x00\x80\x7f";
#else
const unsigned char rb_infinity[] = "\x7f\x80\x00\x00";
#endif
#ifdef HAVE_NAN
-#elif BYTE_ORDER == LITTLE_ENDIAN
+#elif !defined(WORDS_BIGENDIAN) /* BYTE_ORDER == LITTLE_ENDIAN */
const unsigned char rb_nan[] = "\x00\x00\xc0\x7f";
#else
const unsigned char rb_nan[] = "\x7f\xc0\x00\x00";