From: Paul Eggert Date: Sun, 7 Apr 2019 18:36:50 +0000 (-0700) Subject: Help the compiler with byte order X-Git-Tag: emacs-27.0.90~3261^2~79 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=74732c541228ebb9f0a15b0a22132a85b32de89b;p=emacs.git Help the compiler with byte order * src/xsettings.c (parse_settings): Help the compiler by letting it deduce the native endianness at compile-time. --- diff --git a/src/xsettings.c b/src/xsettings.c index 0c5e36d9d69..947d5cfb7b6 100644 --- a/src/xsettings.c +++ b/src/xsettings.c @@ -393,8 +393,8 @@ parse_settings (unsigned char *prop, unsigned long bytes, struct xsettings *settings) { - Lisp_Object byteorder = Fbyteorder (); - int my_bo = XFIXNAT (byteorder) == 'B' ? MSBFirst : LSBFirst; + int int1 = 1; + int my_bo = *(char *) &int1 == 1 ? LSBFirst : MSBFirst; int that_bo = prop[0]; CARD32 n_settings; int bytes_parsed = 0;