diff options
author | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-08 22:56:19 +0000 |
---|---|---|
committer | aurel32 <aurel32@c046a42c-6fe2-441c-8c8c-71466251a162> | 2009-04-08 22:56:19 +0000 |
commit | b7df4bcc00725d293cc73dba0ded23106b448720 (patch) | |
tree | 0db3748c4bf5f5c9fae233f76c0d85631daf9b97 | |
parent | c9297f4d1d488bedba02242cc2c532582258c74e (diff) |
Use stdint.h for integral data types and definitions
Signed-off-by: Stefan Weil <weil@mail.berlios.de>
Signed-off-by: Aurelien Jarno <aurelien@aurel32.net>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@7047 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | dyngen-exec.h | 44 |
1 files changed, 1 insertions, 43 deletions
diff --git a/dyngen-exec.h b/dyngen-exec.h index a74164684..c9841df15 100644 --- a/dyngen-exec.h +++ b/dyngen-exec.h @@ -31,57 +31,15 @@ point because host CPU registers are used as global variables. Some host headers do not allow that. */ #include <stddef.h> +#include <stdint.h> #ifdef __OpenBSD__ #include <sys/types.h> -#else -typedef unsigned char uint8_t; -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; -// Linux/Sparc64 defines uint64_t -#if !(defined (__sparc_v9__) && defined(__linux__)) && !(defined(__APPLE__) && defined(__x86_64__)) -/* XXX may be done for all 64 bits targets ? */ -#if defined (__x86_64__) || defined(__ia64) || defined(__s390x__) || defined(__alpha__) || defined(_ARCH_PPC64) -typedef unsigned long uint64_t; -#else -typedef unsigned long long uint64_t; -#endif -#endif - -/* if Solaris/__sun__, don't typedef int8_t, as it will be typedef'd - prior to this and will cause an error in compliation, conflicting - with /usr/include/sys/int_types.h, line 75 */ -#ifndef __sun__ -typedef signed char int8_t; -#endif -typedef signed short int16_t; -typedef signed int int32_t; -// Linux/Sparc64 defines int64_t -#if !(defined (__sparc_v9__) && defined(__linux__)) && !(defined(__APPLE__) && defined(__x86_64__)) -#if defined (__x86_64__) || defined(__ia64) || defined(__s390x__) || defined(__alpha__) || defined(_ARCH_PPC64) -typedef signed long int64_t; -#else -typedef signed long long int64_t; -#endif -#endif #endif /* XXX: This may be wrong for 64-bit ILP32 hosts. */ typedef void * host_reg_t; -#define INT8_MIN (-128) -#define INT16_MIN (-32767-1) -#define INT32_MIN (-2147483647-1) -#define INT64_MIN (-(int64_t)(9223372036854775807)-1) -#define INT8_MAX (127) -#define INT16_MAX (32767) -#define INT32_MAX (2147483647) -#define INT64_MAX ((int64_t)(9223372036854775807)) -#define UINT8_MAX (255) -#define UINT16_MAX (65535) -#define UINT32_MAX (4294967295U) -#define UINT64_MAX ((uint64_t)(18446744073709551615)) - #ifdef HOST_BSD typedef struct __sFILE FILE; #else |