diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-09 14:05:11 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-11-09 14:05:11 +0000 |
commit | 2ce1fbeb59dd0a125d56f2500b0dba1a56380da0 (patch) | |
tree | f58cd5c28ce2e74d8e795e18097bf8e973db7581 /random.c | |
parent | 1d2ddae1607b32d5183a9d9cdd0ccf57127e3dc3 (diff) | |
download | ruby-2ce1fbeb59dd0a125d56f2500b0dba1a56380da0.tar.gz |
random.c: BYTE_ORDER
* random.c (BYTE_ORDER): define using configured WORDS_BIGENDIAN.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37593 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'random.c')
-rw-r--r-- | random.c | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -1328,6 +1328,19 @@ random_s_rand(int argc, VALUE *argv, VALUE obj) #define SIP_HASH_STREAMING 0 #define sip_hash24 ruby_sip_hash24 +#if !defined _WIN32 && !defined BYTE_ORDER +# ifdef WORDS_BIGENDIAN +# define BYTE_ORDER BIG_ENDIAN +# else +# define BYTE_ORDER LITTLE_ENDIAN +# endif +# ifndef LITTLE_ENDIAN +# define LITTLE_ENDIAN 1234 +# endif +# ifndef BIG_ENDIAN +# define BIG_ENDIAN 4321 +# endif +#endif #include "siphash.c" static st_index_t hashseed; |