mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-21 07:45:02 +02:00
Compare commits
183 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
29b9505cb7 | ||
![]() |
e07d774004 | ||
![]() |
ff77227e10 | ||
![]() |
de99222801 | ||
![]() |
7cdc5b88e3 | ||
![]() |
fbdf16db09 | ||
![]() |
41b2af8884 | ||
![]() |
9389912eaf | ||
![]() |
d5242a7d8c | ||
![]() |
d3fecce359 | ||
![]() |
7a70d74971 | ||
![]() |
fcf89fe901 | ||
![]() |
ec8c0bc1c1 | ||
![]() |
a2f3689865 | ||
![]() |
2d54c0e918 | ||
![]() |
ce088e7e0a | ||
![]() |
a1b86507da | ||
![]() |
9235d1acae | ||
![]() |
12172e7dc7 | ||
![]() |
6a08446b3d | ||
![]() |
c93a42b5f4 | ||
![]() |
8febbfd9f5 | ||
![]() |
33a8d8c30f | ||
![]() |
ef5bcadd95 | ||
![]() |
fadc615f4e | ||
![]() |
eff6f5a2fd | ||
![]() |
ed30252bdc | ||
![]() |
2deed25da0 | ||
![]() |
419877cf3a | ||
![]() |
17267ed475 | ||
![]() |
b759f5bdf7 | ||
![]() |
f72372314e | ||
![]() |
530561eec0 | ||
![]() |
aec88c06a0 | ||
![]() |
09e06a8cb7 | ||
![]() |
084db3fcf1 | ||
![]() |
709d6f4fdd | ||
![]() |
27cf578e8c | ||
![]() |
7001679959 | ||
![]() |
daa78b4606 | ||
![]() |
b893f7750c | ||
![]() |
8792f42f8d | ||
![]() |
4f9ec65713 | ||
![]() |
db54c78ed4 | ||
![]() |
1155babda8 | ||
![]() |
83a82e3eb5 | ||
![]() |
aa9c73352c | ||
![]() |
df9e003b35 | ||
![]() |
f6ddc9b85a | ||
![]() |
11cfeeec92 | ||
![]() |
d72765870a | ||
![]() |
349c133171 | ||
![]() |
c056026dad | ||
![]() |
0421dabc1e | ||
![]() |
60930f4b12 | ||
![]() |
b3dfe28be4 | ||
![]() |
e703d8a2f7 | ||
![]() |
801f61c12c | ||
![]() |
a3e75a0709 | ||
![]() |
92d34cbd79 | ||
![]() |
c99fd62ae6 | ||
![]() |
a3986b3bdc | ||
![]() |
7fed49e6fe | ||
![]() |
005e06e00a | ||
![]() |
b6d4bb5cb0 | ||
![]() |
f57bfd998b | ||
![]() |
e8d3387a04 | ||
![]() |
53d2ea9ad3 | ||
![]() |
b6803a5fec | ||
![]() |
210d3ce390 | ||
![]() |
a350e0714e | ||
![]() |
72757feae4 | ||
![]() |
fe2346efa1 | ||
![]() |
43ae287be3 | ||
![]() |
b804e12dec | ||
![]() |
99c221ad01 | ||
![]() |
3a615bcf44 | ||
![]() |
87863c1696 | ||
![]() |
45defd565a | ||
![]() |
f1726cef0d | ||
![]() |
8a788f3a48 | ||
![]() |
7710868556 | ||
![]() |
0b53833856 | ||
![]() |
43c643bab6 | ||
![]() |
ac64fcace8 | ||
![]() |
84ba0c7b4b | ||
![]() |
f79606d9ff | ||
![]() |
3aaadb9b12 | ||
![]() |
8a3a11f123 | ||
![]() |
32f1f0edf2 | ||
![]() |
5bd75905cb | ||
![]() |
eebdc007a9 | ||
![]() |
3aae588a6a | ||
![]() |
cb2dcb19b9 | ||
![]() |
c58a565366 | ||
![]() |
93b944eec4 | ||
![]() |
7340f1e9c8 | ||
![]() |
0a65c443a2 | ||
![]() |
bae6a8db57 | ||
![]() |
ddb320197a | ||
![]() |
dc51f6493b | ||
![]() |
c027909acc | ||
![]() |
2bd56533fa | ||
![]() |
c07452a7a2 | ||
![]() |
8701aeec30 | ||
![]() |
2c4f2b890e | ||
![]() |
f1acd78e54 | ||
![]() |
49d22b7d28 | ||
![]() |
96133c8dd9 | ||
![]() |
bd18a36dae | ||
![]() |
3fe630769e | ||
![]() |
2f80758889 | ||
![]() |
9f3efe9e54 | ||
![]() |
6e44edf290 | ||
![]() |
d28cbf32b9 | ||
![]() |
48d226e97c | ||
![]() |
64698e8e8c | ||
![]() |
e0d098641c | ||
![]() |
06f4b05487 | ||
![]() |
122fce5aee | ||
![]() |
e3f5281903 | ||
![]() |
88e94e3776 | ||
![]() |
95275ff16e | ||
![]() |
4cb938ed18 | ||
![]() |
5f3e62461e | ||
![]() |
ec239933db | ||
![]() |
de59b393c7 | ||
![]() |
b02371efe5 | ||
![]() |
f34289fdfd | ||
![]() |
584478a4f1 | ||
![]() |
700ec688f7 | ||
![]() |
a133c1d393 | ||
![]() |
6ba9a58648 | ||
![]() |
bb92d326c8 | ||
![]() |
1e13dadf1f | ||
![]() |
7b271c2af2 | ||
![]() |
c3f4e52bdb | ||
![]() |
458b4c0363 | ||
![]() |
f8dc0f0d04 | ||
![]() |
347658cdc1 | ||
![]() |
427a6e7313 | ||
![]() |
7f76a3caf0 | ||
![]() |
40539727e6 | ||
![]() |
30e56d0a45 | ||
![]() |
8eef2a245b | ||
![]() |
2bcfe2fdb0 | ||
![]() |
2b49e62b3c | ||
![]() |
bf70a36a1d | ||
![]() |
eb92058cf4 | ||
![]() |
423eaf25fb | ||
![]() |
280abe852c | ||
![]() |
c91307aaa1 | ||
![]() |
88ffd08087 | ||
![]() |
bd337129c6 | ||
![]() |
1f5cb86366 | ||
![]() |
0d39c577d8 | ||
![]() |
7e66dc28f0 | ||
![]() |
bec47a59f0 | ||
![]() |
064f854ddf | ||
![]() |
a05d92ae85 | ||
![]() |
1fdfde5d5f | ||
![]() |
b1620f1f6a | ||
![]() |
f789635ddc | ||
![]() |
f65c26e280 | ||
![]() |
579212996f | ||
![]() |
208595b262 | ||
![]() |
83a4b89818 | ||
![]() |
d46f220737 | ||
![]() |
b4db293181 | ||
![]() |
d1eac600e9 | ||
![]() |
7e758ca053 | ||
![]() |
db6d4f2003 | ||
![]() |
1ba46a30ce | ||
![]() |
5ece2ef2c7 | ||
![]() |
9513734040 | ||
![]() |
d452625ed1 | ||
![]() |
b02c6beb4d | ||
![]() |
06c2896def | ||
![]() |
724db8ed89 | ||
![]() |
fa48078a52 | ||
![]() |
d8ad85fa8c | ||
![]() |
cc3b895449 | ||
![]() |
384242e5eb |
117
.travis.yml
117
.travis.yml
@@ -1,5 +1,6 @@
|
||||
language: cpp
|
||||
sudo: false
|
||||
dist: trusty
|
||||
|
||||
install:
|
||||
- export BASE=`pwd`
|
||||
@@ -9,8 +10,9 @@ install:
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then ./cmake-3.7.1-Linux-x86_64.sh --prefix=${BASE}/usr --skip-license; fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then export PATH="${BASE}/usr/bin:$PATH"; fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then export LD_LIBRARY_PATH="${BASE}/usr/lib:$LD_LIBRARY_PATH"; fi
|
||||
- if [ "$CXX" = "g++" ]; then export CXX="g++-6" CC="gcc-6"; fi
|
||||
- if [ "$CXX" = "clang++" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then export CXX="clang++-3.9" CC="clang-3.9"; fi
|
||||
- if [ "$CXX" == "g++" ]; then export CXX="g++-7" CC="gcc-7"; fi
|
||||
- if [ "$CXX" == "clang++" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then export CXX="clang++-5.0" CC="clang-5.0"; fi
|
||||
- if [ "$CXX" == "g++" ] && [ "$TRAVIS_OS_NAME" == "linux" ]; then cd /usr/include/c++/$(g++ -v 2>&1 | grep version | awk '{print $3}')/bits; ln -s ../ext/atomicity.h .; cd ${BASE}/usr; fi
|
||||
#gtest
|
||||
- wget https://github.com/google/googletest/archive/release-1.7.0.zip -O googletest-release-1.7.0.zip
|
||||
- unzip -q googletest-release-1.7.0.zip
|
||||
@@ -25,21 +27,23 @@ install:
|
||||
- mv *.a ${BASE}/usr/lib
|
||||
- cd ..
|
||||
# valgrind
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then wget http://valgrind.org/downloads/valgrind-3.12.0.tar.bz2 && tar xjf valgrind-3.12.0.tar.bz2 && cd valgrind-3.12.0 && ./configure --prefix=${BASE}/usr > /dev/null && make -j3 > /dev/null && make install > /dev/null && cd ..; fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ] && [ "$MSGPACK_FUZZ_REGRESSION" != "ON" ]; then wget http://valgrind.org/downloads/valgrind-3.12.0.tar.bz2 && tar xjf valgrind-3.12.0.tar.bz2 && cd valgrind-3.12.0 && ./configure --prefix=${BASE}/usr > /dev/null && make -j3 > /dev/null && make install > /dev/null && cd ..; fi
|
||||
# boost
|
||||
- if [ "$BOOST" == "ON" ]; then wget http://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.zip && unzip -q boost_1_63_0.zip && cd boost_1_63_0 && ./bootstrap.sh && ./b2 -j3 --prefix=${BASE}/usr --with-chrono --with-context --with-system --with-timer address-model=${ARCH} install > /dev/null && cd ..; fi
|
||||
- if [ "$BOOST" == "ON" ] && [ "MSGPACK_FUZZ_REGRESSION" != "ON" ]; then wget http://sourceforge.net/projects/boost/files/boost/1.67.0/boost_1_67_0.zip && unzip -q boost_1_67_0.zip && cd boost_1_67_0 && ./bootstrap.sh && ./b2 -j3 --prefix=${BASE}/usr --with-chrono --with-context --with-system --with-timer address-model=${ARCH} install > /dev/null && cd ..; fi
|
||||
- if [ "$MSGPACK_FUZZ_REGRESSION" == "ON" ]; then wget http://sourceforge.net/projects/boost/files/boost/1.67.0/boost_1_67_0.zip && unzip -q boost_1_67_0.zip && cd boost_1_67_0 && ./bootstrap.sh --with-toolset=clang && ./b2 clean && ./b2 -j$(nproc) --prefix=${BASE}/usr --with-system --with-filesystem address-model=${ARCH} install > /dev/null && cd ..; fi
|
||||
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo ln -s /usr/include/x86_64-linux-gnu/zconf.h /usr/include; fi
|
||||
|
||||
matrix:
|
||||
include:
|
||||
- os: osx
|
||||
compiler: clang
|
||||
env: ACTION="ci/build_cmake.sh" CXX11="ON" ARCH="64" BOOST="ON" SHARED="ON" CHAR_SIGN="unsigned" API_VERSION="1"
|
||||
env: ACTION="ci/build_cmake.sh" CXX17="ON" ARCH="64" BOOST="ON" SHARED="ON" CHAR_SIGN="unsigned" API_VERSION="1"
|
||||
- os: osx
|
||||
compiler: clang
|
||||
env: ACTION="ci/build_cmake.sh" CXX11="ON" ARCH="64" BOOST="ON" SHARED="ON" CHAR_SIGN="signed" API_VERSION="2"
|
||||
env: ACTION="ci/build_cmake.sh" CXX17="ON" ARCH="64" BOOST="ON" SHARED="ON" CHAR_SIGN="signed" API_VERSION="3"
|
||||
- os: osx
|
||||
compiler: clang
|
||||
env: ACTION="ci/build_cmake.sh" CXX11="ON" ARCH="64" SHARED="ON" CHAR_SIGN="signed" API_VERSION="2"
|
||||
env: ACTION="ci/build_cmake.sh" CXX17="ON" ARCH="64" SHARED="ON" CHAR_SIGN="signed" API_VERSION="2"
|
||||
- os: osx
|
||||
compiler: clang
|
||||
env: ACTION="ci/build_cmake.sh" ARCH="64" SHARED="ON" CHAR_SIGN="unsigned" API_VERSION="2"
|
||||
@@ -50,15 +54,14 @@ matrix:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-precise-3.9
|
||||
- llvm-toolchain-precise
|
||||
- llvm-toolchain-trusty-5.0
|
||||
packages:
|
||||
- g++-multilib
|
||||
- gcc-multilib
|
||||
- gcc-5-multilib
|
||||
- g++-5-multilib
|
||||
- gcc-7-multilib
|
||||
- g++-7-multilib
|
||||
- bzip2
|
||||
- clang-3.9
|
||||
- clang-5.0
|
||||
- libc6-dbg
|
||||
- os: linux
|
||||
compiler: clang
|
||||
@@ -67,61 +70,60 @@ matrix:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-precise-3.9
|
||||
- llvm-toolchain-precise
|
||||
- llvm-toolchain-trusty-5.0
|
||||
packages:
|
||||
- g++-multilib
|
||||
- gcc-multilib
|
||||
- gcc-5-multilib
|
||||
- g++-5-multilib
|
||||
- gcc-7-multilib
|
||||
- g++-7-multilib
|
||||
- lib32stdc++6-6-dbg
|
||||
- lib32gcc1
|
||||
- libc6-i386
|
||||
- lib32z1-dev
|
||||
- zlib1g-dev
|
||||
- bzip2
|
||||
- clang-3.9
|
||||
- clang-5.0
|
||||
- libc6-dbg
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env: ACTION="ci/build_cmake.sh" CXX11="ON" ARCH="64" BOOST="ON" SHARED="ON" CHAR_SIGN="signed" API_VERSION="2" X3_PARSE="ON"
|
||||
env: ACTION="ci/build_cmake.sh" CXX17="ON" ARCH="64" BOOST="ON" SHARED="ON" CHAR_SIGN="signed" API_VERSION="3" X3_PARSE="ON"
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-precise-3.9
|
||||
- llvm-toolchain-precise
|
||||
- llvm-toolchain-trusty-5.0
|
||||
packages:
|
||||
- g++-multilib
|
||||
- gcc-multilib
|
||||
- gcc-5-multilib
|
||||
- g++-5-multilib
|
||||
- gcc-7-multilib
|
||||
- g++-7-multilib
|
||||
- bzip2
|
||||
- clang-3.9
|
||||
- clang-5.0
|
||||
- libc6-dbg
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env: ACTION="ci/build_cmake.sh" CXX11="ON" ARCH="32" SHARED="OFF" CHAR_SIGN="unsigned" API_VERSION="2"
|
||||
env: ACTION="ci/build_cmake.sh" CXX17="ON" ARCH="32" SHARED="OFF" CHAR_SIGN="unsigned" API_VERSION="2"
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-precise-3.9
|
||||
- llvm-toolchain-precise
|
||||
- llvm-toolchain-trusty-5.0
|
||||
packages:
|
||||
- g++-multilib
|
||||
- gcc-multilib
|
||||
- gcc-5-multilib
|
||||
- g++-5-multilib
|
||||
- gcc-7-multilib
|
||||
- g++-7-multilib
|
||||
- lib32stdc++6-6-dbg
|
||||
- lib32gcc1
|
||||
- libc6-i386
|
||||
- lib32z1-dev
|
||||
- zlib1g-dev
|
||||
- bzip2
|
||||
- clang-3.9
|
||||
- clang-5.0
|
||||
- libc6-dbg
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
env: ACTION="ci/build_cmake.sh" CXX11="ON" ARCH="64" SHARED="ON" CHAR_SIGN="signed" API_VERSION="2"
|
||||
env: ACTION="ci/build_cmake.sh" CXX17="ON" ARCH="64" SHARED="ON" CHAR_SIGN="signed" API_VERSION="2"
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
@@ -129,13 +131,13 @@ matrix:
|
||||
packages:
|
||||
- g++-multilib
|
||||
- gcc-multilib
|
||||
- gcc-6-multilib
|
||||
- g++-6-multilib
|
||||
- gcc-7-multilib
|
||||
- g++-7-multilib
|
||||
- bzip2
|
||||
- libc6-dbg
|
||||
- os: linux
|
||||
compiler: gcc
|
||||
env: ACTION="ci/build_cmake.sh" CXX11="ON" ARCH="32" BOOST="ON" SHARED="ON" CHAR_SIGN="unsigned" API_VERSION="2" X3_PARSE="ON"
|
||||
env: ACTION="ci/build_cmake.sh" CXX17="ON" ARCH="32" BOOST="ON" SHARED="ON" CHAR_SIGN="unsigned" API_VERSION="3" X3_PARSE="ON"
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
@@ -143,12 +145,13 @@ matrix:
|
||||
packages:
|
||||
- g++-multilib
|
||||
- gcc-multilib
|
||||
- gcc-6-multilib
|
||||
- g++-6-multilib
|
||||
- gcc-7-multilib
|
||||
- g++-7-multilib
|
||||
- lib32stdc++6-6-dbg
|
||||
- lib32gcc1
|
||||
- libc6-i386
|
||||
- lib32z1-dev
|
||||
- zlib1g-dev
|
||||
- bzip2
|
||||
- libc6-dbg
|
||||
- os: linux
|
||||
@@ -161,8 +164,8 @@ matrix:
|
||||
packages:
|
||||
- g++-multilib
|
||||
- gcc-multilib
|
||||
- gcc-6-multilib
|
||||
- g++-6-multilib
|
||||
- gcc-7-multilib
|
||||
- g++-7-multilib
|
||||
- bzip2
|
||||
- libc6-dbg
|
||||
- os: linux
|
||||
@@ -175,12 +178,13 @@ matrix:
|
||||
packages:
|
||||
- g++-multilib
|
||||
- gcc-multilib
|
||||
- gcc-6-multilib
|
||||
- g++-6-multilib
|
||||
- gcc-7-multilib
|
||||
- g++-7-multilib
|
||||
- lib32stdc++6-6-dbg
|
||||
- lib32gcc1
|
||||
- libc6-i386
|
||||
- lib32z1-dev
|
||||
- zlib1g-dev
|
||||
- bzip2
|
||||
- libc6-dbg
|
||||
- os: linux
|
||||
@@ -193,14 +197,43 @@ matrix:
|
||||
packages:
|
||||
- g++-multilib
|
||||
- gcc-multilib
|
||||
- gcc-6-multilib
|
||||
- g++-6-multilib
|
||||
- gcc-7-multilib
|
||||
- g++-7-multilib
|
||||
- lib32stdc++6-6-dbg
|
||||
- lib32gcc1
|
||||
- libc6-i386
|
||||
- lib32z1-dev
|
||||
- zlib1g-dev
|
||||
- bzip2
|
||||
- libc6-dbg
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env: ACTION="ci/build_regression.sh" ARCH="64" SAN="UBSAN" MSGPACK_FUZZ_REGRESSION="ON"
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-5.0
|
||||
packages:
|
||||
- bzip2
|
||||
- clang-5.0
|
||||
script:
|
||||
- CMAKE_CXX_COMPILER="${CXX}" CMAKE_C_COMPILER="${CC}" CMAKE_LIBRARY_PATH="${BASE}" GTEST_ROOT="${BASE}/gtest" BOOST_ROOT="${BASE}/boost" CTEST_OUTPUT_ON_FAILURE=1 MSGPACK_SAN="${SAN}" ci/build_regression.sh
|
||||
- os: linux
|
||||
compiler: clang
|
||||
env: ACTION="ci/build_regression.sh" ARCH="64" SAN="ASAN" MSGPACK_FUZZ_REGRESSION="ON"
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
- llvm-toolchain-trusty-5.0
|
||||
packages:
|
||||
- bzip2
|
||||
- clang-5.0
|
||||
script:
|
||||
- CMAKE_CXX_COMPILER="${CXX}" CMAKE_C_COMPILER="${CC}" CMAKE_LIBRARY_PATH="${BASE}" GTEST_ROOT="${BASE}/gtest" BOOST_ROOT="${BASE}/boost" CTEST_OUTPUT_ON_FAILURE=1 MSGPACK_SAN="${SAN}" ci/build_regression.sh
|
||||
|
||||
|
||||
script:
|
||||
- CMAKE_CXX_COMPILER="${CXX}" CMAKE_C_COMPILER="${CC}" CMAKE_LIBRARY_PATH="${BASE}/usr/lib:${BASE}/build" GTEST_ROOT="${BASE}/usr" BOOST_ROOT="${BASE}/usr" ${ACTION}
|
||||
- CMAKE_CXX_COMPILER="${CXX}" CMAKE_C_COMPILER="${CC}" CMAKE_LIBRARY_PATH="${BASE}/usr/lib:${BASE}/build" GTEST_ROOT="${BASE}/usr" BOOST_ROOT="${BASE}/usr" CFLAGS="-Werror -g" CXXFLAGS="-Werror -g" ${ACTION}
|
||||
- cat Files.cmake| grep ".*\.[h|hpp]" | perl -pe 's/ //g' | sort > tmp1 && find include -name "*.h" -o -name "*.hpp" | sort > tmp2 && diff tmp1 tmp2
|
||||
|
61
CHANGELOG.md
61
CHANGELOG.md
@@ -1,3 +1,64 @@
|
||||
# 2019-05-27 version 3.2.0
|
||||
|
||||
* Fix invalid include (#783)
|
||||
* Add timespec support (#781)
|
||||
* Fix unchecked fnprintf on C (#780)
|
||||
* Improve integer overflow checking on C (#776)
|
||||
* Fix warnings on `-Wconversion` (#770, #777, #784)
|
||||
* Fix invalid passed by value on aligned_zone_size_visitor (#764)
|
||||
* Improve windows support (#757, #779)
|
||||
* Fix msgpack::object size caluclation error (#754)
|
||||
* Fix memory error on example code (#753)
|
||||
* Fix redundant memory allocation on C (#747)
|
||||
* Fix msgpack::type::tuple base class conversion (#743)
|
||||
|
||||
# 2018-09-09 version 3.1.1
|
||||
|
||||
* Add force endian set functionality (#736)
|
||||
* Fix vrefbuffer memory management problem (#733)
|
||||
* Fix msvc specific problem (#731, #732)
|
||||
* Update boost from 1.61.0 to 1.68.0 (#730)
|
||||
* Fix msgpack_timestamp type mismatch bug (#726)
|
||||
|
||||
# 2018-08-10 version 3.1.0
|
||||
|
||||
* Improve documents (#687, #718)
|
||||
* Add fuzzer support (#689)
|
||||
* Fix msgpack::object union member access bug (#694)
|
||||
* Improve cross platform configuration (#704)
|
||||
* Fix out of range dereference bug of EXT (#705)
|
||||
* Add timestamp support. std::chrono::system_clock::time_point is mapped to TIMESTAMP (#706)
|
||||
* Add minimal timestamp support for C. The type `msgpack_timestamp` and the function `msgpack_object_to_timestamp()` are introduced (#707)
|
||||
* Improve MSGPACK_DEFINE family name confliction probability (#710)
|
||||
* Add no static-library build option (BUILD_SHARED_LIBS=ON) (#713, #717, #722)
|
||||
* Add header only cmake target (#721)
|
||||
* Add `std::byte` adaptor (#719)
|
||||
* Remove some warnings (#720)
|
||||
|
||||
# 2018-05-12 version 3.0.1
|
||||
|
||||
* Add fuzz directory to release tar ball (#686)
|
||||
* Add include file checking for X-Code (#683)
|
||||
|
||||
# 2018-05-09 version 3.0.0
|
||||
|
||||
## << breaking changes >>
|
||||
|
||||
* Change offset parameter updating rule. If parse error happens, offset is updated to the error position. (#639, #666)
|
||||
|
||||
## << other updates >>
|
||||
|
||||
* Improve cross platform configuration (#655, #677)
|
||||
* Improve build system (#647)
|
||||
* Improve user class adaptor (#645, #673)
|
||||
* Improve msgpack::object visitation logic (#676)
|
||||
* Remove some warnings (#641, 659)
|
||||
* Add `->` and `*` operators to object_handle (#635)
|
||||
* Improve CI environment (#631, #634, #643, #657, #662, #668)
|
||||
* Improve documents (#630, #661)
|
||||
* Refactoring (#670)
|
||||
* Add OSS-Fuzz support (#672, #674, #675, #678)
|
||||
|
||||
# 2017-08-04 version 2.1.5
|
||||
* Improve cross platform configuration (#624)
|
||||
* Add boost asio examples (including zlib) (#610)
|
||||
|
@@ -124,7 +124,7 @@ ENDIF ()
|
||||
IF (MSGPACK_DEFAULT_API_VERSION)
|
||||
SET (CMAKE_CXX_FLAGS "-DMSGPACK_DEFAULT_API_VERSION=${MSGPACK_DEFAULT_API_VERSION} ${CMAKE_CXX_FLAGS}")
|
||||
ELSE ()
|
||||
SET (CMAKE_CXX_FLAGS "-DMSGPACK_DEFAULT_API_VERSION=2 ${CMAKE_CXX_FLAGS}")
|
||||
SET (CMAKE_CXX_FLAGS "-DMSGPACK_DEFAULT_API_VERSION=3 ${CMAKE_CXX_FLAGS}")
|
||||
ENDIF ()
|
||||
|
||||
FILE (GLOB_RECURSE PREDEF_FILES RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}/external/boost/predef/include/boost ${CMAKE_CURRENT_SOURCE_DIR}/external/boost/predef/include/boost/*.h)
|
||||
@@ -150,12 +150,40 @@ ENDFOREACH ()
|
||||
FIND_PACKAGE (GTest)
|
||||
FIND_PACKAGE (ZLIB)
|
||||
FIND_PACKAGE (Threads)
|
||||
IF (GTEST_FOUND AND ZLIB_FOUND AND THREADS_FOUND)
|
||||
IF (GTEST_FOUND AND ZLIB_FOUND AND THREADS_FOUND AND NOT "${MSGPACK_FUZZ_REGRESSION}" STREQUAL "ON")
|
||||
OPTION (MSGPACK_BUILD_TESTS "Build msgpack tests." ON)
|
||||
ENDIF ()
|
||||
|
||||
IF (DEFINED BUILD_SHARED_LIBS)
|
||||
IF (BUILD_SHARED_LIBS)
|
||||
IF (DEFINED MSGPACK_ENABLE_SHARED AND NOT MSGPACK_ENABLE_SHARED)
|
||||
MESSAGE(WARNING "MSGPACK_ENABLE_SHARED is overridden to ON by BUILD_SHARED_LIBS")
|
||||
ENDIF ()
|
||||
SET (MSGPACK_ENABLE_SHARED ON)
|
||||
IF (DEFINED MSGPACK_ENABLE_STATIC AND MSGPACK_ENABLE_STATIC)
|
||||
MESSAGE(WARNING "MSGPACK_ENABLE_STATIC is overridden to OFF by BUILD_SHARED_LIBS")
|
||||
ENDIF ()
|
||||
SET (MSGPACK_ENABLE_STATIC OFF)
|
||||
ELSE ()
|
||||
IF (DEFINED MSGPACK_ENABLE_SHARED AND MSGPACK_ENABLE_SHARED)
|
||||
MESSAGE(WARNING "MSGPACK_ENABLE_SHARED is overridden to OFF by BUILD_SHARED_LIBS")
|
||||
ENDIF ()
|
||||
SET (MSGPACK_ENABLE_SHARED OFF)
|
||||
IF (DEFINED MSGPACK_ENABLE_STATIC AND NOT MSGPACK_ENABLE_STATIC)
|
||||
MESSAGE(WARNING "MSGPACK_ENABLE_STATIC is overridden to ON by BUILD_SHARED_LIBS")
|
||||
ENDIF ()
|
||||
SET (MSGPACK_ENABLE_STATIC ON)
|
||||
ENDIF ()
|
||||
ELSE ()
|
||||
IF (NOT DEFINED MSGPACK_ENABLE_SHARED)
|
||||
SET (MSGPACK_ENABLE_SHARED ON)
|
||||
ENDIF ()
|
||||
IF (NOT DEFINED MSGPACK_ENABLE_STATIC)
|
||||
SET (MSGPACK_ENABLE_STATIC ON)
|
||||
ENDIF ()
|
||||
ENDIF ()
|
||||
|
||||
OPTION (MSGPACK_ENABLE_CXX "Enable C++ interface." ON)
|
||||
OPTION (MSGPACK_ENABLE_SHARED "Build shared libaries in addition to static libraries." ON)
|
||||
|
||||
INCLUDE (CheckCXXSourceCompiles)
|
||||
CHECK_CXX_SOURCE_COMPILES ("
|
||||
@@ -187,6 +215,8 @@ IF (MSGPACK_ENABLE_SHARED)
|
||||
${msgpackc_HEADERS}
|
||||
)
|
||||
|
||||
SET_TARGET_PROPERTIES (msgpackc PROPERTIES SOVERSION 2 VERSION 2.0.0)
|
||||
|
||||
TARGET_INCLUDE_DIRECTORIES (msgpackc
|
||||
PUBLIC
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
@@ -197,6 +227,18 @@ IF (MSGPACK_ENABLE_SHARED)
|
||||
)
|
||||
ENDIF ()
|
||||
|
||||
IF (MSGPACK_ENABLE_CXX AND ((CMAKE_VERSION VERSION_GREATER 3.0) OR (CMAKE_VERSION VERSION_EQUAL 3.0)))
|
||||
ADD_LIBRARY (msgpackc-cxx INTERFACE)
|
||||
|
||||
TARGET_INCLUDE_DIRECTORIES (msgpackc-cxx
|
||||
INTERFACE
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/include>
|
||||
$<INSTALL_INTERFACE:include>
|
||||
)
|
||||
ENDIF ()
|
||||
|
||||
IF (MSGPACK_ENABLE_STATIC)
|
||||
ADD_LIBRARY (msgpackc-static STATIC
|
||||
${msgpackc_SOURCES}
|
||||
${msgpackc_HEADERS}
|
||||
@@ -217,14 +259,27 @@ IF (NOT MSGPACK_ENABLE_SHARED)
|
||||
ENDIF ()
|
||||
|
||||
SET_TARGET_PROPERTIES (msgpackc-static PROPERTIES OUTPUT_NAME "msgpackc")
|
||||
|
||||
IF (MSGPACK_ENABLE_SHARED)
|
||||
IF (MSVC)
|
||||
SET_TARGET_PROPERTIES (msgpackc PROPERTIES IMPORT_SUFFIX "_import.lib")
|
||||
ELSEIF (MINGW)
|
||||
SET_TARGET_PROPERTIES (msgpackc PROPERTIES IMPORT_SUFFIX ".dll.a")
|
||||
ENDIF ()
|
||||
SET_TARGET_PROPERTIES (msgpackc PROPERTIES SOVERSION 2 VERSION 2.0.0)
|
||||
ENDIF ()
|
||||
ENDIF ()
|
||||
|
||||
# enable regression testing
|
||||
IF ("${MSGPACK_FUZZ_REGRESSION}" STREQUAL "ON" AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
SET (CMAKE_CXX_FLAGS "-DMSGPACK_USE_BOOST ${CMAKE_CXX_FLAGS}")
|
||||
SET (Boost_USE_MULTITHREADED ON)
|
||||
SET (Boost_USE_STATIC_RUNTIME OFF)
|
||||
|
||||
enable_testing ()
|
||||
ADD_SUBDIRECTORY (fuzz)
|
||||
SET (MSGPACK_BUILD_EXAMPLES OFF)
|
||||
ENDIF ()
|
||||
|
||||
|
||||
IF (MSGPACK_BUILD_TESTS)
|
||||
ENABLE_TESTING ()
|
||||
@@ -237,17 +292,21 @@ ENDIF ()
|
||||
|
||||
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
IF (MSGPACK_ENABLE_SHARED)
|
||||
SET_PROPERTY (TARGET msgpackc APPEND_STRING PROPERTY COMPILE_FLAGS "-Wall -Wextra -Werror -g -O3 -DPIC")
|
||||
SET_PROPERTY (TARGET msgpackc APPEND_STRING PROPERTY COMPILE_FLAGS " -Wall -Wextra -DPIC")
|
||||
ENDIF ()
|
||||
IF (MSGPACK_ENABLE_STATIC)
|
||||
SET_PROPERTY (TARGET msgpackc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -Wall -Wextra" )
|
||||
ENDIF ()
|
||||
SET_PROPERTY (TARGET msgpackc-static APPEND_STRING PROPERTY COMPILE_FLAGS "-Wall -Wextra -Werror -g -O3" )
|
||||
ENDIF ()
|
||||
|
||||
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
IF (MSGPACK_ENABLE_SHARED)
|
||||
SET_PROPERTY (TARGET msgpackc APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-mismatched-tags")
|
||||
ENDIF ()
|
||||
IF (MSGPACK_ENABLE_STATIC)
|
||||
SET_PROPERTY (TARGET msgpackc-static APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-mismatched-tags")
|
||||
ENDIF ()
|
||||
ENDIF ()
|
||||
|
||||
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||
IF (CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
|
||||
@@ -279,9 +338,15 @@ IF (MSGPACK_BUILD_EXAMPLES)
|
||||
ENDIF ()
|
||||
|
||||
IF (MSGPACK_ENABLE_SHARED)
|
||||
SET (MSGPACK_INSTALLTARGETS msgpackc msgpackc-static)
|
||||
ELSE()
|
||||
SET (MSGPACK_INSTALLTARGETS msgpackc-static)
|
||||
SET (MSGPACK_INSTALLTARGETS msgpackc)
|
||||
ENDIF ()
|
||||
|
||||
IF (MSGPACK_ENABLE_CXX AND ((CMAKE_VERSION VERSION_GREATER 3.0) OR (CMAKE_VERSION VERSION_EQUAL 3.0)))
|
||||
LIST (APPEND MSGPACK_INSTALLTARGETS msgpackc-cxx)
|
||||
ENDIF ()
|
||||
|
||||
IF (MSGPACK_ENABLE_STATIC)
|
||||
LIST (APPEND MSGPACK_INSTALLTARGETS msgpackc-static)
|
||||
ENDIF ()
|
||||
|
||||
INSTALL (TARGETS ${MSGPACK_INSTALLTARGETS} EXPORT msgpack-targets
|
||||
@@ -307,6 +372,7 @@ IF (DOXYGEN_FOUND)
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "INPUT = ${CMAKE_CURRENT_SOURCE_DIR}/include" >> ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile_c
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "EXTRACT_ALL = YES" >> ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile_c
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "PROJECT_NAME = \"MessagePack for C\"" >> ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile_c
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "STRIP_FROM_PATH = ${CMAKE_CURRENT_SOURCE_DIR}/include" >> ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile_c
|
||||
)
|
||||
IF (DOXYGEN_DOT_FOUND)
|
||||
LIST (APPEND Doxyfile_c_CONTENT
|
||||
@@ -325,6 +391,7 @@ IF (DOXYGEN_FOUND)
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "OUTPUT_DIRECTORY = doc_cpp" >> ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile_cpp
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "INPUT = ${CMAKE_CURRENT_SOURCE_DIR}/include" >> ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile_cpp
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "EXTRACT_ALL = YES" >> ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile_cpp
|
||||
COMMAND ${CMAKE_COMMAND} -E echo "STRIP_FROM_PATH = ${CMAKE_CURRENT_SOURCE_DIR}/include" >> ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile_cpp
|
||||
)
|
||||
IF (DOXYGEN_DOT_FOUND)
|
||||
LIST (APPEND Doxyfile_cpp_CONTENT
|
||||
|
2
Doxyfile
2
Doxyfile
@@ -281,7 +281,7 @@ TYPEDEF_HIDES_STRUCT = NO
|
||||
# causing a significant performance penality.
|
||||
# If the system has enough physical memory increasing the cache will improve the
|
||||
# performance by keeping more symbols in memory. Note that the value works on
|
||||
# a logarithmic scale so increasing the size by one will rougly double the
|
||||
# a logarithmic scale so increasing the size by one will roughly double the
|
||||
# memory usage. The cache size is given by this formula:
|
||||
# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0,
|
||||
# corresponding to a cache size of 2^16 = 65536 symbols
|
||||
|
87
Files.cmake
87
Files.cmake
@@ -24,6 +24,7 @@ LIST (APPEND msgpackc_HEADERS
|
||||
include/msgpack/predef/architecture/mips.h
|
||||
include/msgpack/predef/architecture/parisc.h
|
||||
include/msgpack/predef/architecture/ppc.h
|
||||
include/msgpack/predef/architecture/ptx.h
|
||||
include/msgpack/predef/architecture/pyramid.h
|
||||
include/msgpack/predef/architecture/rs6k.h
|
||||
include/msgpack/predef/architecture/sparc.h
|
||||
@@ -57,6 +58,7 @@ LIST (APPEND msgpackc_HEADERS
|
||||
include/msgpack/predef/compiler/metrowerks.h
|
||||
include/msgpack/predef/compiler/microtec.h
|
||||
include/msgpack/predef/compiler/mpw.h
|
||||
include/msgpack/predef/compiler/nvcc.h
|
||||
include/msgpack/predef/compiler/palm.h
|
||||
include/msgpack/predef/compiler/pgi.h
|
||||
include/msgpack/predef/compiler/sgi_mipspro.h
|
||||
@@ -83,12 +85,14 @@ LIST (APPEND msgpackc_HEADERS
|
||||
include/msgpack/predef/hardware/simd/x86_amd.h
|
||||
include/msgpack/predef/hardware/simd/x86_amd/versions.h
|
||||
include/msgpack/predef/language.h
|
||||
include/msgpack/predef/language/cuda.h
|
||||
include/msgpack/predef/language/objc.h
|
||||
include/msgpack/predef/language/stdc.h
|
||||
include/msgpack/predef/language/stdcpp.h
|
||||
include/msgpack/predef/library.h
|
||||
include/msgpack/predef/library/c.h
|
||||
include/msgpack/predef/library/c/_prefix.h
|
||||
include/msgpack/predef/library/c/cloudabi.h
|
||||
include/msgpack/predef/library/c/gnu.h
|
||||
include/msgpack/predef/library/c/uc.h
|
||||
include/msgpack/predef/library/c/vms.h
|
||||
@@ -132,16 +136,25 @@ LIST (APPEND msgpackc_HEADERS
|
||||
include/msgpack/predef/os/windows.h
|
||||
include/msgpack/predef/other.h
|
||||
include/msgpack/predef/other/endian.h
|
||||
include/msgpack/predef/other/workaround.h
|
||||
include/msgpack/predef/platform.h
|
||||
include/msgpack/predef/platform/cloudabi.h
|
||||
include/msgpack/predef/platform/ios.h
|
||||
include/msgpack/predef/platform/mingw.h
|
||||
include/msgpack/predef/platform/mingw32.h
|
||||
include/msgpack/predef/platform/mingw64.h
|
||||
include/msgpack/predef/platform/windows_desktop.h
|
||||
include/msgpack/predef/platform/windows_phone.h
|
||||
include/msgpack/predef/platform/windows_runtime.h
|
||||
include/msgpack/predef/platform/windows_server.h
|
||||
include/msgpack/predef/platform/windows_store.h
|
||||
include/msgpack/predef/platform/windows_system.h
|
||||
include/msgpack/predef/platform/windows_uwp.h
|
||||
include/msgpack/predef/version.h
|
||||
include/msgpack/predef/version_number.h
|
||||
include/msgpack/sbuffer.h
|
||||
include/msgpack/sysdep.h
|
||||
include/msgpack/timestamp.h
|
||||
include/msgpack/unpack.h
|
||||
include/msgpack/unpack_define.h
|
||||
include/msgpack/unpack_template.h
|
||||
@@ -173,15 +186,20 @@ IF (MSGPACK_ENABLE_CXX)
|
||||
include/msgpack/adaptor/cpp11/array.hpp
|
||||
include/msgpack/adaptor/cpp11/array_char.hpp
|
||||
include/msgpack/adaptor/cpp11/array_unsigned_char.hpp
|
||||
include/msgpack/adaptor/cpp11/chrono.hpp
|
||||
include/msgpack/adaptor/cpp11/forward_list.hpp
|
||||
include/msgpack/adaptor/cpp11/reference_wrapper.hpp
|
||||
include/msgpack/adaptor/cpp11/shared_ptr.hpp
|
||||
include/msgpack/adaptor/cpp11/timespec.hpp
|
||||
include/msgpack/adaptor/cpp11/tuple.hpp
|
||||
include/msgpack/adaptor/cpp11/unique_ptr.hpp
|
||||
include/msgpack/adaptor/cpp11/unordered_map.hpp
|
||||
include/msgpack/adaptor/cpp11/unordered_set.hpp
|
||||
include/msgpack/adaptor/cpp17/byte.hpp
|
||||
include/msgpack/adaptor/cpp17/carray_byte.hpp
|
||||
include/msgpack/adaptor/cpp17/optional.hpp
|
||||
include/msgpack/adaptor/cpp17/string_view.hpp
|
||||
include/msgpack/adaptor/cpp17/vector_byte.hpp
|
||||
include/msgpack/adaptor/define.hpp
|
||||
include/msgpack/adaptor/define_decl.hpp
|
||||
include/msgpack/adaptor/deque.hpp
|
||||
@@ -214,8 +232,11 @@ IF (MSGPACK_ENABLE_CXX)
|
||||
include/msgpack/adaptor/vector_bool.hpp
|
||||
include/msgpack/adaptor/vector_char.hpp
|
||||
include/msgpack/adaptor/vector_unsigned_char.hpp
|
||||
include/msgpack/adaptor/wstring.hpp
|
||||
include/msgpack/cpp_config.hpp
|
||||
include/msgpack/cpp_config_decl.hpp
|
||||
include/msgpack/create_object_visitor.hpp
|
||||
include/msgpack/create_object_visitor_decl.hpp
|
||||
include/msgpack/fbuffer.hpp
|
||||
include/msgpack/fbuffer_decl.hpp
|
||||
include/msgpack/gcc_atomic.hpp
|
||||
@@ -223,12 +244,16 @@ IF (MSGPACK_ENABLE_CXX)
|
||||
include/msgpack/iterator_decl.hpp
|
||||
include/msgpack/meta.hpp
|
||||
include/msgpack/meta_decl.hpp
|
||||
include/msgpack/null_visitor.hpp
|
||||
include/msgpack/null_visitor_decl.hpp
|
||||
include/msgpack/object.hpp
|
||||
include/msgpack/object_decl.hpp
|
||||
include/msgpack/object_fwd.hpp
|
||||
include/msgpack/object_fwd_decl.hpp
|
||||
include/msgpack/pack.hpp
|
||||
include/msgpack/pack_decl.hpp
|
||||
include/msgpack/parse.hpp
|
||||
include/msgpack/parse_decl.hpp
|
||||
include/msgpack/parse_return.hpp
|
||||
include/msgpack/preprocessor.hpp
|
||||
include/msgpack/preprocessor/arithmetic.hpp
|
||||
@@ -433,6 +458,7 @@ IF (MSGPACK_ENABLE_CXX)
|
||||
include/msgpack/preprocessor/seq/detail/binary_transform.hpp
|
||||
include/msgpack/preprocessor/seq/detail/is_empty.hpp
|
||||
include/msgpack/preprocessor/seq/detail/split.hpp
|
||||
include/msgpack/preprocessor/seq/detail/to_list_msvc.hpp
|
||||
include/msgpack/preprocessor/seq/elem.hpp
|
||||
include/msgpack/preprocessor/seq/enum.hpp
|
||||
include/msgpack/preprocessor/seq/filter.hpp
|
||||
@@ -523,15 +549,20 @@ IF (MSGPACK_ENABLE_CXX)
|
||||
include/msgpack/v1/adaptor/cpp11/array.hpp
|
||||
include/msgpack/v1/adaptor/cpp11/array_char.hpp
|
||||
include/msgpack/v1/adaptor/cpp11/array_unsigned_char.hpp
|
||||
include/msgpack/v1/adaptor/cpp11/chrono.hpp
|
||||
include/msgpack/v1/adaptor/cpp11/forward_list.hpp
|
||||
include/msgpack/v1/adaptor/cpp11/reference_wrapper.hpp
|
||||
include/msgpack/v1/adaptor/cpp11/shared_ptr.hpp
|
||||
include/msgpack/v1/adaptor/cpp11/timespec.hpp
|
||||
include/msgpack/v1/adaptor/cpp11/tuple.hpp
|
||||
include/msgpack/v1/adaptor/cpp11/unique_ptr.hpp
|
||||
include/msgpack/v1/adaptor/cpp11/unordered_map.hpp
|
||||
include/msgpack/v1/adaptor/cpp11/unordered_set.hpp
|
||||
include/msgpack/v1/adaptor/cpp17/byte.hpp
|
||||
include/msgpack/v1/adaptor/cpp17/carray_byte.hpp
|
||||
include/msgpack/v1/adaptor/cpp17/optional.hpp
|
||||
include/msgpack/v1/adaptor/cpp17/string_view.hpp
|
||||
include/msgpack/v1/adaptor/cpp17/vector_byte.hpp
|
||||
include/msgpack/v1/adaptor/define.hpp
|
||||
include/msgpack/v1/adaptor/define_decl.hpp
|
||||
include/msgpack/v1/adaptor/deque.hpp
|
||||
@@ -541,6 +572,7 @@ IF (MSGPACK_ENABLE_CXX)
|
||||
include/msgpack/v1/adaptor/detail/cpp03_define_map_decl.hpp
|
||||
include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple.hpp
|
||||
include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple_decl.hpp
|
||||
include/msgpack/v1/adaptor/detail/cpp11_convert_helper.hpp
|
||||
include/msgpack/v1/adaptor/detail/cpp11_define_array.hpp
|
||||
include/msgpack/v1/adaptor/detail/cpp11_define_array_decl.hpp
|
||||
include/msgpack/v1/adaptor/detail/cpp11_define_map.hpp
|
||||
@@ -576,6 +608,7 @@ IF (MSGPACK_ENABLE_CXX)
|
||||
include/msgpack/v1/adaptor/vector_bool.hpp
|
||||
include/msgpack/v1/adaptor/vector_char.hpp
|
||||
include/msgpack/v1/adaptor/vector_unsigned_char.hpp
|
||||
include/msgpack/v1/adaptor/wstring.hpp
|
||||
include/msgpack/v1/cpp_config.hpp
|
||||
include/msgpack/v1/cpp_config_decl.hpp
|
||||
include/msgpack/v1/detail/cpp03_zone.hpp
|
||||
@@ -632,31 +665,85 @@ IF (MSGPACK_ENABLE_CXX)
|
||||
include/msgpack/v2/adaptor/v4raw_decl.hpp
|
||||
include/msgpack/v2/cpp_config_decl.hpp
|
||||
include/msgpack/v2/create_object_visitor.hpp
|
||||
include/msgpack/v2/create_object_visitor_decl.hpp
|
||||
include/msgpack/v2/detail/cpp03_zone_decl.hpp
|
||||
include/msgpack/v2/detail/cpp11_zone_decl.hpp
|
||||
include/msgpack/v2/fbuffer_decl.hpp
|
||||
include/msgpack/v2/iterator_decl.hpp
|
||||
include/msgpack/v2/meta_decl.hpp
|
||||
include/msgpack/v2/null_visitor.hpp
|
||||
include/msgpack/v2/null_visitor_decl.hpp
|
||||
include/msgpack/v2/object.hpp
|
||||
include/msgpack/v2/object_decl.hpp
|
||||
include/msgpack/v2/object_fwd.hpp
|
||||
include/msgpack/v2/object_fwd_decl.hpp
|
||||
include/msgpack/v2/pack_decl.hpp
|
||||
include/msgpack/v2/parse.hpp
|
||||
include/msgpack/v2/parse_decl.hpp
|
||||
include/msgpack/v2/parse_return.hpp
|
||||
include/msgpack/v2/sbuffer_decl.hpp
|
||||
include/msgpack/v2/unpack.hpp
|
||||
include/msgpack/v2/unpack_decl.hpp
|
||||
include/msgpack/v2/vrefbuffer_decl.hpp
|
||||
include/msgpack/v2/x3_parse.hpp
|
||||
include/msgpack/v2/x3_parse_decl.hpp
|
||||
include/msgpack/v2/x3_unpack.hpp
|
||||
include/msgpack/v2/x3_unpack_decl.hpp
|
||||
include/msgpack/v2/zbuffer_decl.hpp
|
||||
include/msgpack/v2/zone_decl.hpp
|
||||
include/msgpack/v3/adaptor/adaptor_base.hpp
|
||||
include/msgpack/v3/adaptor/adaptor_base_decl.hpp
|
||||
include/msgpack/v3/adaptor/array_ref_decl.hpp
|
||||
include/msgpack/v3/adaptor/boost/msgpack_variant_decl.hpp
|
||||
include/msgpack/v3/adaptor/check_container_size_decl.hpp
|
||||
include/msgpack/v3/adaptor/define_decl.hpp
|
||||
include/msgpack/v3/adaptor/detail/cpp03_define_array_decl.hpp
|
||||
include/msgpack/v3/adaptor/detail/cpp03_define_map_decl.hpp
|
||||
include/msgpack/v3/adaptor/detail/cpp03_msgpack_tuple_decl.hpp
|
||||
include/msgpack/v3/adaptor/detail/cpp11_define_array_decl.hpp
|
||||
include/msgpack/v3/adaptor/detail/cpp11_define_map_decl.hpp
|
||||
include/msgpack/v3/adaptor/detail/cpp11_msgpack_tuple_decl.hpp
|
||||
include/msgpack/v3/adaptor/ext_decl.hpp
|
||||
include/msgpack/v3/adaptor/fixint_decl.hpp
|
||||
include/msgpack/v3/adaptor/int_decl.hpp
|
||||
include/msgpack/v3/adaptor/map_decl.hpp
|
||||
include/msgpack/v3/adaptor/msgpack_tuple_decl.hpp
|
||||
include/msgpack/v3/adaptor/nil_decl.hpp
|
||||
include/msgpack/v3/adaptor/raw_decl.hpp
|
||||
include/msgpack/v3/adaptor/size_equal_only_decl.hpp
|
||||
include/msgpack/v3/adaptor/v4raw_decl.hpp
|
||||
include/msgpack/v3/cpp_config_decl.hpp
|
||||
include/msgpack/v3/create_object_visitor_decl.hpp
|
||||
include/msgpack/v3/detail/cpp03_zone_decl.hpp
|
||||
include/msgpack/v3/detail/cpp11_zone_decl.hpp
|
||||
include/msgpack/v3/fbuffer_decl.hpp
|
||||
include/msgpack/v3/iterator_decl.hpp
|
||||
include/msgpack/v3/meta_decl.hpp
|
||||
include/msgpack/v3/null_visitor_decl.hpp
|
||||
include/msgpack/v3/object_decl.hpp
|
||||
include/msgpack/v3/object_fwd.hpp
|
||||
include/msgpack/v3/object_fwd_decl.hpp
|
||||
include/msgpack/v3/pack_decl.hpp
|
||||
include/msgpack/v3/parse.hpp
|
||||
include/msgpack/v3/parse_decl.hpp
|
||||
include/msgpack/v3/parse_return.hpp
|
||||
include/msgpack/v3/sbuffer_decl.hpp
|
||||
include/msgpack/v3/unpack.hpp
|
||||
include/msgpack/v3/unpack_decl.hpp
|
||||
include/msgpack/v3/vrefbuffer_decl.hpp
|
||||
include/msgpack/v3/x3_parse_decl.hpp
|
||||
include/msgpack/v3/x3_unpack.hpp
|
||||
include/msgpack/v3/x3_unpack_decl.hpp
|
||||
include/msgpack/v3/zbuffer_decl.hpp
|
||||
include/msgpack/v3/zone_decl.hpp
|
||||
include/msgpack/version.hpp
|
||||
include/msgpack/versioning.hpp
|
||||
include/msgpack/vrefbuffer.hpp
|
||||
include/msgpack/vrefbuffer_decl.hpp
|
||||
include/msgpack/x3_parse.hpp
|
||||
include/msgpack/x3_parse_decl.hpp
|
||||
include/msgpack/x3_unpack.hpp
|
||||
include/msgpack/x3_unpack_decl.hpp
|
||||
include/msgpack/zbuffer.hpp
|
||||
include/msgpack/zbuffer_decl.hpp
|
||||
include/msgpack/zone.hpp
|
||||
|
@@ -20,7 +20,7 @@ You might need to run `sudo port selfupdate` before installing to update the pac
|
||||
You can also install via Homebrew.
|
||||
|
||||
```
|
||||
$ sudo brew install msgpack
|
||||
$ brew install msgpack
|
||||
```
|
||||
|
||||
## FreeBSD with Ports Collection
|
||||
|
22
README.md
22
README.md
@@ -1,9 +1,9 @@
|
||||
`msgpack` for C/C++
|
||||
===================
|
||||
|
||||
Version 2.1.5 [](https://travis-ci.org/msgpack/msgpack-c) [](https://ci.appveyor.com/project/redboltz/msgpack-c/branch/master)
|
||||
Version 3.2.0 [](https://travis-ci.org/msgpack/msgpack-c) [](https://ci.appveyor.com/project/redboltz/msgpack-c/branch/master)
|
||||
|
||||
It's like JSON but small and fast.
|
||||
It's like JSON but smaller and faster.
|
||||
|
||||
Overview
|
||||
--------
|
||||
@@ -11,7 +11,7 @@ Overview
|
||||
[MessagePack](http://msgpack.org/) is an efficient binary serialization
|
||||
format, which lets you exchange data among multiple languages like JSON,
|
||||
except that it's faster and smaller. Small integers are encoded into a
|
||||
single byte while typical short strings require only one extra byte in
|
||||
single byte and short strings require only one extra byte in
|
||||
addition to the strings themselves.
|
||||
|
||||
Example
|
||||
@@ -97,6 +97,10 @@ int main(void)
|
||||
msgpack::type::tuple<int, bool, std::string> dst;
|
||||
deserialized.convert(dst);
|
||||
|
||||
// or create the new instance
|
||||
msgpack::type::tuple<int, bool, std::string> dst2 =
|
||||
deserialized.as<msgpack::type::tuple<int, bool, std::string> >();
|
||||
|
||||
return 0;
|
||||
}
|
||||
```
|
||||
@@ -108,7 +112,7 @@ Usage
|
||||
|
||||
### C++ Header Only Library
|
||||
|
||||
When you use msgpack on C++03 and C++11, you can just add
|
||||
When you use msgpack on C++, you can just add
|
||||
msgpack-c/include to your include path:
|
||||
|
||||
g++ -I msgpack-c/include your_source_file.cpp
|
||||
@@ -135,14 +139,18 @@ C and C++03:
|
||||
$ make
|
||||
$ sudo make install
|
||||
|
||||
If you want to setup C++11 version of msgpack instead,
|
||||
If you want to setup C++11 or C++17 version of msgpack instead,
|
||||
execute the following commands:
|
||||
|
||||
$ git clone https://github.com/msgpack/msgpack-c.git
|
||||
$ cd msgpack-c
|
||||
$ cmake -DMSGPACK_CXX11=ON .
|
||||
$ cmake -DMSGPACK_CXX[11|17]=ON .
|
||||
$ sudo make install
|
||||
|
||||
`MSGPACK_CXX[11|17]` flags are not affected to installing files. Just switching test cases. All files are installed in every settings.
|
||||
|
||||
When you use the C part of `msgpack-c`, you need to build and link the library. By default, both static/shared libraries are built. If you want to build only static library, set `BUILD_SHARED_LIBS=OFF` to cmake. If you want to build only shared library, set `BUILD_SHARED_L
|
||||
|
||||
#### GUI on Windows
|
||||
|
||||
Clone msgpack-c git repository.
|
||||
@@ -170,7 +178,7 @@ the binaries:' text box.
|
||||
|
||||
### Documentation
|
||||
|
||||
You can get addtional information on the
|
||||
You can get additional information including the tutorial on the
|
||||
[wiki](https://github.com/msgpack/msgpack-c/wiki).
|
||||
|
||||
Contributing
|
||||
|
@@ -1,10 +1,10 @@
|
||||
version: 2.1.5.{build}
|
||||
version: 3.2.0.{build}
|
||||
|
||||
image:
|
||||
- Visual Studio 2015
|
||||
environment:
|
||||
global:
|
||||
BOOST_ROOT: C:\Libraries\boost_1_60_0
|
||||
BOOST_ROOT: C:\Libraries\boost_1_67_0
|
||||
matrix:
|
||||
- cpp11: -DMSGPACK_CXX11=OFF
|
||||
boost: -DMSGPACK_BOOST=OFF
|
||||
|
@@ -23,7 +23,7 @@ else
|
||||
export BIT32="OFF"
|
||||
fi
|
||||
|
||||
cmake -DMSGPACK_CXX11=${CXX11} -DMSGPACK_32BIT=${BIT32} -DMSGPACK_BOOST=${BOOST} -DMSGPACK_ENABLE_SHARED=${SHARED} -DMSGPACK_CHAR_SIGN=${CHAR_SIGN} -DMSGPACK_DEFAULT_API_VERSION=${API_VERSION} -DMSGPACK_USE_X3_PARSE=${X3_PARSE} ..
|
||||
cmake -DMSGPACK_CXX11=${CXX11} -DMSGPACK_CXX17=${CXX17} -DMSGPACK_32BIT=${BIT32} -DMSGPACK_BOOST=${BOOST} -DBUILD_SHARED_LIBS=${SHARED} -DMSGPACK_CHAR_SIGN=${CHAR_SIGN} -DMSGPACK_DEFAULT_API_VERSION=${API_VERSION} -DMSGPACK_USE_X3_PARSE=${X3_PARSE} ..
|
||||
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ]
|
||||
@@ -39,7 +39,7 @@ then
|
||||
exit $ret
|
||||
fi
|
||||
|
||||
make test
|
||||
ctest -VV
|
||||
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ]
|
||||
|
49
ci/build_regression.sh
Executable file
49
ci/build_regression.sh
Executable file
@@ -0,0 +1,49 @@
|
||||
#!/bin/bash
|
||||
|
||||
mkdir -p build
|
||||
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ]
|
||||
then
|
||||
exit $ret
|
||||
fi
|
||||
|
||||
cd build
|
||||
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ]
|
||||
then
|
||||
exit $ret
|
||||
fi
|
||||
|
||||
if [ "${ARCH}" == "32" ]
|
||||
then
|
||||
echo "64 bit support required for regressions"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cmake -DMSGPACK_FUZZ_REGRESSION="ON" -DMSGPACK_CXX11="ON" -DMSGPACK_BOOST=${BOOST} -DMSGPACK_SAN=${MSGPACK_SAN} -v ..
|
||||
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ]
|
||||
then
|
||||
exit $ret
|
||||
fi
|
||||
|
||||
make
|
||||
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ]
|
||||
then
|
||||
exit $ret
|
||||
fi
|
||||
|
||||
make test
|
||||
|
||||
ret=$?
|
||||
if [ $ret -ne 0 ]
|
||||
then
|
||||
exit $ret
|
||||
fi
|
||||
|
||||
exit 0
|
@@ -61,6 +61,7 @@ struct define_map<A0<%1.upto(i) {|j|%>, A<%=j%><%}%>> {
|
||||
if(o.type != msgpack::type::MAP) { throw msgpack::type_error(); }
|
||||
std::map<std::string, msgpack::object const*> kvmap;
|
||||
for (uint32_t i = 0; i < o.via.map.size; ++i) {
|
||||
if (o.via.map.ptr[i].key.type != msgpack::type::STR) { throw msgpack::type_error(); }
|
||||
kvmap.insert(
|
||||
std::map<std::string, msgpack::object const*>::value_type(
|
||||
std::string(
|
||||
|
@@ -121,7 +121,7 @@ inline tuple<> make_tuple()
|
||||
/// @cond
|
||||
<%0.upto(GENERATION_LIMIT) {|i|%>
|
||||
template <typename A0<%1.upto(i) {|j|%>, typename A<%=j%><%}%>>
|
||||
inline tuple<A0<%1.upto(i) {|j|%>, A<%=j%><%}%>> make_tuple(typename tuple_type<A0>::transparent_reference a0<%1.upto(i) {|j|%>, typename tuple_type<A<%=j%>>::transparent_reference a<%=j%><%}%>)
|
||||
tuple<A0<%1.upto(i) {|j|%>, A<%=j%><%}%>> make_tuple(A0 const& a0<%1.upto(i) {|j|%>, A<%=j%> const& a<%=j%><%}%>)
|
||||
{
|
||||
return tuple<A0<%1.upto(i) {|j|%>, A<%=j%><%}%>>(a0<%1.upto(i) {|j|%>, a<%=j%><%}%>);
|
||||
}
|
||||
|
@@ -54,7 +54,7 @@ tuple<> make_tuple();
|
||||
/// @cond
|
||||
<%0.upto(GENERATION_LIMIT) {|i|%>
|
||||
template <typename A0<%1.upto(i) {|j|%>, typename A<%=j%><%}%>>
|
||||
tuple<A0<%1.upto(i) {|j|%>, A<%=j%><%}%>> make_tuple(typename tuple_type<A0>::transparent_reference a0<%1.upto(i) {|j|%>, typename tuple_type<A<%=j%>>::transparent_reference a<%=j%><%}%>);
|
||||
tuple<A0<%1.upto(i) {|j|%>, A<%=j%><%}%>> make_tuple(A0 const& a0<%1.upto(i) {|j|%>, A<%=j%> const& a<%=j%><%}%>);
|
||||
<%}%>
|
||||
/// @endcond
|
||||
|
||||
|
@@ -55,7 +55,7 @@ class zone {
|
||||
++m_tail;
|
||||
}
|
||||
void push_expand(void (*func)(void*), void* data) {
|
||||
const size_t nused = m_end - m_array;
|
||||
const size_t nused = static_cast<size_t>(m_end - m_array);
|
||||
size_t nnext;
|
||||
if(nused == 0) {
|
||||
nnext = (sizeof(finalizer) < 72/2) ?
|
||||
@@ -201,12 +201,12 @@ inline char* zone::get_aligned(char* ptr, size_t align)
|
||||
inline void* zone::allocate_align(size_t size, size_t align)
|
||||
{
|
||||
char* aligned = get_aligned(m_chunk_list.m_ptr, align);
|
||||
size_t adjusted_size = size + (aligned - m_chunk_list.m_ptr);
|
||||
size_t adjusted_size = size + static_cast<size_t>(aligned - m_chunk_list.m_ptr);
|
||||
if (m_chunk_list.m_free < adjusted_size) {
|
||||
size_t enough_size = size + align - 1;
|
||||
char* ptr = allocate_expand(enough_size);
|
||||
aligned = get_aligned(ptr, align);
|
||||
adjusted_size = size + (aligned - m_chunk_list.m_ptr);
|
||||
adjusted_size = size + static_cast<size_t>(aligned - m_chunk_list.m_ptr);
|
||||
}
|
||||
m_chunk_list.m_free -= adjusted_size;
|
||||
m_chunk_list.m_ptr += adjusted_size;
|
||||
|
@@ -39,7 +39,7 @@ FOREACH (source_file ${exec_PROGRAMS})
|
||||
)
|
||||
ENDIF()
|
||||
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS "-Wall -Wextra -Werror -g -O3")
|
||||
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wall -Wextra")
|
||||
ENDIF ()
|
||||
|
||||
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
|
@@ -38,8 +38,8 @@ int main() {
|
||||
std::cout << __LINE__ << ":" << e.message() << std::endl;
|
||||
return;
|
||||
}
|
||||
unp.reserve_buffer(window_size);
|
||||
do_async_read_some = [&] {
|
||||
unp.reserve_buffer(window_size);
|
||||
ss.async_read_some(
|
||||
boost::asio::buffer(unp.buffer(), window_size),
|
||||
[&](boost::system::error_code const& e, std::size_t bytes_transferred) {
|
||||
@@ -70,13 +70,22 @@ int main() {
|
||||
// Client
|
||||
auto host = "localhost";
|
||||
boost::asio::ip::tcp::resolver r(ios);
|
||||
|
||||
#if BOOST_VERSION < 106600
|
||||
boost::asio::ip::tcp::resolver::query q(host, boost::lexical_cast<std::string>(port));
|
||||
auto it = r.resolve(q);
|
||||
boost::asio::ip::tcp::resolver::iterator end;
|
||||
#else // BOOST_VERSION < 106600
|
||||
auto eps = r.resolve(host, boost::lexical_cast<std::string>(port));
|
||||
auto it = eps.begin();
|
||||
auto end = eps.end();
|
||||
#endif // BOOST_VERSION < 106600
|
||||
|
||||
boost::asio::ip::tcp::socket cs(ios);
|
||||
boost::asio::async_connect(
|
||||
cs,
|
||||
|
||||
it,
|
||||
end,
|
||||
[&]
|
||||
(boost::system::error_code const& e, boost::asio::ip::tcp::resolver::iterator) {
|
||||
if (e) {
|
||||
|
@@ -136,13 +136,24 @@ int main() {
|
||||
|
||||
// Client
|
||||
auto host = "localhost";
|
||||
|
||||
boost::asio::ip::tcp::resolver r(ios);
|
||||
|
||||
#if BOOST_VERSION < 106600
|
||||
boost::asio::ip::tcp::resolver::query q(host, boost::lexical_cast<std::string>(port));
|
||||
auto it = r.resolve(q);
|
||||
boost::asio::ip::tcp::resolver::iterator end;
|
||||
#else // BOOST_VERSION < 106600
|
||||
auto eps = r.resolve(host, boost::lexical_cast<std::string>(port));
|
||||
auto it = eps.begin();
|
||||
auto end = eps.end();
|
||||
#endif // BOOST_VERSION < 106600
|
||||
|
||||
boost::asio::ip::tcp::socket cs(ios);
|
||||
boost::asio::async_connect(
|
||||
cs,
|
||||
it,
|
||||
end,
|
||||
[&]
|
||||
(boost::system::error_code const& e, boost::asio::ip::tcp::resolver::iterator) {
|
||||
if (e) {
|
||||
|
@@ -1,6 +1,8 @@
|
||||
IF (MSGPACK_ENABLE_SHARED)
|
||||
SET (MSGPACK_LIB msgpackc)
|
||||
ELSE ()
|
||||
ENDIF ()
|
||||
|
||||
IF (MSGPACK_ENABLE_STATIC)
|
||||
SET (MSGPACK_LIB msgpackc-static)
|
||||
ENDIF ()
|
||||
|
||||
@@ -23,7 +25,7 @@ FOREACH (source_file ${exec_PROGRAMS})
|
||||
${MSGPACK_LIB}
|
||||
)
|
||||
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS "-Wall -Wextra -Werror -g -O3")
|
||||
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wall -Wextra")
|
||||
ENDIF ()
|
||||
|
||||
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
|
@@ -40,7 +40,7 @@ FOREACH (source_file ${exec_PROGRAMS})
|
||||
$<TARGET_PROPERTY:msgpackc,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
)
|
||||
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS "-Wall -Wextra -Werror -g -O3")
|
||||
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wall -Wextra")
|
||||
ENDIF ()
|
||||
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||
IF (CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
|
||||
@@ -65,7 +65,7 @@ FOREACH (source_file ${with_pthread_PROGRAMS})
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
)
|
||||
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS "-Wall -Wextra -Werror -g -O3")
|
||||
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wall -Wextra")
|
||||
ENDIF ()
|
||||
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
|
||||
IF (CMAKE_CXX_FLAGS MATCHES "/W[0-4]")
|
||||
|
@@ -25,7 +25,7 @@ IF (MSGPACK_CXX11)
|
||||
$<TARGET_PROPERTY:msgpackc,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
)
|
||||
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS "-Wall -Wextra -Werror -g -O3 ")
|
||||
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wall -Wextra")
|
||||
ENDIF ()
|
||||
|
||||
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
|
@@ -1,4 +1,4 @@
|
||||
IF (MSGPACK_USE_X3_PARSE)
|
||||
IF (MSGPACK_USE_X3_PARSE AND MSGPACK_DEFAULT_API_VERSION VERSION_GREATER 1)
|
||||
INCLUDE_DIRECTORIES (
|
||||
../include
|
||||
)
|
||||
@@ -23,7 +23,7 @@ IF (MSGPACK_USE_X3_PARSE)
|
||||
$<TARGET_PROPERTY:msgpackc,INTERFACE_INCLUDE_DIRECTORIES>
|
||||
)
|
||||
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS "-Wall -Wextra -Werror -g ")
|
||||
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wall -Wextra")
|
||||
ENDIF ()
|
||||
|
||||
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
@@ -54,7 +54,7 @@ IF (MSGPACK_USE_X3_PARSE)
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
)
|
||||
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
||||
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS "-Wall -Wextra -Werror -g ")
|
||||
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wall -Wextra")
|
||||
ENDIF ()
|
||||
|
||||
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
|
2
external/boost/predef
vendored
2
external/boost/predef
vendored
Submodule external/boost/predef updated: 1e8d1c2cfc...560ff5298e
2
external/boost/preprocessor
vendored
2
external/boost/preprocessor
vendored
Submodule external/boost/preprocessor updated: c2beb74b90...56090c56b5
43
fuzz/CMakeLists.txt
Normal file
43
fuzz/CMakeLists.txt
Normal file
@@ -0,0 +1,43 @@
|
||||
FIND_PACKAGE (GTest REQUIRED)
|
||||
FIND_PACKAGE (ZLIB REQUIRED)
|
||||
FIND_PACKAGE (Boost REQUIRED COMPONENTS system filesystem)
|
||||
|
||||
INCLUDE_DIRECTORIES (
|
||||
${GTEST_INCLUDE_DIRS}
|
||||
${ZLIB_INCLUDE_DIRS}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
LIST (APPEND check_PROGRAMS
|
||||
regression_runner.cpp
|
||||
)
|
||||
|
||||
LINK_DIRECTORIES (
|
||||
${Boost_LIBRARY_DIRS}
|
||||
)
|
||||
|
||||
FOREACH (source_file ${check_PROGRAMS})
|
||||
GET_FILENAME_COMPONENT (source_file_we ${source_file} NAME_WE)
|
||||
ADD_EXECUTABLE (
|
||||
${source_file_we}
|
||||
${source_file}
|
||||
)
|
||||
TARGET_LINK_LIBRARIES (${source_file_we}
|
||||
msgpackc
|
||||
${GTEST_BOTH_LIBRARIES}
|
||||
${ZLIB_LIBRARIES}
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${Boost_LIBRARIES}
|
||||
)
|
||||
ADD_TEST (${source_file_we} ${source_file_we})
|
||||
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS "-Wall -Wextra -Wno-mismatched-tags -g")
|
||||
IF ("${MSGPACK_SAN}" STREQUAL "ASAN")
|
||||
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fno-omit-frame-pointer -fsanitize=address")
|
||||
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-omit-frame-pointer -fsanitize=address")
|
||||
ELSEIF ("${MSGPACK_SAN}" STREQUAL "UBSAN")
|
||||
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fsanitize=undefined")
|
||||
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=undefined")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDFOREACH ()
|
50
fuzz/regression_runner.cpp
Normal file
50
fuzz/regression_runner.cpp
Normal file
@@ -0,0 +1,50 @@
|
||||
#include <boost/filesystem.hpp>
|
||||
#include <gtest/gtest.h>
|
||||
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
#include "unpack_pack_fuzzer.cpp"
|
||||
|
||||
using ::testing::TestWithParam;
|
||||
using ::testing::ValuesIn;
|
||||
|
||||
|
||||
std::vector<std::string> ListDirectory(const std::string& path) {
|
||||
std::vector<std::string> v;
|
||||
|
||||
boost::filesystem::path p(path);
|
||||
boost::filesystem::directory_iterator f{p};
|
||||
|
||||
if(boost::filesystem::is_directory(p)) {
|
||||
while (f != boost::filesystem::directory_iterator{}) {
|
||||
v.push_back((*f++).path().string());
|
||||
}
|
||||
}
|
||||
return v;
|
||||
}
|
||||
|
||||
class UnpackPackFuzzerRegressionTest : public ::testing::TestWithParam<std::string> {
|
||||
public:
|
||||
};
|
||||
|
||||
TEST_P(UnpackPackFuzzerRegressionTest, Returns0) {
|
||||
auto fpath = GetParam();
|
||||
std::ifstream in(fpath, std::ifstream::binary);
|
||||
if (!in) {
|
||||
FAIL() << fpath << " not found";
|
||||
}
|
||||
in.seekg(0, in.end);
|
||||
size_t length = in.tellg();
|
||||
in.seekg(0, in.beg);
|
||||
std::vector<char> bytes(length);
|
||||
in.read(bytes.data(), bytes.size());
|
||||
assert(in);
|
||||
EXPECT_EQ(0, LLVMFuzzerTestOneInput(reinterpret_cast<const uint8_t *>(bytes.data()),
|
||||
bytes.size()));
|
||||
}
|
||||
|
||||
INSTANTIATE_TEST_CASE_P(UnpackPackFuzzerRegressions,
|
||||
UnpackPackFuzzerRegressionTest,
|
||||
::testing::ValuesIn(ListDirectory("../../fuzz/unpack_pack_fuzzer_regressions")));
|
23
fuzz/unpack_pack_fuzzer.cpp
Normal file
23
fuzz/unpack_pack_fuzzer.cpp
Normal file
@@ -0,0 +1,23 @@
|
||||
#include <msgpack.hpp>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
try {
|
||||
// NOTE(derwolfe): by default the limits are set at 2^32-1 length. I'm
|
||||
// setting these at far smaller values to avoid OOMs
|
||||
const int test_limit = 1000;
|
||||
msgpack::object_handle unpacked = msgpack::unpack(reinterpret_cast<const char *>(data),
|
||||
size,
|
||||
nullptr,
|
||||
nullptr,
|
||||
msgpack::unpack_limit(test_limit,
|
||||
test_limit,
|
||||
test_limit,
|
||||
test_limit,
|
||||
test_limit,
|
||||
test_limit));
|
||||
msgpack::sbuffer sbuf;
|
||||
msgpack::pack(sbuf, unpacked.get());
|
||||
} catch (...) {
|
||||
}
|
||||
return 0;
|
||||
}
|
Binary file not shown.
Binary file not shown.
1
fuzz/unpack_pack_fuzzer_seed_corpus/EmptyArray
Normal file
1
fuzz/unpack_pack_fuzzer_seed_corpus/EmptyArray
Normal file
@@ -0,0 +1 @@
|
||||
<EFBFBD>
|
1
fuzz/unpack_pack_fuzzer_seed_corpus/EmptyObject
Normal file
1
fuzz/unpack_pack_fuzzer_seed_corpus/EmptyObject
Normal file
@@ -0,0 +1 @@
|
||||
<EFBFBD>
|
2
fuzz/unpack_pack_fuzzer_seed_corpus/ExcessiveNesting
Normal file
2
fuzz/unpack_pack_fuzzer_seed_corpus/ExcessiveNesting
Normal file
@@ -0,0 +1,2 @@
|
||||
<EFBFBD><01><02><03><04><05><06><07><08> <09>
|
||||
<EFBFBD><0B><0C>
|
BIN
fuzz/unpack_pack_fuzzer_seed_corpus/OpenWeatherMap
Normal file
BIN
fuzz/unpack_pack_fuzzer_seed_corpus/OpenWeatherMap
Normal file
Binary file not shown.
BIN
fuzz/unpack_pack_fuzzer_seed_corpus/WeatherUnderground
Normal file
BIN
fuzz/unpack_pack_fuzzer_seed_corpus/WeatherUnderground
Normal file
Binary file not shown.
@@ -11,7 +11,11 @@
|
||||
#include "msgpack/iterator.hpp"
|
||||
#include "msgpack/zone.hpp"
|
||||
#include "msgpack/pack.hpp"
|
||||
#include "msgpack/null_visitor.hpp"
|
||||
#include "msgpack/parse.hpp"
|
||||
#include "msgpack/unpack.hpp"
|
||||
#include "msgpack/x3_parse.hpp"
|
||||
#include "msgpack/x3_unpack.hpp"
|
||||
#include "msgpack/sbuffer.hpp"
|
||||
#include "msgpack/vrefbuffer.hpp"
|
||||
#include "msgpack/version.hpp"
|
||||
|
@@ -14,5 +14,6 @@
|
||||
|
||||
#include "msgpack/v1/adaptor/adaptor_base.hpp"
|
||||
#include "msgpack/v2/adaptor/adaptor_base.hpp"
|
||||
#include "msgpack/v3/adaptor/adaptor_base.hpp"
|
||||
|
||||
#endif // MSGPACK_ADAPTOR_BASE_HPP
|
||||
|
@@ -12,5 +12,6 @@
|
||||
|
||||
#include "msgpack/v1/adaptor/adaptor_base_decl.hpp"
|
||||
#include "msgpack/v2/adaptor/adaptor_base_decl.hpp"
|
||||
#include "msgpack/v3/adaptor/adaptor_base_decl.hpp"
|
||||
|
||||
#endif // MSGPACK_ADAPTOR_BASE_DECL_HPP
|
||||
|
@@ -12,5 +12,6 @@
|
||||
|
||||
#include "msgpack/v1/adaptor/array_ref_decl.hpp"
|
||||
#include "msgpack/v2/adaptor/array_ref_decl.hpp"
|
||||
#include "msgpack/v3/adaptor/array_ref_decl.hpp"
|
||||
|
||||
#endif // MSGPACK_TYPE_ARRAY_REF_DECL_HPP
|
||||
|
@@ -12,5 +12,6 @@
|
||||
|
||||
#include "msgpack/v1/adaptor/boost/msgpack_variant_decl.hpp"
|
||||
#include "msgpack/v2/adaptor/boost/msgpack_variant_decl.hpp"
|
||||
#include "msgpack/v3/adaptor/boost/msgpack_variant_decl.hpp"
|
||||
|
||||
#endif // MSGPACK_TYPE_BOOST_MSGPACK_VARIANT_DECL_HPP
|
||||
|
@@ -12,5 +12,6 @@
|
||||
|
||||
#include "msgpack/v1/adaptor/check_container_size_decl.hpp"
|
||||
#include "msgpack/v2/adaptor/check_container_size_decl.hpp"
|
||||
#include "msgpack/v3/adaptor/check_container_size_decl.hpp"
|
||||
|
||||
#endif // MSGPACK_CHECK_CONTAINER_SIZE_DECL_HPP
|
||||
|
16
include/msgpack/adaptor/cpp11/chrono.hpp
Normal file
16
include/msgpack/adaptor/cpp11/chrono.hpp
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// MessagePack for C++ static resolution routine
|
||||
//
|
||||
// Copyright (C) 2017 KONDO Takatoshi
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
||||
#ifndef MSGPACK_TYPE_CPP11_CHRONO_HPP
|
||||
#define MSGPACK_TYPE_CPP11_CHRONO_HPP
|
||||
|
||||
#include "msgpack/v1/adaptor/cpp11/chrono.hpp"
|
||||
|
||||
#endif // MSGPACK_TYPE_CPP11_CHRONO_HPP
|
16
include/msgpack/adaptor/cpp11/timespec.hpp
Normal file
16
include/msgpack/adaptor/cpp11/timespec.hpp
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// MessagePack for C++ static resolution routine
|
||||
//
|
||||
// Copyright (C) 2019 KONDO Takatoshi
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
||||
#ifndef MSGPACK_TYPE_CPP11_TIMESPEC_HPP
|
||||
#define MSGPACK_TYPE_CPP11_TIMESPEC_HPP
|
||||
|
||||
#include "msgpack/v1/adaptor/cpp11/timespec.hpp"
|
||||
|
||||
#endif // MSGPACK_TYPE_CPP11_TIMESPEC_HPP
|
16
include/msgpack/adaptor/cpp17/byte.hpp
Normal file
16
include/msgpack/adaptor/cpp17/byte.hpp
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// MessagePack for C++ static resolution routine
|
||||
//
|
||||
// Copyright (C) 2018 KONDO Takatoshi
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
||||
#ifndef MSGPACK_TYPE_CPP17_BYTE_HPP
|
||||
#define MSGPACK_TYPE_CPP17_BYTE_HPP
|
||||
|
||||
#include "msgpack/v1/adaptor/cpp17/byte.hpp"
|
||||
|
||||
#endif // MSGPACK_TYPE_CPP17_BYTE_HPP
|
16
include/msgpack/adaptor/cpp17/carray_byte.hpp
Normal file
16
include/msgpack/adaptor/cpp17/carray_byte.hpp
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// MessagePack for C++ static resolution routine
|
||||
//
|
||||
// Copyright (C) 2018 KONDO Takatoshi
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
||||
#ifndef MSGPACK_TYPE_CPP17_CARRAY_BYTE_HPP
|
||||
#define MSGPACK_TYPE_CPP17_CARRAY_BYTE_HPP
|
||||
|
||||
#include "msgpack/v1/adaptor/cpp17/carray_byte.hpp"
|
||||
|
||||
#endif // MSGPACK_TYPE_CPP17_CARRAY_BYTE_HPP
|
16
include/msgpack/adaptor/cpp17/vector_byte.hpp
Normal file
16
include/msgpack/adaptor/cpp17/vector_byte.hpp
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// MessagePack for C++ static resolution routine
|
||||
//
|
||||
// Copyright (C) 2018 KONDO Takatoshi
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
|
||||
#ifndef MSGPACK_TYPE_CPP17_VECTOR_BYTE_HPP
|
||||
#define MSGPACK_TYPE_CPP17_VECTOR_BYTE_HPP
|
||||
|
||||
#include "msgpack/v1/adaptor/cpp17/vector_byte.hpp"
|
||||
|
||||
#endif // MSGPACK_TYPE_CPP17_VECTOR_BYTE_HPP
|
@@ -27,18 +27,18 @@
|
||||
|
||||
#define MSGPACK_DEFINE_ARRAY(...) \
|
||||
template <typename Packer> \
|
||||
void msgpack_pack(Packer& pk) const \
|
||||
void msgpack_pack(Packer& msgpack_pk) const \
|
||||
{ \
|
||||
msgpack::type::make_define_array(__VA_ARGS__).msgpack_pack(pk); \
|
||||
msgpack::type::make_define_array(__VA_ARGS__).msgpack_pack(msgpack_pk); \
|
||||
} \
|
||||
void msgpack_unpack(msgpack::object const& o) \
|
||||
void msgpack_unpack(msgpack::object const& msgpack_o) \
|
||||
{ \
|
||||
msgpack::type::make_define_array(__VA_ARGS__).msgpack_unpack(o); \
|
||||
msgpack::type::make_define_array(__VA_ARGS__).msgpack_unpack(msgpack_o); \
|
||||
}\
|
||||
template <typename MSGPACK_OBJECT> \
|
||||
void msgpack_object(MSGPACK_OBJECT* o, msgpack::zone& z) const \
|
||||
void msgpack_object(MSGPACK_OBJECT* msgpack_o, msgpack::zone& msgpack_z) const \
|
||||
{ \
|
||||
msgpack::type::make_define_array(__VA_ARGS__).msgpack_object(o, z); \
|
||||
msgpack::type::make_define_array(__VA_ARGS__).msgpack_object(msgpack_o, msgpack_z); \
|
||||
}
|
||||
|
||||
#define MSGPACK_BASE_ARRAY(base) (*const_cast<base *>(static_cast<base const*>(this)))
|
||||
@@ -62,24 +62,24 @@
|
||||
|
||||
#define MSGPACK_DEFINE_MAP(...) \
|
||||
template <typename Packer> \
|
||||
void msgpack_pack(Packer& pk) const \
|
||||
void msgpack_pack(Packer& msgpack_pk) const \
|
||||
{ \
|
||||
msgpack::type::make_define_map \
|
||||
MSGPACK_DEFINE_MAP_IMPL(__VA_ARGS__) \
|
||||
.msgpack_pack(pk); \
|
||||
.msgpack_pack(msgpack_pk); \
|
||||
} \
|
||||
void msgpack_unpack(msgpack::object const& o) \
|
||||
void msgpack_unpack(msgpack::object const& msgpack_o) \
|
||||
{ \
|
||||
msgpack::type::make_define_map \
|
||||
MSGPACK_DEFINE_MAP_IMPL(__VA_ARGS__) \
|
||||
.msgpack_unpack(o); \
|
||||
.msgpack_unpack(msgpack_o); \
|
||||
}\
|
||||
template <typename MSGPACK_OBJECT> \
|
||||
void msgpack_object(MSGPACK_OBJECT* o, msgpack::zone& z) const \
|
||||
void msgpack_object(MSGPACK_OBJECT* msgpack_o, msgpack::zone& msgpack_z) const \
|
||||
{ \
|
||||
msgpack::type::make_define_map \
|
||||
MSGPACK_DEFINE_MAP_IMPL(__VA_ARGS__) \
|
||||
.msgpack_object(o, z); \
|
||||
.msgpack_object(msgpack_o, msgpack_z); \
|
||||
}
|
||||
|
||||
#define MSGPACK_BASE_MAP(base) \
|
||||
@@ -94,32 +94,32 @@
|
||||
namespace adaptor { \
|
||||
template<> \
|
||||
struct convert<enum_name> { \
|
||||
msgpack::object const& operator()(msgpack::object const& o, enum_name& v) const { \
|
||||
msgpack::object const& operator()(msgpack::object const& msgpack_o, enum_name& msgpack_v) const { \
|
||||
msgpack::underlying_type<enum_name>::type tmp; \
|
||||
msgpack::operator>>(o, tmp); \
|
||||
v = static_cast<enum_name>(tmp); \
|
||||
return o; \
|
||||
msgpack::operator>>(msgpack_o, tmp); \
|
||||
msgpack_v = static_cast<enum_name>(tmp); \
|
||||
return msgpack_o; \
|
||||
} \
|
||||
}; \
|
||||
template<> \
|
||||
struct object<enum_name> { \
|
||||
void operator()(msgpack::object& o, const enum_name& v) const { \
|
||||
msgpack::underlying_type<enum_name>::type tmp = static_cast<msgpack::underlying_type<enum_name>::type>(v); \
|
||||
msgpack::operator<<(o, tmp); \
|
||||
void operator()(msgpack::object& msgpack_o, const enum_name& msgpack_v) const { \
|
||||
msgpack::underlying_type<enum_name>::type tmp = static_cast<msgpack::underlying_type<enum_name>::type>(msgpack_v); \
|
||||
msgpack::operator<<(msgpack_o, tmp); \
|
||||
} \
|
||||
}; \
|
||||
template<> \
|
||||
struct object_with_zone<enum_name> { \
|
||||
void operator()(msgpack::object::with_zone& o, const enum_name& v) const { \
|
||||
msgpack::underlying_type<enum_name>::type tmp = static_cast<msgpack::underlying_type<enum_name>::type>(v); \
|
||||
msgpack::operator<<(o, tmp); \
|
||||
void operator()(msgpack::object::with_zone& msgpack_o, const enum_name& msgpack_v) const { \
|
||||
msgpack::underlying_type<enum_name>::type tmp = static_cast<msgpack::underlying_type<enum_name>::type>(msgpack_v); \
|
||||
msgpack::operator<<(msgpack_o, tmp); \
|
||||
} \
|
||||
}; \
|
||||
template <> \
|
||||
struct pack<enum_name> { \
|
||||
template <typename Stream> \
|
||||
msgpack::packer<Stream>& operator()(msgpack::packer<Stream>& o, const enum_name& v) const { \
|
||||
return msgpack::operator<<(o, static_cast<msgpack::underlying_type<enum_name>::type>(v)); \
|
||||
msgpack::packer<Stream>& operator()(msgpack::packer<Stream>& msgpack_o, const enum_name& msgpack_v) const { \
|
||||
return msgpack::operator<<(msgpack_o, static_cast<msgpack::underlying_type<enum_name>::type>(msgpack_v)); \
|
||||
} \
|
||||
}; \
|
||||
} \
|
||||
@@ -139,5 +139,6 @@
|
||||
|
||||
#include "msgpack/v1/adaptor/define_decl.hpp"
|
||||
#include "msgpack/v2/adaptor/define_decl.hpp"
|
||||
#include "msgpack/v3/adaptor/define_decl.hpp"
|
||||
|
||||
#endif // MSGPACK_DEFINE_DECL_HPP
|
||||
|
@@ -12,5 +12,6 @@
|
||||
|
||||
#include "msgpack/v1/adaptor/ext_decl.hpp"
|
||||
#include "msgpack/v2/adaptor/ext_decl.hpp"
|
||||
#include "msgpack/v3/adaptor/ext_decl.hpp"
|
||||
|
||||
#endif // MSGPACK_TYPE_EXT_DECL_HPP
|
||||
|
@@ -12,5 +12,6 @@
|
||||
|
||||
#include "msgpack/v1/adaptor/fixint_decl.hpp"
|
||||
#include "msgpack/v2/adaptor/fixint_decl.hpp"
|
||||
#include "msgpack/v3/adaptor/fixint_decl.hpp"
|
||||
|
||||
#endif // MSGPACK_TYPE_FIXINT_DECL_HPP
|
||||
|
@@ -12,5 +12,6 @@
|
||||
|
||||
#include "msgpack/v1/adaptor/int_decl.hpp"
|
||||
#include "msgpack/v2/adaptor/int_decl.hpp"
|
||||
#include "msgpack/v3/adaptor/int_decl.hpp"
|
||||
|
||||
#endif // MSGPACK_TYPE_INT_DECL_HPP
|
||||
|
@@ -12,5 +12,6 @@
|
||||
|
||||
#include "msgpack/v1/adaptor/map_decl.hpp"
|
||||
#include "msgpack/v2/adaptor/map_decl.hpp"
|
||||
#include "msgpack/v3/adaptor/map_decl.hpp"
|
||||
|
||||
#endif // MSGPACK_TYPE_MAP_DECL_HPP
|
||||
|
@@ -12,5 +12,6 @@
|
||||
|
||||
#include "msgpack/v1/adaptor/msgpack_tuple_decl.hpp"
|
||||
#include "msgpack/v2/adaptor/msgpack_tuple_decl.hpp"
|
||||
#include "msgpack/v3/adaptor/msgpack_tuple_decl.hpp"
|
||||
|
||||
#endif // MSGPACK_MSGPACK_TUPLE_DECL_HPP
|
||||
|
@@ -12,5 +12,6 @@
|
||||
|
||||
#include "msgpack/v1/adaptor/nil_decl.hpp"
|
||||
#include "msgpack/v2/adaptor/nil_decl.hpp"
|
||||
#include "msgpack/v3/adaptor/nil_decl.hpp"
|
||||
|
||||
#endif // MSGPACK_TYPE_NIL_DECL_HPP
|
||||
|
@@ -12,5 +12,6 @@
|
||||
|
||||
#include "msgpack/v1/adaptor/raw_decl.hpp"
|
||||
#include "msgpack/v2/adaptor/raw_decl.hpp"
|
||||
#include "msgpack/v3/adaptor/raw_decl.hpp"
|
||||
|
||||
#endif // MSGPACK_TYPE_RAW_DECL_HPP
|
||||
|
@@ -12,5 +12,6 @@
|
||||
|
||||
#include "msgpack/v1/adaptor/size_equal_only_decl.hpp"
|
||||
#include "msgpack/v2/adaptor/size_equal_only_decl.hpp"
|
||||
#include "msgpack/v3/adaptor/size_equal_only_decl.hpp"
|
||||
|
||||
#endif // MSGPACK_TYPE_SIZE_EQUAL_ONLY_DECL_HPP
|
||||
|
@@ -12,5 +12,6 @@
|
||||
|
||||
#include "msgpack/v1/adaptor/v4raw_decl.hpp"
|
||||
#include "msgpack/v2/adaptor/v4raw_decl.hpp"
|
||||
#include "msgpack/v3/adaptor/v4raw_decl.hpp"
|
||||
|
||||
#endif // MSGPACK_TYPE_V4RAW_DECL_HPP
|
||||
|
15
include/msgpack/adaptor/wstring.hpp
Normal file
15
include/msgpack/adaptor/wstring.hpp
Normal file
@@ -0,0 +1,15 @@
|
||||
//
|
||||
// MessagePack for C++ static resolution routine
|
||||
//
|
||||
// Copyright (C) 2018 KONDO Takatoshi
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
#ifndef MSGPACK_TYPE_WSTRING_HPP
|
||||
#define MSGPACK_TYPE_WSTRING_HPP
|
||||
|
||||
#include "msgpack/v1/adaptor/wstring.hpp"
|
||||
|
||||
#endif // MSGPACK_TYPE_WSTRING_HPP
|
@@ -12,5 +12,6 @@
|
||||
|
||||
#include "msgpack/v1/cpp_config_decl.hpp"
|
||||
#include "msgpack/v2/cpp_config_decl.hpp"
|
||||
#include "msgpack/v3/cpp_config_decl.hpp"
|
||||
|
||||
#endif // MSGPACK_CPP_CONFIG_DECL_HPP
|
||||
|
17
include/msgpack/create_object_visitor.hpp
Normal file
17
include/msgpack/create_object_visitor.hpp
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// MessagePack for C++ deserializing routine
|
||||
//
|
||||
// Copyright (C) 2018 KONDO Takatoshi
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
#ifndef MSGPACK_CREATE_OBJECT_VISITOR_HPP
|
||||
#define MSGPACK_CREATE_OBJECT_VISITOR_HPP
|
||||
|
||||
#include "msgpack/create_object_visitor_decl.hpp"
|
||||
|
||||
#include "msgpack/v2/create_object_visitor.hpp"
|
||||
|
||||
#endif // MSGPACK_CREATE_OBJECT_VISITOR_HPP
|
16
include/msgpack/create_object_visitor_decl.hpp
Normal file
16
include/msgpack/create_object_visitor_decl.hpp
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// MessagePack for C++ deserializing routine
|
||||
//
|
||||
// Copyright (C) 2018 KONDO Takatoshi
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
#ifndef MSGPACK_CREATE_OBJECT_VISITOR_DECL_HPP
|
||||
#define MSGPACK_CREATE_OBJECT_VISITOR_DECL_HPP
|
||||
|
||||
#include "msgpack/v2/create_object_visitor_decl.hpp"
|
||||
#include "msgpack/v3/create_object_visitor_decl.hpp"
|
||||
|
||||
#endif // MSGPACK_CREATE_OBJECT_VISITOR_DECL_HPP
|
@@ -12,5 +12,6 @@
|
||||
|
||||
#include "msgpack/v1/fbuffer_decl.hpp"
|
||||
#include "msgpack/v2/fbuffer_decl.hpp"
|
||||
#include "msgpack/v3/fbuffer_decl.hpp"
|
||||
|
||||
#endif // MSGPACK_FBUFFER_DECL_HPP
|
||||
|
@@ -13,5 +13,6 @@
|
||||
|
||||
#include <msgpack/v1/iterator_decl.hpp>
|
||||
#include <msgpack/v2/iterator_decl.hpp>
|
||||
#include <msgpack/v3/iterator_decl.hpp>
|
||||
|
||||
#endif // MSGPACK_V1_ITERATOR_DECL_HPP
|
||||
#endif // MSGPACK_ITERATOR_DECL_HPP
|
||||
|
@@ -13,5 +13,6 @@
|
||||
|
||||
#include "msgpack/v1/meta_decl.hpp"
|
||||
#include "msgpack/v2/meta_decl.hpp"
|
||||
#include "msgpack/v3/meta_decl.hpp"
|
||||
|
||||
#endif // MSGPACK_META_DECL_HPP
|
||||
|
17
include/msgpack/null_visitor.hpp
Normal file
17
include/msgpack/null_visitor.hpp
Normal file
@@ -0,0 +1,17 @@
|
||||
//
|
||||
// MessagePack for C++ deserializing routine
|
||||
//
|
||||
// Copyright (C) 2018 KONDO Takatoshi
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
#ifndef MSGPACK_NULL_VISITOR_HPP
|
||||
#define MSGPACK_NULL_VISITOR_HPP
|
||||
|
||||
#include "msgpack/null_visitor_decl.hpp"
|
||||
|
||||
#include "msgpack/v2/null_visitor.hpp"
|
||||
|
||||
#endif // MSGPACK_NULL_VISITOR_HPP
|
16
include/msgpack/null_visitor_decl.hpp
Normal file
16
include/msgpack/null_visitor_decl.hpp
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// MessagePack for C++ deserializing routine
|
||||
//
|
||||
// Copyright (C) 2018 KONDO Takatoshi
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
#ifndef MSGPACK_NULL_VISITOR_DECL_HPP
|
||||
#define MSGPACK_NULL_VISITOR_DECL_HPP
|
||||
|
||||
#include "msgpack/v2/null_visitor_decl.hpp"
|
||||
#include "msgpack/v3/null_visitor_decl.hpp"
|
||||
|
||||
#endif // MSGPACK_NULL_VISITOR_DECL_HPP
|
@@ -97,8 +97,10 @@ typedef struct msgpack_object_kv {
|
||||
msgpack_object val;
|
||||
} msgpack_object_kv;
|
||||
|
||||
#if !defined(_KERNEL_MODE)
|
||||
MSGPACK_DLLEXPORT
|
||||
void msgpack_object_print(FILE* out, msgpack_object o);
|
||||
#endif
|
||||
|
||||
MSGPACK_DLLEXPORT
|
||||
int msgpack_object_print_buffer(char *buffer, size_t buffer_size, msgpack_object o);
|
||||
|
@@ -13,5 +13,6 @@
|
||||
|
||||
#include "msgpack/v1/object_decl.hpp"
|
||||
#include "msgpack/v2/object_decl.hpp"
|
||||
#include "msgpack/v3/object_decl.hpp"
|
||||
|
||||
#endif // MSGPACK_OBJECT_DECL_HPP
|
||||
|
@@ -15,5 +15,6 @@
|
||||
|
||||
#include "msgpack/v1/object_fwd.hpp"
|
||||
#include "msgpack/v2/object_fwd.hpp"
|
||||
#include "msgpack/v3/object_fwd.hpp"
|
||||
|
||||
#endif // MSGPACK_OBJECT_FWD_HPP
|
||||
|
@@ -13,5 +13,6 @@
|
||||
|
||||
#include "msgpack/v1/object_fwd_decl.hpp"
|
||||
#include "msgpack/v2/object_fwd_decl.hpp"
|
||||
#include "msgpack/v3/object_fwd_decl.hpp"
|
||||
|
||||
#endif // MSGPACK_OBJECT_FWD_DECL_HPP
|
||||
|
@@ -12,6 +12,7 @@
|
||||
|
||||
#include "pack_define.h"
|
||||
#include "object.h"
|
||||
#include "timestamp.h"
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
@@ -98,6 +99,9 @@ static int msgpack_pack_bin_body(msgpack_packer* pk, const void* b, size_t l);
|
||||
static int msgpack_pack_ext(msgpack_packer* pk, size_t l, int8_t type);
|
||||
static int msgpack_pack_ext_body(msgpack_packer* pk, const void* b, size_t l);
|
||||
|
||||
static int msgpack_pack_timestamp(msgpack_packer* pk, const msgpack_timestamp* d);
|
||||
|
||||
MSGPACK_DLLEXPORT
|
||||
int msgpack_pack_object(msgpack_packer* pk, msgpack_object d);
|
||||
|
||||
|
||||
|
@@ -12,5 +12,6 @@
|
||||
|
||||
#include "msgpack/v1/pack_decl.hpp"
|
||||
#include "msgpack/v2/pack_decl.hpp"
|
||||
#include "msgpack/v3/pack_decl.hpp"
|
||||
|
||||
#endif // MSGPACK_PACK_DECL_HPP
|
||||
|
@@ -34,6 +34,10 @@
|
||||
#error msgpack_pack_append_buffer callback is not defined
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma warning(push)
|
||||
# pragma warning(disable : 4204) /* nonstandard extension used: non-constant aggregate initializer */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Integer
|
||||
@@ -834,31 +838,31 @@ msgpack_pack_inline_func(_ext)(msgpack_pack_user x, size_t l, int8_t type)
|
||||
case 1: {
|
||||
unsigned char buf[2];
|
||||
buf[0] = 0xd4;
|
||||
buf[1] = type;
|
||||
buf[1] = (unsigned char)type;
|
||||
msgpack_pack_append_buffer(x, buf, 2);
|
||||
} break;
|
||||
case 2: {
|
||||
unsigned char buf[2];
|
||||
buf[0] = 0xd5;
|
||||
buf[1] = type;
|
||||
buf[1] = (unsigned char)type;
|
||||
msgpack_pack_append_buffer(x, buf, 2);
|
||||
} break;
|
||||
case 4: {
|
||||
unsigned char buf[2];
|
||||
buf[0] = 0xd6;
|
||||
buf[1] = type;
|
||||
buf[1] = (unsigned char)type;
|
||||
msgpack_pack_append_buffer(x, buf, 2);
|
||||
} break;
|
||||
case 8: {
|
||||
unsigned char buf[2];
|
||||
buf[0] = 0xd7;
|
||||
buf[1] = type;
|
||||
buf[1] = (unsigned char)type;
|
||||
msgpack_pack_append_buffer(x, buf, 2);
|
||||
} break;
|
||||
case 16: {
|
||||
unsigned char buf[2];
|
||||
buf[0] = 0xd8;
|
||||
buf[1] = type;
|
||||
buf[1] = (unsigned char)type;
|
||||
msgpack_pack_append_buffer(x, buf, 2);
|
||||
} break;
|
||||
default:
|
||||
@@ -866,19 +870,19 @@ msgpack_pack_inline_func(_ext)(msgpack_pack_user x, size_t l, int8_t type)
|
||||
unsigned char buf[3];
|
||||
buf[0] = 0xc7;
|
||||
buf[1] = (unsigned char)l;
|
||||
buf[2] = type;
|
||||
buf[2] = (unsigned char)type;
|
||||
msgpack_pack_append_buffer(x, buf, 3);
|
||||
} else if(l < 65536) {
|
||||
unsigned char buf[4];
|
||||
buf[0] = 0xc8;
|
||||
_msgpack_store16(&buf[1], l);
|
||||
buf[3] = type;
|
||||
buf[3] = (unsigned char)type;
|
||||
msgpack_pack_append_buffer(x, buf, 4);
|
||||
} else {
|
||||
unsigned char buf[6];
|
||||
buf[0] = 0xc9;
|
||||
_msgpack_store32(&buf[1], l);
|
||||
buf[5] = type;
|
||||
buf[5] = (unsigned char)type;
|
||||
msgpack_pack_append_buffer(x, buf, 6);
|
||||
}
|
||||
break;
|
||||
@@ -890,6 +894,34 @@ msgpack_pack_inline_func(_ext_body)(msgpack_pack_user x, const void* b, size_t l
|
||||
msgpack_pack_append_buffer(x, (const unsigned char*)b, l);
|
||||
}
|
||||
|
||||
msgpack_pack_inline_func(_timestamp)(msgpack_pack_user x, const msgpack_timestamp* d)
|
||||
{
|
||||
if ((((int64_t)d->tv_sec) >> 34) == 0) {
|
||||
uint64_t data64 = ((uint64_t) d->tv_nsec << 34) | (uint64_t)d->tv_sec;
|
||||
if ((data64 & 0xffffffff00000000L) == 0) {
|
||||
// timestamp 32
|
||||
char buf[4];
|
||||
uint32_t data32 = (uint32_t)data64;
|
||||
msgpack_pack_ext(x, 4, -1);
|
||||
_msgpack_store32(buf, data32);
|
||||
msgpack_pack_append_buffer(x, buf, 4);
|
||||
} else {
|
||||
// timestamp 64
|
||||
char buf[8];
|
||||
msgpack_pack_ext(x, 8, -1);
|
||||
_msgpack_store64(buf, data64);
|
||||
msgpack_pack_append_buffer(x, buf, 8);
|
||||
}
|
||||
} else {
|
||||
// timestamp 96
|
||||
char buf[12];
|
||||
_msgpack_store32(&buf[0], d->tv_nsec);
|
||||
_msgpack_store64(&buf[4], d->tv_sec);
|
||||
msgpack_pack_ext(x, 12, -1);
|
||||
msgpack_pack_append_buffer(x, buf, 12);
|
||||
}
|
||||
}
|
||||
|
||||
#undef msgpack_pack_inline_func
|
||||
#undef msgpack_pack_user
|
||||
#undef msgpack_pack_append_buffer
|
||||
@@ -907,3 +939,7 @@ msgpack_pack_inline_func(_ext_body)(msgpack_pack_user x, const void* b, size_t l
|
||||
#undef msgpack_pack_real_int16
|
||||
#undef msgpack_pack_real_int32
|
||||
#undef msgpack_pack_real_int64
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
# pragma warning(pop)
|
||||
#endif
|
||||
|
18
include/msgpack/parse.hpp
Normal file
18
include/msgpack/parse.hpp
Normal file
@@ -0,0 +1,18 @@
|
||||
//
|
||||
// MessagePack for C++ deserializing routine
|
||||
//
|
||||
// Copyright (C) 2018 KONDO Takatoshi
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
#ifndef MSGPACK_PARSE_HPP
|
||||
#define MSGPACK_PARSE_HPP
|
||||
|
||||
#include "msgpack/parse_decl.hpp"
|
||||
|
||||
#include "msgpack/v2/parse.hpp"
|
||||
#include "msgpack/v3/parse.hpp"
|
||||
|
||||
#endif // MSGPACK_PARSE_HPP
|
16
include/msgpack/parse_decl.hpp
Normal file
16
include/msgpack/parse_decl.hpp
Normal file
@@ -0,0 +1,16 @@
|
||||
//
|
||||
// MessagePack for C++ deserializing routine
|
||||
//
|
||||
// Copyright (C) 2018 KONDO Takatoshi
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
#ifndef MSGPACK_PARSE_DECL_HPP
|
||||
#define MSGPACK_PARSE_DECL_HPP
|
||||
|
||||
#include "msgpack/v2/parse_decl.hpp"
|
||||
#include "msgpack/v3/parse_decl.hpp"
|
||||
|
||||
#endif // MSGPACK_PARSE_DECL_HPP
|
@@ -12,5 +12,6 @@
|
||||
|
||||
#include "msgpack/v1/parse_return.hpp"
|
||||
#include "msgpack/v2/parse_return.hpp"
|
||||
#include "msgpack/v3/parse_return.hpp"
|
||||
|
||||
#endif // MSGPACK_PARSE_RETURN_HPP
|
||||
|
@@ -19,6 +19,7 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
#include <msgpack/predef/architecture/mips.h>
|
||||
#include <msgpack/predef/architecture/parisc.h>
|
||||
#include <msgpack/predef/architecture/ppc.h>
|
||||
#include <msgpack/predef/architecture/ptx.h>
|
||||
#include <msgpack/predef/architecture/pyramid.h>
|
||||
#include <msgpack/predef/architecture/rs6k.h>
|
||||
#include <msgpack/predef/architecture/sparc.h>
|
||||
|
@@ -27,11 +27,14 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
[[`__TARGET_ARCH_ARM`] [__predef_detection__]]
|
||||
[[`__TARGET_ARCH_THUMB`] [__predef_detection__]]
|
||||
[[`_M_ARM`] [__predef_detection__]]
|
||||
[[`_M_ARM64`] [__predef_detection__]]
|
||||
|
||||
[[`__arm64`] [8.0.0]]
|
||||
[[`__TARGET_ARCH_ARM`] [V.0.0]]
|
||||
[[`__TARGET_ARCH_THUMB`] [V.0.0]]
|
||||
[[`__ARM_ARCH`] [V.0.0]]
|
||||
[[`_M_ARM`] [V.0.0]]
|
||||
[[`_M_ARM64`] [8.0.0]]
|
||||
]
|
||||
*/
|
||||
|
||||
@@ -39,7 +42,8 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#if defined(__arm__) || defined(__arm64) || defined(__thumb__) || \
|
||||
defined(__TARGET_ARCH_ARM) || defined(__TARGET_ARCH_THUMB) || \
|
||||
defined(_M_ARM)
|
||||
defined(__ARM_ARCH) || \
|
||||
defined(_M_ARM) || defined(_M_ARM64)
|
||||
# undef MSGPACK_ARCH_ARM
|
||||
# if !defined(MSGPACK_ARCH_ARM) && defined(__arm64)
|
||||
# define MSGPACK_ARCH_ARM MSGPACK_VERSION_NUMBER(8,0,0)
|
||||
@@ -50,6 +54,12 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
# if !defined(MSGPACK_ARCH_ARM) && defined(__TARGET_ARCH_THUMB)
|
||||
# define MSGPACK_ARCH_ARM MSGPACK_VERSION_NUMBER(__TARGET_ARCH_THUMB,0,0)
|
||||
# endif
|
||||
# if !defined(MSGPACK_ARCH_ARM) && defined(__ARM_ARCH)
|
||||
# define MSGPACK_ARCH_ARM MSGPACK_VERSION_NUMBER(__ARM_ARCH,0,0)
|
||||
# endif
|
||||
# if !defined(MSGPACK_ARCH_ARM) && defined(_M_ARM64)
|
||||
# define MSGPACK_ARCH_ARM MSGPACK_VERSION_NUMBER(8,0,0)
|
||||
# endif
|
||||
# if !defined(MSGPACK_ARCH_ARM) && defined(_M_ARM)
|
||||
# define MSGPACK_ARCH_ARM MSGPACK_VERSION_NUMBER(_M_ARM,0,0)
|
||||
# endif
|
||||
|
@@ -12,7 +12,7 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
#include <msgpack/predef/make.h>
|
||||
|
||||
/*`
|
||||
[heading `MSGPACK_ARCH_PARISK`]
|
||||
[heading `MSGPACK_ARCH_PARISC`]
|
||||
|
||||
[@http://en.wikipedia.org/wiki/PA-RISC_family HP/PA RISC] architecture.
|
||||
|
||||
|
44
include/msgpack/predef/architecture/ptx.h
Normal file
44
include/msgpack/predef/architecture/ptx.h
Normal file
@@ -0,0 +1,44 @@
|
||||
/*
|
||||
Copyright Benjamin Worpitz 2018
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef MSGPACK_PREDEF_ARCHITECTURE_PTX_H
|
||||
#define MSGPACK_PREDEF_ARCHITECTURE_PTX_H
|
||||
|
||||
#include <msgpack/predef/version_number.h>
|
||||
#include <msgpack/predef/make.h>
|
||||
|
||||
/*`
|
||||
[heading `MSGPACK_ARCH_PTX`]
|
||||
|
||||
[@https://en.wikipedia.org/wiki/Parallel_Thread_Execution PTX] architecture.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`__CUDA_ARCH__`] [__predef_detection__]]
|
||||
|
||||
[[`__CUDA_ARCH__`] [V.R.0]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define MSGPACK_ARCH_PTX MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if defined(__CUDA_ARCH__)
|
||||
# undef MSGPACK_ARCH_PTX
|
||||
# define MSGPACK_ARCH_PTX MSGPACK_PREDEF_MAKE_10_VR0(__CUDA_ARCH__)
|
||||
#endif
|
||||
|
||||
#if MSGPACK_ARCH_PTX
|
||||
# define MSGPACK_ARCH_PTX_AVAILABLE
|
||||
#endif
|
||||
|
||||
#define MSGPACK_ARCH_PTX_NAME "PTX"
|
||||
|
||||
#endif
|
||||
|
||||
#include <msgpack/predef/detail/test.h>
|
||||
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_ARCH_PTX,MSGPACK_ARCH_PTX_NAME)
|
@@ -32,6 +32,7 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
#include <msgpack/predef/compiler/metrowerks.h>
|
||||
#include <msgpack/predef/compiler/microtec.h>
|
||||
#include <msgpack/predef/compiler/mpw.h>
|
||||
#include <msgpack/predef/compiler/nvcc.h>
|
||||
#include <msgpack/predef/compiler/palm.h>
|
||||
#include <msgpack/predef/compiler/pgi.h>
|
||||
#include <msgpack/predef/compiler/sgi_mipspro.h>
|
||||
|
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright Rene Rivera 2008-2015
|
||||
Copyright Rene Rivera 2008-2017
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
@@ -25,7 +25,8 @@ Version number available as major, minor, and patch.
|
||||
[[`__ICC`] [__predef_detection__]]
|
||||
[[`__ECC`] [__predef_detection__]]
|
||||
|
||||
[[`__INTEL_COMPILER`] [V.R.P]]
|
||||
[[`__INTEL_COMPILER`] [V.R]]
|
||||
[[`__INTEL_COMPILER` and `__INTEL_COMPILER_UPDATE`] [V.R.P]]
|
||||
]
|
||||
*/
|
||||
|
||||
@@ -33,8 +34,21 @@ Version number available as major, minor, and patch.
|
||||
|
||||
#if defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || \
|
||||
defined(__ECC)
|
||||
/*`
|
||||
[note Because of an Intel mistake in the release version numbering when
|
||||
`__INTEL_COMPILER` is `9999` it is detected as version 12.1.0.]
|
||||
*/
|
||||
# if !defined(MSGPACK_COMP_INTEL_DETECTION) && defined(__INTEL_COMPILER) && (__INTEL_COMPILER == 9999)
|
||||
# define MSGPACK_COMP_INTEL_DETECTION MSGPACK_VERSION_NUMBER(12,1,0)
|
||||
# endif
|
||||
# if !defined(MSGPACK_COMP_INTEL_DETECTION) && defined(__INTEL_COMPILER) && defined(__INTEL_COMPILER_UPDATE)
|
||||
# define MSGPACK_COMP_INTEL_DETECTION MSGPACK_VERSION_NUMBER( \
|
||||
MSGPACK_VERSION_NUMBER_MAJOR(MSGPACK_PREDEF_MAKE_10_VVRR(__INTEL_COMPILER)), \
|
||||
MSGPACK_VERSION_NUMBER_MINOR(MSGPACK_PREDEF_MAKE_10_VVRR(__INTEL_COMPILER)), \
|
||||
__INTEL_COMPILER_UPDATE)
|
||||
# endif
|
||||
# if !defined(MSGPACK_COMP_INTEL_DETECTION) && defined(__INTEL_COMPILER)
|
||||
# define MSGPACK_COMP_INTEL_DETECTION MSGPACK_PREDEF_MAKE_10_VRP(__INTEL_COMPILER)
|
||||
# define MSGPACK_COMP_INTEL_DETECTION MSGPACK_PREDEF_MAKE_10_VVRR(__INTEL_COMPILER)
|
||||
# endif
|
||||
# if !defined(MSGPACK_COMP_INTEL_DETECTION)
|
||||
# define MSGPACK_COMP_INTEL_DETECTION MSGPACK_VERSION_NUMBER_AVAILABLE
|
||||
|
60
include/msgpack/predef/compiler/nvcc.h
Normal file
60
include/msgpack/predef/compiler/nvcc.h
Normal file
@@ -0,0 +1,60 @@
|
||||
/*
|
||||
Copyright Benjamin Worpitz 2018
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef MSGPACK_PREDEF_COMPILER_NVCC_H
|
||||
#define MSGPACK_PREDEF_COMPILER_NVCC_H
|
||||
|
||||
#include <msgpack/predef/version_number.h>
|
||||
#include <msgpack/predef/make.h>
|
||||
|
||||
/*`
|
||||
[heading `MSGPACK_COMP_NVCC`]
|
||||
|
||||
[@https://en.wikipedia.org/wiki/NVIDIA_CUDA_Compiler NVCC] compiler.
|
||||
Version number available as major, minor, and patch beginning with version 7.5.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`__NVCC__`] [__predef_detection__]]
|
||||
|
||||
[[`__CUDACC_VER_MAJOR__`, `__CUDACC_VER_MINOR__`, `__CUDACC_VER_BUILD__`] [V.R.P]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define MSGPACK_COMP_NVCC MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if defined(__NVCC__)
|
||||
# if !defined(__CUDACC_VER_MAJOR__) || !defined(__CUDACC_VER_MINOR__) || !defined(__CUDACC_VER_BUILD__)
|
||||
# define MSGPACK_COMP_NVCC_DETECTION MSGPACK_VERSION_NUMBER_AVAILABLE
|
||||
# else
|
||||
# define MSGPACK_COMP_NVCC_DETECTION MSGPACK_VERSION_NUMBER(__CUDACC_VER_MAJOR__, __CUDACC_VER_MINOR__, __CUDACC_VER_BUILD__)
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef MSGPACK_COMP_NVCC_DETECTION
|
||||
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
|
||||
# define MSGPACK_COMP_NVCC_EMULATED MSGPACK_COMP_NVCC_DETECTION
|
||||
# else
|
||||
# undef MSGPACK_COMP_NVCC
|
||||
# define MSGPACK_COMP_NVCC MSGPACK_COMP_NVCC_DETECTION
|
||||
# endif
|
||||
# define MSGPACK_COMP_NVCC_AVAILABLE
|
||||
# include <msgpack/predef/detail/comp_detected.h>
|
||||
#endif
|
||||
|
||||
#define MSGPACK_COMP_NVCC_NAME "NVCC"
|
||||
|
||||
#endif
|
||||
|
||||
#include <msgpack/predef/detail/test.h>
|
||||
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_NVCC,MSGPACK_COMP_NVCC_NAME)
|
||||
|
||||
#ifdef MSGPACK_COMP_NVCC_EMULATED
|
||||
#include <msgpack/predef/detail/test.h>
|
||||
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_NVCC_EMULATED,MSGPACK_COMP_NVCC_NAME)
|
||||
#endif
|
@@ -29,6 +29,10 @@ Version number available as major, minor, and patch.
|
||||
[[`_MSC_FULL_VER`] [V.R.P]]
|
||||
[[`_MSC_VER`] [V.R.0]]
|
||||
]
|
||||
|
||||
[note Release of Visual Studio after 2015 will no longer be identified
|
||||
by Boost Predef as the marketing version number. Instead we use the
|
||||
compiler version number directly, i.e. the _MSC_VER number.]
|
||||
*/
|
||||
|
||||
#define MSGPACK_COMP_MSVC MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
|
||||
@@ -53,8 +57,18 @@ Version number available as major, minor, and patch.
|
||||
means that the compiler and VS product versions are no longer
|
||||
in sync. Hence we need to use different formulas for
|
||||
mapping from MSC version to VS product version.
|
||||
|
||||
VS2017 is a total nightmare when it comes to version numbers.
|
||||
Hence to avoid arguments relating to that both present and
|
||||
future.. Any version after VS2015 will use solely the compiler
|
||||
version, i.e. cl.exe, as the version number here.
|
||||
*/
|
||||
# if (_MSC_VER >= 1900)
|
||||
# if (_MSC_VER > 1900)
|
||||
# define MSGPACK_COMP_MSVC_DETECTION MSGPACK_VERSION_NUMBER(\
|
||||
_MSC_VER/100,\
|
||||
_MSC_VER%100,\
|
||||
MSGPACK_COMP_MSVC_BUILD)
|
||||
# elif (_MSC_VER >= 1900)
|
||||
# define MSGPACK_COMP_MSVC_DETECTION MSGPACK_VERSION_NUMBER(\
|
||||
_MSC_VER/100-5,\
|
||||
_MSC_VER%100,\
|
||||
|
@@ -24,6 +24,7 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
[[`__ARM_NEON__`] [__predef_detection__]]
|
||||
[[`__aarch64__`] [__predef_detection__]]
|
||||
[[`_M_ARM`] [__predef_detection__]]
|
||||
[[`_M_ARM64`] [__predef_detection__]]
|
||||
]
|
||||
|
||||
[table
|
||||
@@ -32,6 +33,7 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
[[`__ARM_NEON__`] [MSGPACK_HW_SIMD_ARM_NEON_VERSION]]
|
||||
[[`__aarch64__`] [MSGPACK_HW_SIMD_ARM_NEON_VERSION]]
|
||||
[[`_M_ARM`] [MSGPACK_HW_SIMD_ARM_NEON_VERSION]]
|
||||
[[`_M_ARM64`] [MSGPACK_HW_SIMD_ARM_NEON_VERSION]]
|
||||
]
|
||||
|
||||
*/
|
||||
@@ -39,7 +41,7 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
#define MSGPACK_HW_SIMD_ARM MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#undef MSGPACK_HW_SIMD_ARM
|
||||
#if !defined(MSGPACK_HW_SIMD_ARM) && (defined(__ARM_NEON__) || defined(__aarch64__) || defined (_M_ARM))
|
||||
#if !defined(MSGPACK_HW_SIMD_ARM) && (defined(__ARM_NEON__) || defined(__aarch64__) || defined (_M_ARM) || defined (_M_ARM64))
|
||||
# define MSGPACK_HW_SIMD_ARM MSGPACK_HW_SIMD_ARM_NEON_VERSION
|
||||
#endif
|
||||
|
||||
|
@@ -21,7 +21,7 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
// ---------------------------------
|
||||
|
||||
/*`
|
||||
[heading `MSGPACK_HW_SIMD_X86_SSE4A_VERSION`]
|
||||
[heading `MSGPACK_HW_SIMD_X86_AMD_SSE4A_VERSION`]
|
||||
|
||||
[@https://en.wikipedia.org/wiki/SSE4##SSE4A SSE4A] x86 extension (AMD specific).
|
||||
|
||||
@@ -30,7 +30,7 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
#define MSGPACK_HW_SIMD_X86_AMD_SSE4A_VERSION MSGPACK_VERSION_NUMBER(4, 0, 0)
|
||||
|
||||
/*`
|
||||
[heading `MSGPACK_HW_SIMD_X86_FMA4_VERSION`]
|
||||
[heading `MSGPACK_HW_SIMD_X86_AMD_FMA4_VERSION`]
|
||||
|
||||
[@https://en.wikipedia.org/wiki/FMA_instruction_set#FMA4_instruction_set FMA4] x86 extension (AMD specific).
|
||||
|
||||
@@ -39,7 +39,7 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
#define MSGPACK_HW_SIMD_X86_AMD_FMA4_VERSION MSGPACK_VERSION_NUMBER(5, 1, 0)
|
||||
|
||||
/*`
|
||||
[heading `MSGPACK_HW_SIMD_X86_XOP_VERSION`]
|
||||
[heading `MSGPACK_HW_SIMD_X86_AMD_XOP_VERSION`]
|
||||
|
||||
[@https://en.wikipedia.org/wiki/XOP_instruction_set XOP] x86 extension (AMD specific).
|
||||
|
||||
|
@@ -13,5 +13,6 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
#include <msgpack/predef/language/stdc.h>
|
||||
#include <msgpack/predef/language/stdcpp.h>
|
||||
#include <msgpack/predef/language/objc.h>
|
||||
#include <msgpack/predef/language/cuda.h>
|
||||
|
||||
#endif
|
||||
|
52
include/msgpack/predef/language/cuda.h
Normal file
52
include/msgpack/predef/language/cuda.h
Normal file
@@ -0,0 +1,52 @@
|
||||
/*
|
||||
Copyright Benjamin Worpitz 2018
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef MSGPACK_PREDEF_LANGUAGE_CUDA_H
|
||||
#define MSGPACK_PREDEF_LANGUAGE_CUDA_H
|
||||
|
||||
#include <msgpack/predef/version_number.h>
|
||||
#include <msgpack/predef/make.h>
|
||||
|
||||
/*`
|
||||
[heading `MSGPACK_LANG_CUDA`]
|
||||
|
||||
[@https://en.wikipedia.org/wiki/CUDA CUDA C/C++] language.
|
||||
If available, the version is detected as VV.RR.P.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`__CUDACC__`] [__predef_detection__]]
|
||||
[[`__CUDA__`] [__predef_detection__]]
|
||||
|
||||
[[`CUDA_VERSION`] [VV.RR.P]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define MSGPACK_LANG_CUDA MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if defined(__CUDACC__) || defined(__CUDA__)
|
||||
# undef MSGPACK_LANG_CUDA
|
||||
# include <cuda.h>
|
||||
# if defined(CUDA_VERSION)
|
||||
# define MSGPACK_LANG_CUDA MSGPACK_PREDEF_MAKE_10_VVRRP(CUDA_VERSION)
|
||||
# else
|
||||
# define MSGPACK_LANG_CUDA MSGPACK_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if MSGPACK_LANG_CUDA
|
||||
# define MSGPACK_LANG_CUDA_AVAILABLE
|
||||
#endif
|
||||
|
||||
#define MSGPACK_LANG_CUDA_NAME "CUDA C/C++"
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#include <msgpack/predef/detail/test.h>
|
||||
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_LANG_CUDA,MSGPACK_LANG_CUDA_NAME)
|
@@ -12,6 +12,7 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
#include <msgpack/predef/library/c/_prefix.h>
|
||||
|
||||
#include <msgpack/predef/library/c/cloudabi.h>
|
||||
#include <msgpack/predef/library/c/gnu.h>
|
||||
#include <msgpack/predef/library/c/uc.h>
|
||||
#include <msgpack/predef/library/c/vms.h>
|
||||
|
53
include/msgpack/predef/library/c/cloudabi.h
Normal file
53
include/msgpack/predef/library/c/cloudabi.h
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Copyright (C) 2017 James E. King III
|
||||
*
|
||||
* Distributed under the Boost Software License, Version 1.0.
|
||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||
* http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef MSGPACK_PREDEF_LIBRARY_C_CLOUDABI_H
|
||||
#define MSGPACK_PREDEF_LIBRARY_C_CLOUDABI_H
|
||||
|
||||
#include <msgpack/predef/version_number.h>
|
||||
#include <msgpack/predef/make.h>
|
||||
|
||||
#include <msgpack/predef/library/c/_prefix.h>
|
||||
|
||||
#if defined(__CloudABI__)
|
||||
#include <stddef.h>
|
||||
#endif
|
||||
|
||||
/*`
|
||||
[heading `MSGPACK_LIB_C_CLOUDABI`]
|
||||
|
||||
[@https://github.com/NuxiNL/cloudlibc cloudlibc] - CloudABI's standard C library.
|
||||
Version number available as major, and minor.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`__cloudlibc__`] [__predef_detection__]]
|
||||
|
||||
[[`__cloudlibc_major__`, `__cloudlibc_minor__`] [V.R.0]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define MSGPACK_LIB_C_CLOUDABI MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if defined(__cloudlibc__)
|
||||
# undef MSGPACK_LIB_C_CLOUDABI
|
||||
# define MSGPACK_LIB_C_CLOUDABI \
|
||||
MSGPACK_VERSION_NUMBER(__cloudlibc_major__,__cloudlibc_minor__,0)
|
||||
#endif
|
||||
|
||||
#if MSGPACK_LIB_C_CLOUDABI
|
||||
# define MSGPACK_LIB_C_CLOUDABI_AVAILABLE
|
||||
#endif
|
||||
|
||||
#define MSGPACK_LIB_C_CLOUDABI_NAME "cloudlibc"
|
||||
|
||||
#endif
|
||||
|
||||
#include <msgpack/predef/detail/test.h>
|
||||
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_LIB_C_CLOUDABI,MSGPACK_LIB_C_CLOUDABI_NAME)
|
@@ -46,10 +46,14 @@ Macros are:
|
||||
#define MSGPACK_PREDEF_MAKE_0X_VVRRPP(V) MSGPACK_VERSION_NUMBER((V&0xFF0000)>>16,(V&0xFF00)>>8,(V&0xFF))
|
||||
/*` `MSGPACK_PREDEF_MAKE_10_VPPP(V)` */
|
||||
#define MSGPACK_PREDEF_MAKE_10_VPPP(V) MSGPACK_VERSION_NUMBER(((V)/1000)%10,0,(V)%1000)
|
||||
/*` `MSGPACK_PREDEF_MAKE_10_VR0(V)` */
|
||||
#define MSGPACK_PREDEF_MAKE_10_VR0(V) MSGPACK_VERSION_NUMBER(((V)/100)%10,((V)/10)%10,0)
|
||||
/*` `MSGPACK_PREDEF_MAKE_10_VRP(V)` */
|
||||
#define MSGPACK_PREDEF_MAKE_10_VRP(V) MSGPACK_VERSION_NUMBER(((V)/100)%10,((V)/10)%10,(V)%10)
|
||||
/*` `MSGPACK_PREDEF_MAKE_10_VRP000(V)` */
|
||||
#define MSGPACK_PREDEF_MAKE_10_VRP000(V) MSGPACK_VERSION_NUMBER(((V)/100000)%10,((V)/10000)%10,((V)/1000)%10)
|
||||
/*` `MSGPACK_PREDEF_MAKE_10_VRPPPP(V)` */
|
||||
#define MSGPACK_PREDEF_MAKE_10_VRPPPP(V) MSGPACK_VERSION_NUMBER(((V)/100000)%10,((V)/10000)%10,(V)%10000)
|
||||
/*` `MSGPACK_PREDEF_MAKE_10_VRPP(V)` */
|
||||
#define MSGPACK_PREDEF_MAKE_10_VRPP(V) MSGPACK_VERSION_NUMBER(((V)/1000)%10,((V)/100)%10,(V)%100)
|
||||
/*` `MSGPACK_PREDEF_MAKE_10_VRR(V)` */
|
||||
@@ -62,8 +66,12 @@ Macros are:
|
||||
#define MSGPACK_PREDEF_MAKE_10_VV00(V) MSGPACK_VERSION_NUMBER(((V)/100)%100,0,0)
|
||||
/*` `MSGPACK_PREDEF_MAKE_10_VVRR(V)` */
|
||||
#define MSGPACK_PREDEF_MAKE_10_VVRR(V) MSGPACK_VERSION_NUMBER(((V)/100)%100,(V)%100,0)
|
||||
/*` `MSGPACK_PREDEF_MAKE_10_VVRRP(V)` */
|
||||
#define MSGPACK_PREDEF_MAKE_10_VVRRP(V) MSGPACK_VERSION_NUMBER(((V)/1000)%100,((V)/10)%100,(V)%10)
|
||||
/*` `MSGPACK_PREDEF_MAKE_10_VVRRPP(V)` */
|
||||
#define MSGPACK_PREDEF_MAKE_10_VVRRPP(V) MSGPACK_VERSION_NUMBER(((V)/10000)%100,((V)/100)%100,(V)%100)
|
||||
/*` `MSGPACK_PREDEF_MAKE_10_VVRRPPP(V)` */
|
||||
#define MSGPACK_PREDEF_MAKE_10_VVRRPPP(V) MSGPACK_VERSION_NUMBER(((V)/100000)%100,((V)/1000)%100,(V)%1000)
|
||||
/*` `MSGPACK_PREDEF_MAKE_10_VVRR0PP00(V)` */
|
||||
#define MSGPACK_PREDEF_MAKE_10_VVRR0PP00(V) MSGPACK_VERSION_NUMBER(((V)/10000000)%100,((V)/100000)%100,((V)/100)%100)
|
||||
/*` `MSGPACK_PREDEF_MAKE_10_VVRR0PPPP(V)` */
|
||||
|
@@ -5,8 +5,8 @@ Distributed under the Boost Software License, Version 1.0.
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef MSGPACK_PREDEF_OS_ADROID_H
|
||||
#define MSGPACK_PREDEF_OS_ADROID_H
|
||||
#ifndef MSGPACK_PREDEF_OS_ANDROID_H
|
||||
#define MSGPACK_PREDEF_OS_ANDROID_H
|
||||
|
||||
#include <msgpack/predef/version_number.h>
|
||||
#include <msgpack/predef/make.h>
|
||||
|
@@ -34,13 +34,20 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
# define MSGPACK_OS_BSD_AVAILABLE
|
||||
# endif
|
||||
# undef MSGPACK_OS_BSD_FREE
|
||||
# include <sys/param.h>
|
||||
# if defined(__FreeBSD_version)
|
||||
# if __FreeBSD_version < 500000
|
||||
# if __FreeBSD_version == 491000
|
||||
# define MSGPACK_OS_BSD_FREE \
|
||||
MSGPACK_PREDEF_MAKE_10_VRP000(__FreeBSD_version)
|
||||
MSGPACK_VERSION_NUMBER(4, 10, 0)
|
||||
# elif __FreeBSD_version == 492000
|
||||
# define MSGPACK_OS_BSD_FREE \
|
||||
MSGPACK_VERSION_NUMBER(4, 11, 0)
|
||||
# elif __FreeBSD_version < 500000
|
||||
# define MSGPACK_OS_BSD_FREE \
|
||||
MSGPACK_PREDEF_MAKE_10_VRPPPP(__FreeBSD_version)
|
||||
# else
|
||||
# define MSGPACK_OS_BSD_FREE \
|
||||
MSGPACK_PREDEF_MAKE_10_VRR000(__FreeBSD_version)
|
||||
MSGPACK_PREDEF_MAKE_10_VVRRPPP(__FreeBSD_version)
|
||||
# endif
|
||||
# else
|
||||
# define MSGPACK_OS_BSD_FREE MSGPACK_VERSION_NUMBER_AVAILABLE
|
||||
|
@@ -50,6 +50,26 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
[[`OpenBSD4_7`] [4.7.0]]
|
||||
[[`OpenBSD4_8`] [4.8.0]]
|
||||
[[`OpenBSD4_9`] [4.9.0]]
|
||||
[[`OpenBSD5_0`] [5.0.0]]
|
||||
[[`OpenBSD5_1`] [5.1.0]]
|
||||
[[`OpenBSD5_2`] [5.2.0]]
|
||||
[[`OpenBSD5_3`] [5.3.0]]
|
||||
[[`OpenBSD5_4`] [5.4.0]]
|
||||
[[`OpenBSD5_5`] [5.5.0]]
|
||||
[[`OpenBSD5_6`] [5.6.0]]
|
||||
[[`OpenBSD5_7`] [5.7.0]]
|
||||
[[`OpenBSD5_8`] [5.8.0]]
|
||||
[[`OpenBSD5_9`] [5.9.0]]
|
||||
[[`OpenBSD6_0`] [6.0.0]]
|
||||
[[`OpenBSD6_1`] [6.1.0]]
|
||||
[[`OpenBSD6_2`] [6.2.0]]
|
||||
[[`OpenBSD6_3`] [6.3.0]]
|
||||
[[`OpenBSD6_4`] [6.4.0]]
|
||||
[[`OpenBSD6_5`] [6.5.0]]
|
||||
[[`OpenBSD6_6`] [6.6.0]]
|
||||
[[`OpenBSD6_7`] [6.7.0]]
|
||||
[[`OpenBSD6_8`] [6.8.0]]
|
||||
[[`OpenBSD6_9`] [6.9.0]]
|
||||
]
|
||||
*/
|
||||
|
||||
@@ -153,6 +173,66 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD4_9)
|
||||
# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(4,9,0)
|
||||
# endif
|
||||
# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD5_0)
|
||||
# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(5,0,0)
|
||||
# endif
|
||||
# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD5_1)
|
||||
# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(5,1,0)
|
||||
# endif
|
||||
# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD5_2)
|
||||
# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(5,2,0)
|
||||
# endif
|
||||
# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD5_3)
|
||||
# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(5,3,0)
|
||||
# endif
|
||||
# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD5_4)
|
||||
# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(5,4,0)
|
||||
# endif
|
||||
# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD5_5)
|
||||
# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(5,5,0)
|
||||
# endif
|
||||
# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD5_6)
|
||||
# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(5,6,0)
|
||||
# endif
|
||||
# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD5_7)
|
||||
# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(5,7,0)
|
||||
# endif
|
||||
# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD5_8)
|
||||
# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(5,8,0)
|
||||
# endif
|
||||
# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD5_9)
|
||||
# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(5,9,0)
|
||||
# endif
|
||||
# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD6_0)
|
||||
# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(6,0,0)
|
||||
# endif
|
||||
# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD6_1)
|
||||
# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(6,1,0)
|
||||
# endif
|
||||
# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD6_2)
|
||||
# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(6,2,0)
|
||||
# endif
|
||||
# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD6_3)
|
||||
# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(6,3,0)
|
||||
# endif
|
||||
# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD6_4)
|
||||
# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(6,4,0)
|
||||
# endif
|
||||
# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD6_5)
|
||||
# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(6,5,0)
|
||||
# endif
|
||||
# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD6_6)
|
||||
# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(6,6,0)
|
||||
# endif
|
||||
# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD6_7)
|
||||
# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(6,7,0)
|
||||
# endif
|
||||
# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD6_8)
|
||||
# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(6,8,0)
|
||||
# endif
|
||||
# if !defined(MSGPACK_OS_BSD_OPEN) && defined(OpenBSD6_9)
|
||||
# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER(6,9,0)
|
||||
# endif
|
||||
# if !defined(MSGPACK_OS_BSD_OPEN)
|
||||
# define MSGPACK_OS_BSD_OPEN MSGPACK_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
|
@@ -148,8 +148,7 @@ information and acquired knowledge:
|
||||
# undef MSGPACK_ENDIAN_BIG_BYTE
|
||||
# define MSGPACK_ENDIAN_BIG_BYTE MSGPACK_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
# if MSGPACK_ARCH_AMD64 || \
|
||||
MSGPACK_ARCH_IA64 || \
|
||||
# if MSGPACK_ARCH_IA64 || \
|
||||
MSGPACK_ARCH_X86 || \
|
||||
MSGPACK_ARCH_BLACKFIN
|
||||
# undef MSGPACK_ENDIAN_LITTLE_BYTE
|
||||
|
87
include/msgpack/predef/other/workaround.h
Normal file
87
include/msgpack/predef/other/workaround.h
Normal file
@@ -0,0 +1,87 @@
|
||||
/*
|
||||
Copyright Rene Rivera 2017
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef MSGPACK_PREDEF_WORKAROUND_H
|
||||
#define MSGPACK_PREDEF_WORKAROUND_H
|
||||
|
||||
/*`
|
||||
[heading `MSGPACK_PREDEF_WORKAROUND`]
|
||||
|
||||
``
|
||||
MSGPACK_PREDEF_WORKAROUND(symbol,comp,major,minor,patch)
|
||||
``
|
||||
|
||||
Usage:
|
||||
|
||||
``
|
||||
#if MSGPACK_PREDEF_WORKAROUND(MSGPACK_COMP_CLANG,<,3,0,0)
|
||||
// Workaround for old clang compilers..
|
||||
#endif
|
||||
``
|
||||
|
||||
Defines a comparison against two version numbers that depends on the definion
|
||||
of `MSGPACK_STRICT_CONFIG`. When `MSGPACK_STRICT_CONFIG` is defined this will expand
|
||||
to a value convertible to `false`. Which has the effect of disabling all code
|
||||
conditionally guarded by `MSGPACK_PREDEF_WORKAROUND`. When `MSGPACK_STRICT_CONFIG`
|
||||
is undefine this expand to test the given `symbol` version value with the
|
||||
`comp` comparison against `MSGPACK_VERSION_NUMBER(major,minor,patch)`.
|
||||
*/
|
||||
#ifdef MSGPACK_STRICT_CONFIG
|
||||
# define MSGPACK_PREDEF_WORKAROUND(symbol, comp, major, minor, patch) (0)
|
||||
#else
|
||||
# include <msgpack/predef/version_number.h>
|
||||
# define MSGPACK_PREDEF_WORKAROUND(symbol, comp, major, minor, patch) \
|
||||
( (symbol) != (0) ) && \
|
||||
( (symbol) comp (MSGPACK_VERSION_NUMBER( (major) , (minor) , (patch) )) )
|
||||
#endif
|
||||
|
||||
/*`
|
||||
[heading `MSGPACK_PREDEF_TESTED_AT`]
|
||||
|
||||
``
|
||||
MSGPACK_PREDEF_TESTED_AT(symbol,major,minor,patch)
|
||||
``
|
||||
|
||||
Usage:
|
||||
|
||||
``
|
||||
#if MSGPACK_PREDEF_TESTED_AT(MSGPACK_COMP_CLANG,3,5,0)
|
||||
// Needed for clang, and last checked for 3.5.0.
|
||||
#endif
|
||||
``
|
||||
|
||||
Defines a comparison against two version numbers that depends on the definion
|
||||
of `MSGPACK_STRICT_CONFIG` and `MSGPACK_DETECT_OUTDATED_WORKAROUNDS`.
|
||||
When `MSGPACK_STRICT_CONFIG` is defined this will expand to a value convertible
|
||||
to `false`. Which has the effect of disabling all code
|
||||
conditionally guarded by `MSGPACK_PREDEF_TESTED_AT`. When `MSGPACK_STRICT_CONFIG`
|
||||
is undefined this expand to either:
|
||||
|
||||
* A value convertible to `true` when `MSGPACK_DETECT_OUTDATED_WORKAROUNDS` is not
|
||||
defined.
|
||||
* A value convertible `true` when the expansion of
|
||||
`MSGPACK_PREDEF_WORKAROUND(symbol, <=, major, minor, patch)` is `true` and
|
||||
`MSGPACK_DETECT_OUTDATED_WORKAROUNDS` is defined.
|
||||
* A compile error when the expansion of
|
||||
`MSGPACK_PREDEF_WORKAROUND(symbol, >, major, minor, patch)` is true and
|
||||
`MSGPACK_DETECT_OUTDATED_WORKAROUNDS` is defined.
|
||||
*/
|
||||
#ifdef MSGPACK_STRICT_CONFIG
|
||||
# define MSGPACK_PREDEF_TESTED_AT(symbol, major, minor, patch) (0)
|
||||
#else
|
||||
# ifdef MSGPACK_DETECT_OUTDATED_WORKAROUNDS
|
||||
# define MSGPACK_PREDEF_TESTED_AT(symbol, major, minor, patch) ( \
|
||||
MSGPACK_PREDEF_WORKAROUND(symbol, <=, major, minor, patch) \
|
||||
? 1 \
|
||||
: (1%0) )
|
||||
# else
|
||||
# define MSGPACK_PREDEF_TESTED_AT(symbol, major, minor, patch) \
|
||||
( (symbol) >= MSGPACK_VERSION_NUMBER_AVAILABLE )
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#endif
|
@@ -11,11 +11,18 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
#define MSGPACK_PREDEF_PLATFORM_H
|
||||
#endif
|
||||
|
||||
#include <msgpack/predef/platform/cloudabi.h>
|
||||
#include <msgpack/predef/platform/mingw.h>
|
||||
#include <msgpack/predef/platform/mingw32.h>
|
||||
#include <msgpack/predef/platform/mingw64.h>
|
||||
#include <msgpack/predef/platform/windows_uwp.h>
|
||||
#include <msgpack/predef/platform/windows_desktop.h>
|
||||
#include <msgpack/predef/platform/windows_store.h>
|
||||
#include <msgpack/predef/platform/windows_phone.h>
|
||||
#include <msgpack/predef/platform/windows_runtime.h>
|
||||
#include <msgpack/predef/platform/windows_server.h>
|
||||
#include <msgpack/predef/platform/windows_store.h>
|
||||
#include <msgpack/predef/platform/windows_system.h>
|
||||
#include <msgpack/predef/platform/windows_runtime.h> // deprecated
|
||||
#include <msgpack/predef/platform/ios.h>
|
||||
/*#include <msgpack/predef/platform/.h>*/
|
||||
|
||||
#endif
|
||||
|
43
include/msgpack/predef/platform/cloudabi.h
Normal file
43
include/msgpack/predef/platform/cloudabi.h
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
Copyright 2017 James E. King, III
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef MSGPACK_PREDEF_PLAT_CLOUDABI_H
|
||||
#define MSGPACK_PREDEF_PLAT_CLOUDABI_H
|
||||
|
||||
#include <msgpack/predef/version_number.h>
|
||||
#include <msgpack/predef/make.h>
|
||||
|
||||
/*`
|
||||
[heading `MSGPACK_PLAT_CLOUDABI`]
|
||||
|
||||
[@https://github.com/NuxiNL/cloudabi CloudABI] platform.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`__CloudABI__`] [__predef_detection__]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define MSGPACK_PLAT_CLOUDABI MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if defined(__CloudABI__)
|
||||
# undef MSGPACK_PLAT_CLOUDABI
|
||||
# define MSGPACK_PLAT_CLOUDABI MSGPACK_VERSION_NUMBER_AVAILABLE
|
||||
#endif
|
||||
|
||||
#if MSGPACK_PLAT_CLOUDABI
|
||||
# define MSGPACK_PLAT_CLOUDABI_AVAILABLE
|
||||
# include <msgpack/predef/detail/platform_detected.h>
|
||||
#endif
|
||||
|
||||
#define MSGPACK_PLAT_CLOUDABI_NAME "CloudABI"
|
||||
|
||||
#endif
|
||||
|
||||
#include <msgpack/predef/detail/test.h>
|
||||
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_PLAT_CLOUDABI,MSGPACK_PLAT_CLOUDABI_NAME)
|
58
include/msgpack/predef/platform/ios.h
Normal file
58
include/msgpack/predef/platform/ios.h
Normal file
@@ -0,0 +1,58 @@
|
||||
/*
|
||||
Copyright Ruslan Baratov 2017
|
||||
Copyright Rene Rivera 2017
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef MSGPACK_PREDEF_PLAT_IOS_H
|
||||
#define MSGPACK_PREDEF_PLAT_IOS_H
|
||||
|
||||
#include <msgpack/predef/os/ios.h> // MSGPACK_OS_IOS
|
||||
#include <msgpack/predef/version_number.h> // MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
/*`
|
||||
[heading `MSGPACK_PLAT_IOS_DEVICE`]
|
||||
[heading `MSGPACK_PLAT_IOS_SIMULATOR`]
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`TARGET_IPHONE_SIMULATOR`] [__predef_detection__]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define MSGPACK_PLAT_IOS_DEVICE MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
|
||||
#define MSGPACK_PLAT_IOS_SIMULATOR MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
// https://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/TargetConditionals.h
|
||||
#if MSGPACK_OS_IOS
|
||||
# include <TargetConditionals.h>
|
||||
# if TARGET_IPHONE_SIMULATOR == 1
|
||||
# undef MSGPACK_PLAT_IOS_SIMULATOR
|
||||
# define MSGPACK_PLAT_IOS_SIMULATOR MSGPACK_VERSION_NUMBER_AVAILABLE
|
||||
# else
|
||||
# undef MSGPACK_PLAT_IOS_DEVICE
|
||||
# define MSGPACK_PLAT_IOS_DEVICE MSGPACK_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if MSGPACK_PLAT_IOS_SIMULATOR
|
||||
# define MSGPACK_PLAT_IOS_SIMULATOR_AVAILABLE
|
||||
# include <msgpack/predef/detail/platform_detected.h>
|
||||
#endif
|
||||
|
||||
#if MSGPACK_PLAT_IOS_DEVICE
|
||||
# define MSGPACK_PLAT_IOS_DEVICE_AVAILABLE
|
||||
# include <msgpack/predef/detail/platform_detected.h>
|
||||
#endif
|
||||
|
||||
#define MSGPACK_PLAT_IOS_SIMULATOR_NAME "iOS Simulator"
|
||||
#define MSGPACK_PLAT_IOS_DEVICE_NAME "iOS Device"
|
||||
|
||||
#endif // MSGPACK_PREDEF_PLAT_IOS_H
|
||||
|
||||
#include <msgpack/predef/detail/test.h>
|
||||
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_PLAT_IOS_SIMULATOR,MSGPACK_PLAT_IOS_SIMULATOR_NAME)
|
||||
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_PLAT_IOS_DEVICE,MSGPACK_PLAT_IOS_DEVICE_NAME)
|
@@ -5,8 +5,8 @@ Distributed under the Boost Software License, Version 1.0.
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef MSGPACK_PREDEF_COMPILER_MINGW_H
|
||||
#define MSGPACK_PREDEF_COMPILER_MINGW_H
|
||||
#ifndef MSGPACK_PREDEF_PLAT_MINGW_H
|
||||
#define MSGPACK_PREDEF_PLAT_MINGW_H
|
||||
|
||||
#include <msgpack/predef/version_number.h>
|
||||
#include <msgpack/predef/make.h>
|
||||
@@ -14,7 +14,7 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
/*`
|
||||
[heading `MSGPACK_PLAT_MINGW`]
|
||||
|
||||
[@http://en.wikipedia.org/wiki/MinGW MinGW] platform.
|
||||
[@http://en.wikipedia.org/wiki/MinGW MinGW] platform, either variety.
|
||||
Version number available as major, minor, and patch.
|
||||
|
||||
[table
|
||||
@@ -56,7 +56,7 @@ Version number available as major, minor, and patch.
|
||||
# include <msgpack/predef/detail/platform_detected.h>
|
||||
#endif
|
||||
|
||||
#define MSGPACK_PLAT_MINGW_NAME "MinGW"
|
||||
#define MSGPACK_PLAT_MINGW_NAME "MinGW (any variety)"
|
||||
|
||||
#endif
|
||||
|
||||
|
63
include/msgpack/predef/platform/mingw32.h
Normal file
63
include/msgpack/predef/platform/mingw32.h
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
Copyright Rene Rivera 2008-2015
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef MSGPACK_PREDEF_PLAT_MINGW32_H
|
||||
#define MSGPACK_PREDEF_PLAT_MINGW32_H
|
||||
|
||||
#include <msgpack/predef/version_number.h>
|
||||
#include <msgpack/predef/make.h>
|
||||
|
||||
/*`
|
||||
[heading `MSGPACK_PLAT_MINGW32`]
|
||||
|
||||
[@http://www.mingw.org/ MinGW] platform.
|
||||
Version number available as major, minor, and patch.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`__MINGW32__`] [__predef_detection__]]
|
||||
|
||||
[[`__MINGW32_VERSION_MAJOR`, `__MINGW32_VERSION_MINOR`] [V.R.0]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define MSGPACK_PLAT_MINGW32 MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
# include <_mingw.h>
|
||||
# if !defined(MSGPACK_PLAT_MINGW32_DETECTION) && (defined(__MINGW32_VERSION_MAJOR) && defined(__MINGW32_VERSION_MINOR))
|
||||
# define MSGPACK_PLAT_MINGW32_DETECTION \
|
||||
MSGPACK_VERSION_NUMBER(__MINGW32_VERSION_MAJOR,__MINGW32_VERSION_MINOR,0)
|
||||
# endif
|
||||
# if !defined(MSGPACK_PLAT_MINGW32_DETECTION)
|
||||
# define MSGPACK_PLAT_MINGW32_DETECTION MSGPACK_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef MSGPACK_PLAT_MINGW32_DETECTION
|
||||
# define MSGPACK_PLAT_MINGW32_AVAILABLE
|
||||
# if defined(MSGPACK_PREDEF_DETAIL_PLAT_DETECTED)
|
||||
# define MSGPACK_PLAT_MINGW32_EMULATED MSGPACK_PLAT_MINGW32_DETECTION
|
||||
# else
|
||||
# undef MSGPACK_PLAT_MINGW32
|
||||
# define MSGPACK_PLAT_MINGW32 MSGPACK_PLAT_MINGW32_DETECTION
|
||||
# endif
|
||||
# include <msgpack/predef/detail/platform_detected.h>
|
||||
#endif
|
||||
|
||||
#define MSGPACK_PLAT_MINGW32_NAME "MinGW"
|
||||
|
||||
#endif
|
||||
|
||||
#include <msgpack/predef/detail/test.h>
|
||||
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_PLAT_MINGW32,MSGPACK_PLAT_MINGW32_NAME)
|
||||
|
||||
#ifdef MSGPACK_PLAT_MINGW32_EMULATED
|
||||
#include <msgpack/predef/detail/test.h>
|
||||
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_PLAT_MINGW32_EMULATED,MSGPACK_PLAT_MINGW32_NAME)
|
||||
#endif
|
63
include/msgpack/predef/platform/mingw64.h
Normal file
63
include/msgpack/predef/platform/mingw64.h
Normal file
@@ -0,0 +1,63 @@
|
||||
/*
|
||||
Copyright Rene Rivera 2008-2015
|
||||
Distributed under the Boost Software License, Version 1.0.
|
||||
(See accompanying file LICENSE_1_0.txt or copy at
|
||||
http://www.boost.org/LICENSE_1_0.txt)
|
||||
*/
|
||||
|
||||
#ifndef MSGPACK_PREDEF_PLAT_MINGW64_H
|
||||
#define MSGPACK_PREDEF_PLAT_MINGW64_H
|
||||
|
||||
#include <msgpack/predef/version_number.h>
|
||||
#include <msgpack/predef/make.h>
|
||||
|
||||
/*`
|
||||
[heading `MSGPACK_PLAT_MINGW64`]
|
||||
|
||||
[@https://mingw-w64.org/ MinGW-w64] platform.
|
||||
Version number available as major, minor, and patch.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`__MINGW64__`] [__predef_detection__]]
|
||||
|
||||
[[`__MINGW64_VERSION_MAJOR`, `__MINGW64_VERSION_MINOR`] [V.R.0]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define MSGPACK_PLAT_MINGW64 MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if defined(__MINGW64__)
|
||||
# include <_mingw.h>
|
||||
# if !defined(MSGPACK_PLAT_MINGW64_DETECTION) && (defined(__MINGW64_VERSION_MAJOR) && defined(__MINGW64_VERSION_MINOR))
|
||||
# define MSGPACK_PLAT_MINGW64_DETECTION \
|
||||
MSGPACK_VERSION_NUMBER(__MINGW64_VERSION_MAJOR,__MINGW64_VERSION_MINOR,0)
|
||||
# endif
|
||||
# if !defined(MSGPACK_PLAT_MINGW64_DETECTION)
|
||||
# define MSGPACK_PLAT_MINGW64_DETECTION MSGPACK_VERSION_NUMBER_AVAILABLE
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifdef MSGPACK_PLAT_MINGW64_DETECTION
|
||||
# define MSGPACK_PLAT_MINGW64_AVAILABLE
|
||||
# if defined(MSGPACK_PREDEF_DETAIL_PLAT_DETECTED)
|
||||
# define MSGPACK_PLAT_MINGW64_EMULATED MSGPACK_PLAT_MINGW64_DETECTION
|
||||
# else
|
||||
# undef MSGPACK_PLAT_MINGW64
|
||||
# define MSGPACK_PLAT_MINGW64 MSGPACK_PLAT_MINGW64_DETECTION
|
||||
# endif
|
||||
# include <msgpack/predef/detail/platform_detected.h>
|
||||
#endif
|
||||
|
||||
#define MSGPACK_PLAT_MINGW64_NAME "MinGW-w64"
|
||||
|
||||
#endif
|
||||
|
||||
#include <msgpack/predef/detail/test.h>
|
||||
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_PLAT_MINGW64,MSGPACK_PLAT_MINGW64_NAME)
|
||||
|
||||
#ifdef MSGPACK_PLAT_MINGW64_EMULATED
|
||||
#include <msgpack/predef/detail/test.h>
|
||||
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_PLAT_MINGW64_EMULATED,MSGPACK_PLAT_MINGW64_NAME)
|
||||
#endif
|
@@ -9,25 +9,31 @@ http://www.boost.org/LICENSE_1_0.txt)
|
||||
#ifndef MSGPACK_PREDEF_PLAT_WINDOWS_DESKTOP_H
|
||||
#define MSGPACK_PREDEF_PLAT_WINDOWS_DESKTOP_H
|
||||
|
||||
#include <msgpack/predef/version_number.h>
|
||||
#include <msgpack/predef/make.h>
|
||||
#include <msgpack/predef/os/windows.h>
|
||||
#include <msgpack/predef/platform/windows_uwp.h>
|
||||
#include <msgpack/predef/version_number.h>
|
||||
|
||||
/*`
|
||||
[heading `MSGPACK_PLAT_WINDOWS_DESKTOP`]
|
||||
|
||||
[@https://docs.microsoft.com/en-us/windows/uwp/get-started/universal-application-platform-guide UWP]
|
||||
for Windows Desktop development. Also available if the Platform SDK is too
|
||||
old to support UWP.
|
||||
|
||||
[table
|
||||
[[__predef_symbol__] [__predef_version__]]
|
||||
|
||||
[[`!WINAPI_FAMILY`] [__predef_detection__]]
|
||||
[[`WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP`] [__predef_detection__]]
|
||||
[[`!MSGPACK_PLAT_WINDOWS_UWP`] [__predef_detection__]]
|
||||
]
|
||||
*/
|
||||
|
||||
#define MSGPACK_PLAT_WINDOWS_DESKTOP MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
|
||||
|
||||
#if MSGPACK_OS_WINDOWS && \
|
||||
( !defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP) )
|
||||
((defined(WINAPI_FAMILY_DESKTOP_APP) && WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP) || \
|
||||
!MSGPACK_PLAT_WINDOWS_UWP)
|
||||
# undef MSGPACK_PLAT_WINDOWS_DESKTOP
|
||||
# define MSGPACK_PLAT_WINDOWS_DESKTOP MSGPACK_VERSION_NUMBER_AVAILABLE
|
||||
#endif
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user