--- hatari/src/uae-cpu/sysdeps.h 2019/04/01 07:10:06 1.1.1.3 +++ hatari/src/uae-cpu/sysdeps.h 2019/04/01 07:13:48 1.1.1.8 @@ -13,14 +13,15 @@ * * Adaptation to Hatari by Thomas Huth * + * This file is distributed under the GNU Public License, version 2 or at + * your option any later version. Read the file gpl.txt for details. */ -#ifndef UAESYSDEPS -#define UAESYSDEPS +#ifndef UAE_SYSDEPS_H +#define UAE_SYSDEPS_H #include #include -#include #include #include @@ -29,11 +30,7 @@ #endif #include - -#include -#include - -#include +#include #if EEXIST == ENOTEMPTY @@ -84,36 +81,30 @@ extern void* q_memcpy(void*,const void*, /* The variable-types used in the CPU core: */ -/* We're mapping them to the SDL types, I hope this will work on all systems... */ -typedef Uint8 uae_u8; -typedef Sint8 uae_s8; +typedef uint8_t uae_u8; +typedef int8_t uae_s8; -typedef Uint16 uae_u16; -typedef Sint16 uae_s16; +typedef uint16_t uae_u16; +typedef int16_t uae_s16; -typedef Uint32 uae_u32; -typedef Sint32 uae_s32; +typedef uint32_t uae_u32; +typedef int32_t uae_s32; typedef uae_u32 uaecptr; #undef uae_s64 #undef uae_u64 -#if SIZEOF_LONG_LONG == 8 -#define uae_s64 long long -#define uae_u64 long long -#define VAL64(a) (a ## LL) -#define UVAL64(a) (a ## uLL) -#elif SIZEOF___INT64 == 8 -#define uae_s64 __int64 -#define uae_u64 unsigned __int64 -#define VAL64(a) (a) -#define UVAL64(a) (a) -#elif SIZEOF_LONG == 8 -#define uae_s64 long; -#define uae_u64 unsigned long; -#define VAL64(a) (a ## l) -#define UVAL64(a) (a ## ul) +#if defined(INT64_MAX) +# define uae_u64 uint64_t +# define uae_s64 int64_t +# if defined(__GNUC__) || defined(__MWERKS__) || defined(__SUNPRO_C) +# define VAL64(a) (a ## LL) +# define UVAL64(a) (a ## ULL) +# else +# define VAL64(a) (a ## L) +# define UVAL64(a) (a ## UL) +# endif #endif @@ -127,15 +118,15 @@ typedef uae_u32 uaecptr; #define ENUMNAME(name) ; typedef int name #endif - -#if defined USE_COMPILER -#undef NO_PREFETCH_BUFFER -#undef NO_EXCEPTION_3 -#define NO_EXCEPTION_3 -#define NO_PREFETCH_BUFFER +/* When using GNU C, make abort more useful. */ +#ifdef __GNUC__ +#define abort() \ + do { \ + fprintf(stderr, "Internal error; file %s, line %d\n", __FILE__, __LINE__); \ + (abort) (); \ +} while (0) #endif -/*#include "target.h"*/ #ifndef O_BINARY #define O_BINARY 0 @@ -160,4 +151,4 @@ typedef uae_u32 uaecptr; # define REGPARAM2 #endif -#endif /* ifndef UAESYSDEPS */ +#endif /* ifndef UAE_SYSDEPS_H */