summaryrefslogtreecommitdiffstats
path: root/ext
diff options
context:
space:
mode:
authorknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-06 10:49:05 +0000
committerknu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-08-06 10:49:05 +0000
commit873e877a4a709f786ceccf87c92444296786e554 (patch)
treea59f4464ecb0ccf8a03be7df1e5e702e73a9fa1e /ext
parent3ca8a17b2cf605f303914f1a286b277dc3dfdffc (diff)
downloadruby-873e877a4a709f786ceccf87c92444296786e554.tar.gz
ruby-873e877a4a709f786ceccf87c92444296786e554.tar.xz
ruby-873e877a4a709f786ceccf87c92444296786e554.zip
* ext/digest/sha2/sha2.h (BYTE_ORDER): Define BYTE_ORDER as
necessary. [ruby-dev:39029] git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@24426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/digest/sha2/sha2.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/ext/digest/sha2/sha2.h b/ext/digest/sha2/sha2.h
index 30df8f07c..3536b3133 100644
--- a/ext/digest/sha2/sha2.h
+++ b/ext/digest/sha2/sha2.h
@@ -54,7 +54,16 @@ extern "C" {
# undef NOPROTO
# else
# define NOPROTO
-# endif
+# endif /* HAVE_PROTOTYPES */
+# ifndef BYTE_ORDER
+# define LITTLE_ENDIAN 1234
+# define BIG_ENDIAN 4321
+# ifdef WORDS_BIGENDIAN
+# define BYTE_ORDER BIG_ENDIAN
+# else
+# define BYTE_ORDER LITTLE_ENDIAN
+# endif
+# endif /* BYTE_ORDER */
# define SHA2_USE_INTTYPES_H
#else /* RUBY */
#ifdef SHA2_USE_INTTYPES_H