From 90e59b27042831a8156b39783e8fd7c687675f0f Mon Sep 17 00:00:00 2001 From: Sacha Date: Mon, 25 Aug 2014 16:16:34 +1000 Subject: [PATCH] Clean up the type defines in pcsx2. The non-stdint fallback was not even working which shows that it was never used. No supported platform would not have stdint anyway. Remove unused code and do not restrict types to Linux and MSVC. Was there a reason for this? --- common/include/Pcsx2Types.h | 39 ++---------------------- plugins/CDVDisoEFP/src/PS2Etypes.h | 6 ---- plugins/zerogs/opengl/common/PS2Etypes.h | 4 --- 3 files changed, 2 insertions(+), 47 deletions(-) diff --git a/common/include/Pcsx2Types.h b/common/include/Pcsx2Types.h index 03d74de68d..e42888dd74 100644 --- a/common/include/Pcsx2Types.h +++ b/common/include/Pcsx2Types.h @@ -50,17 +50,11 @@ typedef unsigned int uint; #else // _MSC_VER*/ -#ifdef __linux__ - -#ifdef HAVE_STDINT_H #include "stdint.h" -// note: char and int8_t are not interchangable types on gcc, because int8_t apparently -// maps to 'signed char' which (due to 1's compliment or something) is its own unique -// type. This creates cross-compiler inconsistencies, in addition to being entirely -// unexpected behavior to any sane programmer, so we typecast s8 to char instead. :) +// Note: char does not have a default sign, unlike other types. As we actually want +// char and not signed char in pcsx2, we define s8 to char -//typedef int8_t s8; typedef char s8; typedef int16_t s16; typedef int32_t s32; @@ -74,41 +68,12 @@ typedef uint64_t u64; typedef uintptr_t uptr; typedef intptr_t sptr; -#else // HAVE_STDINT_H - -typedef char s8; -typedef short s16; -typedef int s32; -typedef long long s64; - -typedef unsigned char u8; -typedef unsigned short u16; -typedef unsigned int u32; -typedef unsigned long long u64; - -#endif // HAVE_STDINT_H - typedef unsigned int uint; #define LONG long -typedef union _LARGE_INTEGER -{ - long long QuadPart; -} LARGE_INTEGER; -#endif // __linux__ #endif //_MSC_VER -#if !defined(__linux__) || !defined(HAVE_STDINT_H) -#if defined(__x86_64__) -typedef u64 uptr; -typedef s64 sptr; -#else -typedef u32 uptr; -typedef s32 sptr; -#endif -#endif - // -------------------------------------------------------------------------------------- // u128 / s128 - A rough-and-ready cross platform 128-bit datatype, Non-SSE style. // -------------------------------------------------------------------------------------- diff --git a/plugins/CDVDisoEFP/src/PS2Etypes.h b/plugins/CDVDisoEFP/src/PS2Etypes.h index 0e9b999aea..60b42c14a2 100644 --- a/plugins/CDVDisoEFP/src/PS2Etypes.h +++ b/plugins/CDVDisoEFP/src/PS2Etypes.h @@ -35,12 +35,6 @@ typedef u64 uptr; #else typedef u32 uptr; #endif -#ifdef __linux__ -typedef union _LARGE_INTEGER -{ - long long QuadPart; -} LARGE_INTEGER; -#endif #if defined(__MINGW32__) #define PCSX2_ALIGNED16(x) __declspec(align(16)) x #else diff --git a/plugins/zerogs/opengl/common/PS2Etypes.h b/plugins/zerogs/opengl/common/PS2Etypes.h index b1226e333d..1d9d8d2b92 100644 --- a/plugins/zerogs/opengl/common/PS2Etypes.h +++ b/plugins/zerogs/opengl/common/PS2Etypes.h @@ -105,10 +105,6 @@ typedef unsigned long long u64; typedef unsigned int uint; #define LONG long -typedef union _LARGE_INTEGER -{ - long long QuadPart; -} LARGE_INTEGER; #define __fastcall __attribute__((fastcall)) #define __unused __attribute__((unused))