Unverified Commit 30dae474 authored by Yukihiro "Matz" Matsumoto's avatar Yukihiro "Matz" Matsumoto Committed by GitHub

Merge pull request #4195 from dearblue/fix-byteorder

Fix byte order
parents 281d0ff4 b7a832bf
...@@ -60,7 +60,8 @@ ...@@ -60,7 +60,8 @@
/* define on big endian machines; used by MRB_NAN_BOXING, etc. */ /* define on big endian machines; used by MRB_NAN_BOXING, etc. */
#ifndef MRB_ENDIAN_BIG #ifndef MRB_ENDIAN_BIG
# if BYTE_ORDER == BIG_ENDIAN # if (defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN) || \
(defined(__BYTE_ORDER__) && defined(__ORDER_BIG_ENDIAN__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__)
# define MRB_ENDIAN_BIG # define MRB_ENDIAN_BIG
# endif # endif
#endif #endif
......
...@@ -64,6 +64,16 @@ const static unsigned char base64chars[] = ...@@ -64,6 +64,16 @@ const static unsigned char base64chars[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
static unsigned char base64_dec_tab[128]; static unsigned char base64_dec_tab[128];
#if !defined(BYTE_ORDER) && defined(__BYTE_ORDER__)
# define BYTE_ORDER __BYTE_ORDER__
#endif
#if !defined(BIG_ENDIAN) && defined(__ORDER_BIG_ENDIAN__)
# define BIG_ENDIAN __ORDER_BIG_ENDIAN__
#endif
#if !defined(LITTLE_ENDIAN) && defined(__ORDER_LITTLE_ENDIAN__)
# define LITTLE_ENDIAN __ORDER_LITTLE_ENDIAN__
#endif
#ifdef BYTE_ORDER #ifdef BYTE_ORDER
# if BYTE_ORDER == BIG_ENDIAN # if BYTE_ORDER == BIG_ENDIAN
# define littleendian 0 # define littleendian 0
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment