Module: Mesa Branch: 17.2 Commit: 2186a9ee6b8f6fb9a504637d1470ebc997e023fe URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=2186a9ee6b8f6fb9a504637d1470ebc997e023fe
Author: Matt Turner <matts...@gmail.com> Date: Fri Nov 24 20:25:04 2017 -0800 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.tur...@dronecode.org.uk> Reviewed-by: Matt Turner <matts...@gmail.com> (cherry picked from commit 2c62ccb10a7f3a2962f51688a3ae957254c5ce9b) --- src/util/u_endian.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/util/u_endian.h b/src/util/u_endian.h index b9d563dd43..9e09f80181 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 _______________________________________________ mesa-commit mailing list mesa-commit@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-commit