diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-11 02:57:38 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2008-01-11 02:57:38 +0000 |
commit | 82bf2c1ac7e4398e57a102119fdf16beb02a6e24 (patch) | |
tree | e4529beaa43e028fcb8cd7a7c3f02190649e1a34 /include | |
parent | 0521c0e36e68920349a268a04e3690a62d70b59e (diff) | |
download | ruby-82bf2c1ac7e4398e57a102119fdf16beb02a6e24.tar.gz |
* defines.h (WORDS_BIGENDIAN): honor __BIG_ENDIAN__ than the result of
configure.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r-- | include/ruby/defines.h | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/include/ruby/defines.h b/include/ruby/defines.h index c0f2bc7425..00708e1039 100644 --- a/include/ruby/defines.h +++ b/include/ruby/defines.h @@ -110,6 +110,16 @@ void xfree(void*); #endif #endif +#if defined(__NeXT__) || defined(__APPLE__) +/* Do not trust WORDS_BIGENDIAN from configure since -arch compiler flag may + result in a different endian. Instead trust __BIG_ENDIAN__ and + __LITTLE_ENDIAN__ which are set correctly by -arch. */ +#undef WORDS_BIGENDIAN +#ifdef __BIG_ENDIAN__ +#define WORDS_BIGENDIAN +#endif +#endif + #ifdef __NeXT__ /* NextStep, OpenStep, Rhapsody */ #ifndef S_IRUSR @@ -163,13 +173,6 @@ void xfree(void*); #ifndef S_ISREG #define S_ISREG(mode) (((mode) & (0170000)) == (0100000)) #endif -/* Do not trust WORDS_BIGENDIAN from configure since -arch compiler flag may - result in a different endian. Instead trust __BIG_ENDIAN__ and - __LITTLE_ENDIAN__ which are set correctly by -arch. */ -#undef WORDS_BIGENDIAN -#ifdef __BIG_ENDIAN__ -#define WORDS_BIGENDIAN -#endif #ifndef __APPLE__ /* NextStep, OpenStep (but not Rhapsody) */ #ifndef GETPGRP_VOID |