diff options
author | Matthias Hopf <mhopf@suse.de> | 2010-05-07 17:21:38 +0200 |
---|---|---|
committer | Matthias Hopf <mhopf@suse.de> | 2010-05-07 17:21:38 +0200 |
commit | c65fba32727749ff0e3c5e5f860951bf3f428bbc (patch) | |
tree | 1b5ce6a748b8d382ecc1a3a88e49c0f20fc8e41b | |
parent | b56bcf9388c9a784a296a2f0951cbed60f9de39c (diff) |
Set endian information for including newer atombios.h
-rw-r--r-- | Makefile | 4 | ||||
-rw-r--r-- | atombios_rev.h | 10 | ||||
-rw-r--r-- | main.c | 2 |
3 files changed, 13 insertions, 3 deletions
@@ -1,4 +1,4 @@ -CFLAGS = -O0 -g3 -Wall +CFLAGS = -O0 -g3 -Wall -Wno-unknown-pragmas SRC = main.c datastructs.c indices.c CC = gcc @@ -42,7 +42,7 @@ $(SRC:.c=.d): datastructs_gen.c # Special Flags + Dependencies -datastructs.o: CFLAGS += -Wno-unused -Wno-unknown-pragmas +datastructs.o: CFLAGS += -Wno-unused _always_: @true diff --git a/atombios_rev.h b/atombios_rev.h index f233685..ed7fd22 100644 --- a/atombios_rev.h +++ b/atombios_rev.h @@ -3,6 +3,16 @@ * Plus addon information for dynamic data tables. */ +#include <endian.h> + +#if __BYTE_ORDER == __LITTLE_ENDIAN +#define ATOM_BIG_ENDIAN 0 +#define ATOM_LITTLE_ENDIAN 1 +#elif __BYTE_ORDER == __BIG_ENDIAN +#define ATOM_BIG_ENDIAN 1 +#define ATOM_LITTLE_ENDIAN 0 +#endif + /* * Dynamic data tables: * Modify table sizes and offset positions by replacing access code @@ -26,7 +26,7 @@ #include "atombios_consts.h" //include "atombios_tables.h" -#include "atombios.h" /* FIXME: make it possible without */ +#include "atombios_rev.h" #define MMAP_SIZE (1024*1024) |