diff options
author | Francis Rowe <info@gluglug.org.uk> | 2015-01-11 00:08:24 (EST) |
---|---|---|
committer | Francis Rowe <info@gluglug.org.uk> | 2015-01-12 01:38:40 (EST) |
commit | c44ef19d49c16064bed8964557f102fb58a336e7 (patch) | |
tree | d856eb4b90173a5599ef2027ab0fbe4ed16507c2 /resources/utilities/ich9deblob/src/common/x86compatibility.h | |
parent | 715fe3c8d106e396562abff64977d5e33a043720 (diff) | |
download | libreboot-c44ef19d49c16064bed8964557f102fb58a336e7.zip libreboot-c44ef19d49c16064bed8964557f102fb58a336e7.tar.gz libreboot-c44ef19d49c16064bed8964557f102fb58a336e7.tar.bz2 |
ich9deblob/ich9gen: replace endianness checking function
Diffstat (limited to 'resources/utilities/ich9deblob/src/common/x86compatibility.h')
-rw-r--r-- | resources/utilities/ich9deblob/src/common/x86compatibility.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/resources/utilities/ich9deblob/src/common/x86compatibility.h b/resources/utilities/ich9deblob/src/common/x86compatibility.h index e5f02be..9460b28 100644 --- a/resources/utilities/ich9deblob/src/common/x86compatibility.h +++ b/resources/utilities/ich9deblob/src/common/x86compatibility.h @@ -28,11 +28,13 @@ #include <string.h> #include <stdint.h> +/* http://esr.ibiblio.org/?p=5095 */ +#define IS_BIG_ENDIAN (*(uint16_t *)"\0\xff" < 0x100) + #include "../descriptor/descriptor.h" /* structs describing what's in the descriptor region */ #include "../gbe/gbe.h" /* structs describing what's in the gbe region */ int structSizesIncorrect(struct DESCRIPTORREGIONRECORD descriptorDummy, struct GBEREGIONRECORD_8K gbe8kDummy); -int systemIsBigEndian(); int structMembersWrongOrder(); int structBitfieldWrongOrder(); int systemOrCompilerIncompatible(struct DESCRIPTORREGIONRECORD descriptorStruct, struct GBEREGIONRECORD_8K gbeStruct8k); |