Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEugene Tarassov2018-08-16 03:07:36 +0000
committerEugene Tarassov2018-08-16 03:07:36 +0000
commit1b1e0bd19ba366249ff671b6d413e8433ad1a1e1 (patch)
tree0ec35e2987695be3f872ae1c54153e917d7d9618
parent50c20916c06e664838c2bee80904ac00ef24eddb (diff)
downloadorg.eclipse.tcf.agent-1b1e0bd19ba366249ff671b6d413e8433ad1a1e1.tar.gz
org.eclipse.tcf.agent-1b1e0bd19ba366249ff671b6d413e8433ad1a1e1.tar.xz
org.eclipse.tcf.agent-1b1e0bd19ba366249ff671b6d413e8433ad1a1e1.zip
TCF Core: include MSVC inttypes.h and stdint.h when available
stdint.h was added in MSVC version 2010 initypes.h was added in MSVC version 2013
-rw-r--r--agent/tcf/framework/mdep.h50
1 files changed, 29 insertions, 21 deletions
diff --git a/agent/tcf/framework/mdep.h b/agent/tcf/framework/mdep.h
index 0f8a7ef4..4ea57f56 100644
--- a/agent/tcf/framework/mdep.h
+++ b/agent/tcf/framework/mdep.h
@@ -50,7 +50,7 @@
# pragma warning(disable:4996) /* 'strcpy': This function or variable may be unsafe */
# if _MSC_VER <= 1500
# pragma warning(disable:4702) /* unreachable code */
-# elif _MSC_VER >= 1900 /* MSVC 2015*/
+# elif _MSC_VER >= 1900 /* MSVC 2015 */
# ifndef _CRT_NO_TIME_T
# define _TIMESPEC_DEFINED
# endif
@@ -83,26 +83,34 @@
#include <io.h>
#if defined(_MSC_VER)
- typedef signed __int8 int8_t;
- typedef unsigned __int8 uint8_t;
- typedef signed __int16 int16_t;
- typedef unsigned __int16 uint16_t;
- typedef signed __int32 int32_t;
- typedef unsigned __int32 uint32_t;
- typedef signed __int64 int64_t;
- typedef unsigned __int64 uint64_t;
- #if defined(_WIN64)
- typedef __int64 ssize_t;
- #elif defined(_WIN32)
- typedef long ssize_t;
- #endif
-# define PRIx32 "I32x"
-# define PRIu64 "I64u"
-# define PRId64 "I64d"
-# define PRIx64 "I64x"
-# define PRIX64 "I64X"
-# define SCNx64 "I64x"
-# define PRIxPTR "Ix"
+# if _MSC_VER >= 1800 /* MSVC 2013 */
+# include <inttypes.h>
+# else
+# if _MSC_VER >= 1600 /* MSVC 2010 */
+# include <stdint.h>
+# else
+ typedef signed __int8 int8_t;
+ typedef unsigned __int8 uint8_t;
+ typedef signed __int16 int16_t;
+ typedef unsigned __int16 uint16_t;
+ typedef signed __int32 int32_t;
+ typedef unsigned __int32 uint32_t;
+ typedef signed __int64 int64_t;
+ typedef unsigned __int64 uint64_t;
+# endif
+# define PRIx32 "I32x"
+# define PRIu64 "I64u"
+# define PRId64 "I64d"
+# define PRIx64 "I64x"
+# define PRIX64 "I64X"
+# define SCNx64 "I64x"
+# define PRIxPTR "Ix"
+# endif
+# if defined(_WIN64)
+ typedef __int64 ssize_t;
+# elif defined(_WIN32)
+ typedef long ssize_t;
+# endif
#else
# include <inttypes.h>
#endif

Back to the top