projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e71f1dd
)
Help the compiler with byte order
author
Paul Eggert
<eggert@cs.ucla.edu>
Sun, 7 Apr 2019 18:36:50 +0000
(11:36 -0700)
committer
Paul Eggert
<eggert@cs.ucla.edu>
Sun, 7 Apr 2019 18:44:04 +0000
(11:44 -0700)
* src/xsettings.c (parse_settings): Help the compiler by
letting it deduce the native endianness at compile-time.
src/xsettings.c
patch
|
blob
|
history
diff --git
a/src/xsettings.c
b/src/xsettings.c
index 0c5e36d9d69114f82e6a70697f0a3355901e66d0..947d5cfb7b65f777732e25e97e99090cacd4e8f4 100644
(file)
--- 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 : L
SBFirst;
+
int int1 = 1
;
+ int my_bo =
*(char *) &int1 == 1 ? LSBFirst : M
SBFirst;
int that_bo = prop[0];
CARD32 n_settings;
int bytes_parsed = 0;