mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-03-19 04:52:59 +01:00
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).
This commit is contained in:
parent
f185284776
commit
e0c40c1c59
@ -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"
|
||||
|
Loading…
x
Reference in New Issue
Block a user