Set compile settiong on MSVC. ".c" files are compliled as C, not C++. (msgpack_vc8.vcproj, CMakeLists.txt)
Fixed msgpack root object initialization problem on MSVC. {} initialization is not supported on MSVC.
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).
https://github.com/msgpack/msgpack-c/pull/20
Removed 'preprocess' from original CMakeLists.txt.
Removed file copy from original CMakeLists.txt.
Removed 'preprocess' from bootstrap.
Removed file copy from bootstrap.
Added erb generated files. Ruby is no longer required.
Moved cases.mpac, cases_compact.mpa, pack_define.h,
pack_template.h, unpack_define.h, unpack_template.h,
and sysdep.h to apropriate location.
If you want to re-generate zone.hpp, define.hpp, and tuple.hpp,
then you execute preprocess.
Projects that use -Wconversion don't compile due to errors in msgpack header
files. This commit fixes all the errors in msgpack-c for when -Wconversion is
enabled.
Now I can even compile msgpack-c itself with -Wconversion and all my projects:
CFLAGS=-Wconversion ./configure
make
```
$ clang --version
Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
Target: x86_64-apple-darwin13.0.0
Thread model: posix
In file included from /Users/drew/Dropbox/Code/caffeine-ios/ext/msgpack/src/msgpack/pack.h:120:
/Users/drew/Dropbox/Code/caffeine-ios/ext/msgpack/src/msgpack/pack_template.h:773:57: warning: implicit conversion loses integer precision: 'size_t' (aka 'unsigned long') to 'unsigned int' [-Wshorten-64-to-32]
msgpack_pack_append_buffer(x, (const unsigned char*)b, l);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~
In file included from /Users/drew/Dropbox/Code/caffeine-ios/ext/msgpack/src/objectc.c:19:
/Users/drew/Dropbox/Code/caffeine-ios/ext/msgpack/src/msgpack/pack.h:118:61: note: expanded from macro 'msgpack_pack_append_buffer'
return (*(user)->callback)((user)->data, (const char*)buf, len)
^
1 warning generated.
```
This patch is provided under the Apache License version 2.