Merge branch 'tbeu-fix-bool-and-inline-for-C-compilation-with-MSVC'

This commit is contained in:
Takatoshi Kondo 2014-07-02 17:44:18 +09:00
commit 9fc8ec5b61
5 changed files with 15 additions and 85 deletions

View File

@ -99,10 +99,6 @@ IF (MSGPACK_ENABLE_CXX)
) )
ENDIF () ENDIF ()
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
SET_SOURCE_FILES_PROPERTIES(${msgpack_SOURCES} PROPERTIES LANGUAGE CXX)
ENDIF ()
EXECUTE_PROCESS ( EXECUTE_PROCESS (
COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/src/msgpack COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_CURRENT_BINARY_DIR}/src/msgpack
) )

View File

@ -159,102 +159,22 @@
<File <File
RelativePath=".\src\objectc.c" RelativePath=".\src\objectc.c"
> >
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
CompileAs="2"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
CompileAs="2"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\src\unpack.c" RelativePath=".\src\unpack.c"
> >
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
CompileAs="2"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
CompileAs="2"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\src\version.c" RelativePath=".\src\version.c"
> >
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
CompileAs="2"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
CompileAs="2"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\src\vrefbuffer.c" RelativePath=".\src\vrefbuffer.c"
> >
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
CompileAs="2"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
CompileAs="2"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\src\zone.c" RelativePath=".\src\zone.c"
> >
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
CompileAs="2"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
CompileAs="2"
/>
</FileConfiguration>
</File> </File>
<File <File
RelativePath=".\src\object.cpp" RelativePath=".\src\object.cpp"

View File

@ -20,6 +20,7 @@
* @{ * @{
* @} * @}
*/ */
#include "msgpack/object.h" #include "msgpack/object.h"
#include "msgpack/zone.h" #include "msgpack/zone.h"
#include "msgpack/pack.h" #include "msgpack/pack.h"

View File

@ -191,5 +191,18 @@ typedef unsigned int _msgpack_atomic_counter_t;
*/ */
#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
#endif /* msgpack/sysdep.h */ #endif /* msgpack/sysdep.h */

View File

@ -56,7 +56,7 @@ static int template_execute(template_context* ctx,
static inline msgpack_object template_callback_root(unpack_user* u) static inline msgpack_object template_callback_root(unpack_user* u)
{ msgpack_object o = {}; return o; } { msgpack_object o = { MSGPACK_OBJECT_NIL }; return o; }
static inline int template_callback_uint8(unpack_user* u, uint8_t d, msgpack_object* o) static inline int template_callback_uint8(unpack_user* u, uint8_t d, msgpack_object* o)
{ o->type = MSGPACK_OBJECT_POSITIVE_INTEGER; o->via.u64 = d; return 0; } { o->type = MSGPACK_OBJECT_POSITIVE_INTEGER; o->via.u64 = d; return 0; }