Commit b7df4bcc00725d293cc73dba0ded23106b448720
1 parent
c9297f4d
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
Showing
1 changed file
with
1 additions
and
43 deletions
dyngen-exec.h
| ... | ... | @@ -31,57 +31,15 @@ |
| 31 | 31 | point because host CPU registers are used as global variables. Some |
| 32 | 32 | host headers do not allow that. */ |
| 33 | 33 | #include <stddef.h> |
| 34 | +#include <stdint.h> | |
| 34 | 35 | |
| 35 | 36 | #ifdef __OpenBSD__ |
| 36 | 37 | #include <sys/types.h> |
| 37 | -#else | |
| 38 | -typedef unsigned char uint8_t; | |
| 39 | -typedef unsigned short uint16_t; | |
| 40 | -typedef unsigned int uint32_t; | |
| 41 | -// Linux/Sparc64 defines uint64_t | |
| 42 | -#if !(defined (__sparc_v9__) && defined(__linux__)) && !(defined(__APPLE__) && defined(__x86_64__)) | |
| 43 | -/* XXX may be done for all 64 bits targets ? */ | |
| 44 | -#if defined (__x86_64__) || defined(__ia64) || defined(__s390x__) || defined(__alpha__) || defined(_ARCH_PPC64) | |
| 45 | -typedef unsigned long uint64_t; | |
| 46 | -#else | |
| 47 | -typedef unsigned long long uint64_t; | |
| 48 | -#endif | |
| 49 | -#endif | |
| 50 | - | |
| 51 | -/* if Solaris/__sun__, don't typedef int8_t, as it will be typedef'd | |
| 52 | - prior to this and will cause an error in compliation, conflicting | |
| 53 | - with /usr/include/sys/int_types.h, line 75 */ | |
| 54 | -#ifndef __sun__ | |
| 55 | -typedef signed char int8_t; | |
| 56 | -#endif | |
| 57 | -typedef signed short int16_t; | |
| 58 | -typedef signed int int32_t; | |
| 59 | -// Linux/Sparc64 defines int64_t | |
| 60 | -#if !(defined (__sparc_v9__) && defined(__linux__)) && !(defined(__APPLE__) && defined(__x86_64__)) | |
| 61 | -#if defined (__x86_64__) || defined(__ia64) || defined(__s390x__) || defined(__alpha__) || defined(_ARCH_PPC64) | |
| 62 | -typedef signed long int64_t; | |
| 63 | -#else | |
| 64 | -typedef signed long long int64_t; | |
| 65 | -#endif | |
| 66 | -#endif | |
| 67 | 38 | #endif |
| 68 | 39 | |
| 69 | 40 | /* XXX: This may be wrong for 64-bit ILP32 hosts. */ |
| 70 | 41 | typedef void * host_reg_t; |
| 71 | 42 | |
| 72 | -#define INT8_MIN (-128) | |
| 73 | -#define INT16_MIN (-32767-1) | |
| 74 | -#define INT32_MIN (-2147483647-1) | |
| 75 | -#define INT64_MIN (-(int64_t)(9223372036854775807)-1) | |
| 76 | -#define INT8_MAX (127) | |
| 77 | -#define INT16_MAX (32767) | |
| 78 | -#define INT32_MAX (2147483647) | |
| 79 | -#define INT64_MAX ((int64_t)(9223372036854775807)) | |
| 80 | -#define UINT8_MAX (255) | |
| 81 | -#define UINT16_MAX (65535) | |
| 82 | -#define UINT32_MAX (4294967295U) | |
| 83 | -#define UINT64_MAX ((uint64_t)(18446744073709551615)) | |
| 84 | - | |
| 85 | 43 | #ifdef HOST_BSD |
| 86 | 44 | typedef struct __sFILE FILE; |
| 87 | 45 | #else | ... | ... |