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
This commit is contained in:
parent
09406d76c4
commit
2c7a92e1b7
|
@ -18,6 +18,8 @@
|
||||||
#ifndef _COMMON_H
|
#ifndef _COMMON_H
|
||||||
#define _COMMON_H
|
#define _COMMON_H
|
||||||
|
|
||||||
|
#include "CommonTypes.h"
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
@ -49,7 +51,6 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#elif __GNUC__
|
#elif __GNUC__
|
||||||
#define TCHAR char
|
|
||||||
#define POSIX 1
|
#define POSIX 1
|
||||||
#define MAX_PATH 260
|
#define MAX_PATH 260
|
||||||
#define stricmp strcasecmp
|
#define stricmp strcasecmp
|
||||||
|
@ -61,21 +62,9 @@ extern "C" {
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Types
|
// Alignment
|
||||||
|
|
||||||
#ifdef _WIN32
|
#if defined(_MSC_VER)
|
||||||
|
|
||||||
#include <tchar.h>
|
|
||||||
|
|
||||||
typedef unsigned __int64 u64;
|
|
||||||
typedef unsigned __int32 u32;
|
|
||||||
typedef unsigned __int16 u16;
|
|
||||||
typedef unsigned __int8 u8;
|
|
||||||
|
|
||||||
typedef signed __int64 s64;
|
|
||||||
typedef signed __int32 s32;
|
|
||||||
typedef signed __int16 s16;
|
|
||||||
typedef signed __int8 s8;
|
|
||||||
|
|
||||||
#define GC_ALIGNED16(x) __declspec(align(16)) x
|
#define GC_ALIGNED16(x) __declspec(align(16)) x
|
||||||
#define GC_ALIGNED32(x) __declspec(align(32)) x
|
#define GC_ALIGNED32(x) __declspec(align(32)) x
|
||||||
|
@ -85,21 +74,17 @@ typedef signed __int8 s8;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
typedef char s8;
|
#define GC_ALIGNED16(x) __attribute((aligned(16))) x
|
||||||
typedef short s16;
|
#define GC_ALIGNED32(x) __attribute((aligned(16))) x
|
||||||
#define __int16 short
|
#define GC_ALIGNED64(x) __attribute((aligned(64))) x
|
||||||
typedef int s32;
|
#define GC_ALIGNED16_DECL(x) __attribute((aligned(16))) x
|
||||||
#define __int32 int
|
#define GC_ALIGNED64_DECL(x) __attribute((aligned(64))) x
|
||||||
typedef long long s64;
|
|
||||||
#define __int64 long long
|
|
||||||
|
|
||||||
typedef unsigned char u8;
|
#endif
|
||||||
typedef unsigned char BYTE;
|
|
||||||
typedef unsigned short u16;
|
// Various Windows compatibility
|
||||||
typedef unsigned int u32;
|
|
||||||
typedef unsigned int BOOL;
|
#if !defined(_WIN32)
|
||||||
typedef unsigned int DWORD;
|
|
||||||
typedef unsigned long long u64;
|
|
||||||
|
|
||||||
#ifdef __LINUX__
|
#ifdef __LINUX__
|
||||||
typedef union _LARGE_INTEGER
|
typedef union _LARGE_INTEGER
|
||||||
|
@ -108,12 +93,6 @@ typedef union _LARGE_INTEGER
|
||||||
} LARGE_INTEGER;
|
} LARGE_INTEGER;
|
||||||
#endif
|
#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
|
#ifndef __forceinline
|
||||||
#define __forceinline inline
|
#define __forceinline inline
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -0,0 +1,63 @@
|
||||||
|
// Copyright (C) 2003-2008 Dolphin Project.
|
||||||
|
|
||||||
|
// This program is free software: you can redistribute it and/or modify
|
||||||
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
// the Free Software Foundation, version 2.0.
|
||||||
|
|
||||||
|
// This program is distributed in the hope that it will be useful,
|
||||||
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
// GNU General Public License 2.0 for more details.
|
||||||
|
|
||||||
|
// A copy of the GPL 2.0 should have been included with the program.
|
||||||
|
// If not, see http://www.gnu.org/licenses/
|
||||||
|
|
||||||
|
// Official SVN repository and contact information can be found at
|
||||||
|
// http://code.google.com/p/dolphin-emu/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// This header contains type definitions that are shared between the Dolphin
|
||||||
|
// core and the plugin specs. Any definitions that are only used by the core
|
||||||
|
// should be placed in "Common.h" instead.
|
||||||
|
|
||||||
|
#ifndef _COMMONTYPES_H
|
||||||
|
#define _COMMONTYPES_H
|
||||||
|
|
||||||
|
#ifdef _WIN32
|
||||||
|
|
||||||
|
#include <tchar.h>
|
||||||
|
|
||||||
|
typedef unsigned __int8 u8;
|
||||||
|
typedef unsigned __int16 u16;
|
||||||
|
typedef unsigned __int32 u32;
|
||||||
|
typedef unsigned __int64 u64;
|
||||||
|
|
||||||
|
typedef signed __int8 s8;
|
||||||
|
typedef signed __int16 s16;
|
||||||
|
typedef signed __int32 s32;
|
||||||
|
typedef signed __int64 s64;
|
||||||
|
|
||||||
|
#else
|
||||||
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
typedef char s8;
|
||||||
|
typedef short s16;
|
||||||
|
#define __int16 short
|
||||||
|
typedef int s32;
|
||||||
|
#define __int32 int
|
||||||
|
typedef long long s64;
|
||||||
|
#define __int64 long long
|
||||||
|
|
||||||
|
#define TCHAR char
|
||||||
|
|
||||||
|
#endif // _WIN32
|
||||||
|
|
||||||
|
#endif // _COMMONTYPES_H
|
Loading…
Reference in New Issue