summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorMaarten ter Huurne <maarten@treewalker.org>2008-08-31 13:54:25 +0000
committerMaarten ter Huurne <maarten@treewalker.org>2008-08-31 13:54:25 +0000
commit2c7a92e1b7d30ef8a7792513df8a244454f45f45 (patch)
tree9bd6ea8172130f6687c30d062392560aa04643f8 /Source/Core
parent09406d76c44d3a8efb1932b8d7f1345ae0e4c604 (diff)
Split off type definitions from "Common.h" into new header "CommonTypes.h". This is a preparation for sharing the type definitions between the Dolphin core and the plugin specs.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@405 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Common/Src/Common.h51
1 files changed, 15 insertions, 36 deletions
diff --git a/Source/Core/Common/Src/Common.h b/Source/Core/Common/Src/Common.h
index 4be304a763..f1e2749569 100644
--- a/Source/Core/Common/Src/Common.h
+++ b/Source/Core/Common/Src/Common.h
@@ -18,6 +18,8 @@
#ifndef _COMMON_H
#define _COMMON_H
+#include "CommonTypes.h"
+
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
@@ -49,7 +51,6 @@ extern "C" {
#endif
#elif __GNUC__
-#define TCHAR char
#define POSIX 1
#define MAX_PATH 260
#define stricmp strcasecmp
@@ -61,21 +62,9 @@ extern "C" {
#endif
#endif
-// Types
-
-#ifdef _WIN32
-
-#include <tchar.h>
-
-typedef unsigned __int64 u64;
-typedef unsigned __int32 u32;
-typedef unsigned __int16 u16;
-typedef unsigned __int8 u8;
+// Alignment
-typedef signed __int64 s64;
-typedef signed __int32 s32;
-typedef signed __int16 s16;
-typedef signed __int8 s8;
+#if defined(_MSC_VER)
#define GC_ALIGNED16(x) __declspec(align(16)) x
#define GC_ALIGNED32(x) __declspec(align(32)) x
@@ -85,21 +74,17 @@ typedef signed __int8 s8;
#else
-typedef char s8;
-typedef short s16;
-#define __int16 short
-typedef int s32;
-#define __int32 int
-typedef long long s64;
-#define __int64 long long
-
-typedef unsigned char u8;
-typedef unsigned char BYTE;
-typedef unsigned short u16;
-typedef unsigned int u32;
-typedef unsigned int BOOL;
-typedef unsigned int DWORD;
-typedef unsigned long long u64;
+#define GC_ALIGNED16(x) __attribute((aligned(16))) x
+#define GC_ALIGNED32(x) __attribute((aligned(16))) x
+#define GC_ALIGNED64(x) __attribute((aligned(64))) x
+#define GC_ALIGNED16_DECL(x) __attribute((aligned(16))) x
+#define GC_ALIGNED64_DECL(x) __attribute((aligned(64))) x
+
+#endif
+
+// Various Windows compatibility
+
+#if !defined(_WIN32)
#ifdef __LINUX__
typedef union _LARGE_INTEGER
@@ -108,12 +93,6 @@ typedef union _LARGE_INTEGER
} LARGE_INTEGER;
#endif
-#define GC_ALIGNED16(x) __attribute((aligned(16))) x
-#define GC_ALIGNED32(x) __attribute((aligned(16))) x
-#define GC_ALIGNED64(x) __attribute((aligned(64))) x
-#define GC_ALIGNED16_DECL(x) __attribute((aligned(16))) x
-#define GC_ALIGNED64_DECL(x) __attribute((aligned(64))) x
-
#ifndef __forceinline
#define __forceinline inline
#endif