[HOST-TOOLS]

For host-tools, including stdint.h when using MSVC is not reliable, so use a tried-&-tested solution (see mkshelllink & geninf tools): include stdint.h if we don't use MSVC, otherwise define just what's needed.
Another solution would be to create a include/host/stdint.h which does this same job, and in the host-tools, include this file.
CORE-8023

svn path=/trunk/; revision=62594
This commit is contained in:
Hermès Bélusca-Maïto
2014-03-31 20:38:05 +00:00
parent 059daa9d85
commit 68f7270ce5
2 changed files with 15 additions and 1 deletions
+13
View File
@@ -13,7 +13,20 @@
#include <assert.h>
#include <stdlib.h>
#include <limits.h>
#ifndef _MSC_VER
#include <stdint.h>
#else
typedef __int8 int8_t;
typedef __int16 int16_t;
typedef __int32 int32_t;
typedef __int64 int64_t;
typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t;
typedef unsigned __int64 uint64_t;
#endif
/* Function attributes for GCC */
#if !defined(_MSC_VER) && !defined(__fastcall)
+2 -1
View File
@@ -9,10 +9,11 @@
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#ifndef _MSC_VER
#include <stdint.h>
#else
typedef unsigned __int8 uint8_t;
typedef unsigned __int8 uint8_t;
typedef unsigned __int16 uint16_t;
typedef unsigned __int32 uint32_t;
#endif