[Common] Move the standard types include in to common

This commit is contained in:
zilmar 2015-10-12 06:48:15 +11:00
parent 70532a6503
commit 485613ed03
2 changed files with 20 additions and 17 deletions

19
Source/Common/stdtypes.h Normal file
View File

@ -0,0 +1,19 @@
#pragma once
/*
* Some versions of Microsoft Visual C/++ compilers before Visual Studio 2010
* have <stdint.h> removed in favor of these nonstandard built-in types:
*/
#if defined(_MSC_VER) && (_MSC_VER < 1600)
typedef signed __int8 int8_t;
typedef signed __int16 int16_t;
typedef signed __int32 int32_t;
typedef signed __int64 int64_t;
typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t;
typedef unsigned __int64 uint64_t;
#else
#include <stdint.h>
#endif

View File

@ -10,23 +10,7 @@
****************************************************************************/
#pragma once
/*
* Some versions of Microsoft Visual C/++ compilers before Visual Studio 2010
* have <stdint.h> removed in favor of these nonstandard built-in types:
*/
#if defined(_MSC_VER) && (_MSC_VER < 1600)
typedef signed __int8 int8_t;
typedef signed __int16 int16_t;
typedef signed __int32 int32_t;
typedef signed __int64 int64_t;
typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t;
typedef unsigned __int64 uint64_t;
#else
#include <stdint.h>
#endif
#include <common/stdtypes.h>
/*
* To do: Use fixed-size types for MIPS union members, not WINAPI types.