ruby-changes:25536
From: nobu <ko1@a...>
Date: Fri, 9 Nov 2012 23:05:24 +0900 (JST)
Subject: [ruby-changes:25536] nobu:r37593 (trunk): random.c: BYTE_ORDER
nobu 2012-11-09 23:05:11 +0900 (Fri, 09 Nov 2012) New Revision: 37593 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=37593 Log: random.c: BYTE_ORDER * random.c (BYTE_ORDER): define using configured WORDS_BIGENDIAN. Modified files: trunk/ChangeLog trunk/random.c Index: ChangeLog =================================================================== --- ChangeLog (revision 37592) +++ ChangeLog (revision 37593) @@ -1,5 +1,7 @@ -Fri Nov 9 23:02:25 2012 Nobuyoshi Nakada <nobu@r...> +Fri Nov 9 23:05:06 2012 Nobuyoshi Nakada <nobu@r...> + * random.c (BYTE_ORDER): define using configured WORDS_BIGENDIAN. + * siphash.c (sip_init_state): use union to suppress warnings by gcc 4.7. Index: random.c =================================================================== --- random.c (revision 37592) +++ random.c (revision 37593) @@ -1328,6 +1328,19 @@ #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; -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/