diff options
author | Matt Turner <mattst88@gmail.com> | 2017-11-24 20:25:04 -0800 |
---|---|---|
committer | Andres Gomez <agomez@igalia.com> | 2017-12-20 16:16:47 +0200 |
commit | 2186a9ee6b8f6fb9a504637d1470ebc997e023fe (patch) | |
tree | 7440b77ae9f59f8706bfedce6723e060dd9fad8b | |
parent | 9ca5f5578687bb37dac41b0fd906647f9410c27d (diff) |
util: Assume little endian in the absence of platform-specific handling
(cherry picked from commit 6a353479a7577dcff7c7a31809f27b59270648fb)
Squashed with:
util: Use preprocessor correctly
Fixes: 6a353479a757 ("util: Assume little endian in the absence of
platform-specific handling")
(cherry picked from commit b8cbad624b8198949d63c0211fe4925fc3bb9a7a)
Squashed with:
util: Just give up and define PIPE_ARCH_LITTLE_ENDIAN on MSVC
MSVC doesn't support #warning?! Getting really tired of this.
(cherry picked from commit 676761252b731a6bf408e4dca694c31d74a995fc)
Squashed with:
util: Also include endian.h on cygwin
If u_endian.h can't determine the endianess, the default behaviour in sha1.c
is to build for big-endian
Signed-off-by: Jon Turney <jon.turney@dronecode.org.uk>
Reviewed-by: Matt Turner <mattst88@gmail.com>
(cherry picked from commit 2c62ccb10a7f3a2962f51688a3ae957254c5ce9b)
-rw-r--r-- | src/util/u_endian.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/util/u_endian.h b/src/util/u_endian.h index b9d563dd435..9e09f801812 100644 --- a/src/util/u_endian.h +++ b/src/util/u_endian.h @@ -27,7 +27,7 @@ #ifndef U_ENDIAN_H #define U_ENDIAN_H -#if defined(__GLIBC__) || defined(ANDROID) +#if defined(__GLIBC__) || defined(ANDROID) || defined(__CYGWIN__) #include <endian.h> #if __BYTE_ORDER == __LITTLE_ENDIAN @@ -64,6 +64,10 @@ # define PIPE_ARCH_BIG_ENDIAN #endif +#elif defined(_MSC_VER) + +#define PIPE_ARCH_LITTLE_ENDIAN + #endif #endif |