Convert x86emu fixed size int typedefs to use stdint types
Fixes x86emu builds when using non-gnu compilers now that u64 is required Before this fix, the u64 type would not be defined, causing x86emu/sys.c to fail to build: "sys.c", line 102: syntax error before or at: ldq_u "sys.c", line 102: syntax error before or at: * Since Keith requested using <stdint.h>, converted all the x86emu typedefs to use the stdint types. Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com> Acked-by: Matt Turner <mattst88@gmail.com> Acked-by: Tiago Vignatti <tiago.vignatti@nokia.com> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
a9fe7cfa77
commit
82cf3a4ae0
|
@ -61,45 +61,21 @@
|
|||
|
||||
/*---------------------- Macros and type definitions ----------------------*/
|
||||
|
||||
/* Currently only for Linux/32bit */
|
||||
#undef __HAS_LONG_LONG__
|
||||
#if defined(__GNUC__) && !defined(NO_LONG_LONG)
|
||||
#define __HAS_LONG_LONG__
|
||||
#endif
|
||||
#include <stdint.h>
|
||||
|
||||
/* Taken from Xmd.h */
|
||||
#undef NUM32
|
||||
#if defined (_LP64) || \
|
||||
defined(__alpha) || defined(__alpha__) || \
|
||||
defined(__ia64__) || defined(ia64) || \
|
||||
defined(__sparc64__) || \
|
||||
defined(__s390x__) || \
|
||||
defined(__hppa__) && defined(__LP64) || \
|
||||
defined(__amd64__) || defined(amd64)
|
||||
#define NUM32 int
|
||||
#else
|
||||
#define NUM32 long
|
||||
#endif
|
||||
typedef uint8_t u8;
|
||||
typedef uint16_t u16;
|
||||
typedef uint32_t u32;
|
||||
typedef uint64_t u64;
|
||||
|
||||
typedef unsigned char u8;
|
||||
typedef unsigned short u16;
|
||||
typedef unsigned NUM32 u32;
|
||||
#ifdef __HAS_LONG_LONG__
|
||||
typedef unsigned long long u64;
|
||||
#endif
|
||||
|
||||
typedef char s8;
|
||||
typedef short s16;
|
||||
typedef NUM32 s32;
|
||||
#ifdef __HAS_LONG_LONG__
|
||||
typedef long long s64;
|
||||
#endif
|
||||
typedef int8_t s8;
|
||||
typedef int16_t s16;
|
||||
typedef int32_t s32;
|
||||
typedef int64_t s64;
|
||||
|
||||
typedef unsigned int uint;
|
||||
typedef int sint;
|
||||
|
||||
typedef u16 X86EMU_pioAddr;
|
||||
|
||||
#undef NUM32
|
||||
|
||||
#endif /* __X86EMU_TYPES_H */
|
||||
|
|
Loading…
Reference in New Issue
Block a user