diff options
| author | ngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-05 13:28:50 +0000 |
|---|---|---|
| committer | ngoto <ngoto@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2011-08-05 13:28:50 +0000 |
| commit | 2bd1e021cee59142057d21a2d42cf11bb6edad8a (patch) | |
| tree | e5c634eeecba65017c6cb37a0a0523b6bb31dea2 | |
| parent | 1a4d9503c053dfd89464dcb24b3492ced36a334b (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
| -rw-r--r-- | ChangeLog | 5 | ||||
| -rw-r--r-- | numeric.c | 4 |
2 files changed, 7 insertions, 2 deletions
@@ -1,3 +1,8 @@ +Fri Aug 5 22:16:20 2011 Naohisa Goto <ngotogenome@gmail.com> + + * numeric.c (rb_infinity, rb_nan): use WORDS_BIGENDIAN to get endian. + fix [Bug #5160] [ruby-dev:44356] + Fri Aug 5 15:57:10 2011 Naohisa Goto <ngotogenome@gmail.com> * complex.c (f_signbit): fix compile error in gcc4 on Solaris with @@ -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"; |
