summaryrefslogtreecommitdiff
path: root/src/xsettings.c
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2019-04-07 11:36:50 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2019-04-07 11:44:04 -0700
commit74732c541228ebb9f0a15b0a22132a85b32de89b (patch)
tree539d9d41444c02250667474becf3a1dcb9c86abf /src/xsettings.c
parente71f1dda1f80feb319d4ce5a69e14d36ec59adfd (diff)
downloademacs-74732c541228ebb9f0a15b0a22132a85b32de89b.tar.gz
Help the compiler with byte order
* src/xsettings.c (parse_settings): Help the compiler by letting it deduce the native endianness at compile-time.
Diffstat (limited to 'src/xsettings.c')
-rw-r--r--src/xsettings.c4
1 files changed, 2 insertions, 2 deletions
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;