From e0c40c1c59014ffd193ee7cad44aae624103018a Mon Sep 17 00:00:00 2001 From: tbeu Date: Mon, 23 Jun 2014 15:44:31 +0200 Subject: [PATCH] fix type bool and inline specifier For a pure C compilation with MSVC type bool is not available. Not tested with other targets (Mingw, cygwin). Thats why only active of ```_MSC_VER``` is defined. So not sure if the bool fix should be also applied to other targets. For MSVC the inline specifier is not valid and must be named __inline (or _inline). --- src/msgpack.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/msgpack.h b/src/msgpack.h index 08f27688..40cc3e9f 100644 --- a/src/msgpack.h +++ b/src/msgpack.h @@ -20,6 +20,19 @@ * @{ * @} */ +#if !defined(__cplusplus) && defined(_MSC_VER) +#if !defined(FALSE) +#define FALSE (0) +#endif +#if !defined(TRUE) +#define TRUE (!FALSE) +#endif +#define bool int +#define true TRUE +#define false FALSE +#define inline __inline +#endif + #include "msgpack/object.h" #include "msgpack/zone.h" #include "msgpack/pack.h"