From cdd9226791365a0eeefc95cbf2fb28151d51052b Mon Sep 17 00:00:00 2001 From: Stefan Ring Date: Tue, 13 Oct 2009 19:28:02 +0200 Subject: [PATCH] * src/vm/types.h: Saner defines for internal types (s1, u1, s4, u4, s8, ...) --- src/vm/types.h | 46 ++++++++++++++-------------------------------- 1 file changed, 14 insertions(+), 32 deletions(-) diff --git a/src/vm/types.h b/src/vm/types.h index 8282b082e..3a775bfe0 100644 --- a/src/vm/types.h +++ b/src/vm/types.h @@ -1,9 +1,7 @@ /* src/vm/types.h - type definitions for CACAO's internal types - Copyright (C) 1996-2005, 2006 R. Grafl, A. Krall, C. Kruegel, - C. Oates, R. Obermaisser, M. Platter, M. Probst, S. Ring, - E. Steiner, C. Thalinger, D. Thuernbeck, P. Tomsich, C. Ullrich, - J. Wenninger, Institut f. Computersprachen - TU Wien + Copyright (C) 1996-2005, 2006, 2007, 2008, 2009 + CACAOVM - Verein zur Foerderung der freien virtuellen Maschine CACAO This file is part of CACAO. @@ -22,13 +20,6 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - Contact: cacao@cacaojvm.org - - Authors: Reinhard Grafl - Andreas Krall - - Changes: Christian Thalinger - */ @@ -37,39 +28,30 @@ #include "config.h" +#include + /* In this file we check for unknown pointersizes, so we don't have to do this somewhere else. */ /* Define the sizes of the integer types used internally by CACAO. ************/ -typedef signed char s1; -typedef unsigned char u1; - -typedef signed short int s2; -typedef unsigned short int u2; +typedef int8_t s1; +typedef uint8_t u1; + +typedef int16_t s2; +typedef uint16_t u2; -typedef signed int s4; -typedef unsigned int u4; +typedef int32_t s4; +typedef uint32_t u4; -#if SIZEOF_VOID_P == 8 -typedef signed long int s8; -typedef unsigned long int u8; -#elif SIZEOF_VOID_P == 4 -typedef signed long long int s8; -typedef unsigned long long int u8; -#else -#error unknown pointer size -#endif +typedef int64_t s8; +typedef uint64_t u8; /* Define the size of a function pointer used in function pointer casts. ******/ -#if SIZEOF_VOID_P == 8 -typedef u8 ptrint; -#else -typedef u4 ptrint; -#endif +typedef uintptr_t ptrint; #endif /* _CACAO_TYPES_H */ -- 2.25.1