Author: hbelusca
Date: Mon Mar 31 20:38:05 2014
New Revision: 62594
URL:
http://svn.reactos.org/svn/reactos?rev=62594&view=rev
Log:
[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
Modified:
trunk/reactos/include/host/typedefs.h
trunk/reactos/tools/mkshelllink/mkshelllink.c
Modified: trunk/reactos/include/host/typedefs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/host/typedefs.h?re…
==============================================================================
--- trunk/reactos/include/host/typedefs.h [iso-8859-1] (original)
+++ trunk/reactos/include/host/typedefs.h [iso-8859-1] Mon Mar 31 20:38:05 2014
@@ -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)
Modified: trunk/reactos/tools/mkshelllink/mkshelllink.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkshelllink/mkshelll…
==============================================================================
--- trunk/reactos/tools/mkshelllink/mkshelllink.c [iso-8859-1] (original)
+++ trunk/reactos/tools/mkshelllink/mkshelllink.c [iso-8859-1] Mon Mar 31 20:38:05 2014
@@ -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