[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH] rombios: remove sdtint.h dependency



Hardcode uint8_t, uint16_t and uint32_t typedefs, so we no longer need
stdint.h

Resolves problem reported by Wang Zhihao on 64bit Ubuntu systems:

make -C tcgbios all
make[10]: Entering directory
`/home/gdunlap/hg/open-source/xen-upstream.hg/tools/firmware/rombios/32bit/tcgbios'
gcc   -O1 -fno-omit-frame-pointer -m32 -march=i686 -g
-fno-strict-aliasing -std=gnu99 -Wall -Wstrict-prototypes
-Wdeclaration-after-statement -Wno-unused-but-set-variable
-D__XEN_TOOLS__ -MMD -MF .tcgbios.o.d  -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE -fno-optimize-sibling-calls
-mno-tls-direct-seg-refs -Werror -fno-stack-protector -fno-exceptions
-fno-builtin -msoft-float
-I/home/gdunlap/hg/open-source/xen-upstream.hg/tools/firmware/rombios/32bit/tcgbios/../../../../../tools/include
-I.. -I../..  -c -o tcgbios.o tcgbios.c
In file included from /usr/include/stdint.h:26:0,
                 from
/usr/lib/gcc/x86_64-linux-gnu/4.6.1/include/stdint.h:3,
                 from ../rombios_compat.h:8,
                 from tcgbios.c:24:
/usr/include/features.h:323:26: fatal error: bits/predefs.h: No such
file or directory
compilation terminated.

Signed-off-by: Roger Pau Monne <roger.pau@xxxxxxxxxx>
---
 tools/firmware/rombios/32bit/rombios_compat.h |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/tools/firmware/rombios/32bit/rombios_compat.h 
b/tools/firmware/rombios/32bit/rombios_compat.h
index f33e3e7..c0ae415 100644
--- a/tools/firmware/rombios/32bit/rombios_compat.h
+++ b/tools/firmware/rombios/32bit/rombios_compat.h
@@ -5,10 +5,13 @@
  * Compatibility functions and structures for transitioning between
  * 16 bit Bochs BIOS and 32 bit BIOS code.
  */
-#include <stdint.h>
 
 #define ADDR_FROM_SEG_OFF(seg, off)  (void *)((((uint32_t)(seg)) << 4) + (off))
 
+typedef unsigned char uint8_t;
+typedef unsigned short int uint16_t;
+typedef unsigned int uint32_t;
+
 typedef uint8_t  Bit8u;
 typedef uint16_t Bit16u;
 typedef uint32_t Bit32u;
-- 
1.7.7.5 (Apple Git-26)


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.