remove C part files

remove the following files or folders:
ci/build_cmake_embedded.sh
example/c
example/cmake
include/msgpack/predef
include/msgpack/preprocessor.hpp
include/msgpack/preprocessor
include/msgpack/v1/preprocessor.hpp
include/msgpack.h
include/msgpack/fbuffer.h
include/msgpack/gcc_atomic.h
include/msgpack/object.h
include/msgpack/pack.h
include/msgpack/pack_define.h
include/msgpack/pack_template.h
include/msgpack/predef.h
include/msgpack/sbuffer.h
include/msgpack/timestamp.h
include/msgpack/unpack.h
include/msgpack/unpack_template.h
include/msgpack/util.h
include/msgpack/version.h
include/msgpack/vrefbuffer.h
include/msgpack/zbuffer.h
include/msgpack/zone.h
msgpack_vc8.sln
msgpack_vc8.vcproj
msgpack-config.cmake.in
msgpack.pc.in
src
test/fixint_c.cpp
test/msgpack_c.cpp
test/pack_unpack_c.cpp
test/streaming_c.cpp
.gitmodules
external
QUICKSTART-C.md
This commit is contained in:
yuangongji
2020-06-05 16:44:51 +08:00
parent 6e7deb8091
commit 689e6d053a
453 changed files with 0 additions and 55180 deletions

6
.gitmodules vendored
View File

@@ -1,6 +0,0 @@
[submodule "external/boost/predef"]
path = external/boost/predef
url = https://github.com/boostorg/predef.git
[submodule "external/boost/preprocessor"]
path = external/boost/preprocessor
url = https://github.com/boostorg/preprocessor.git

View File

@@ -1,191 +0,0 @@
# Implementation Status
The serialization library is production-ready.
Currently, RPC implementation is not available.
# Install
## Install with package manager
### MacOS with MacPorts
On MacOS, you can install MessagePack for C using MacPorts.
```
$ sudo port install msgpack
```
You might need to run `sudo port selfupdate` before installing to update the package repository.
You can also install via Homebrew.
```
$ brew install msgpack
```
### FreeBSD with Ports Collection
On FreeBSD, you can use Ports Collection. Install [net/msgpack](http://www.freebsd.org/cgi/cvsweb.cgi/ports/devel/msgpack/) package.
### Gentoo Linux with Portage
On Gentoo Linux, you can use emerge. Install [dev-libs/msgpack](http://gentoo-portage.com/dev-libs/msgpack) package.
### Windows with vcpkg
There are several package managers available, and vcpkg is typical.
```
$ vcpkg install msgpack:x64-windows
```
## Install with source code
### Build with cmake
You need to install cmake (2.8.12 or higher) first.
```
$ git clone https://github.com/msgpack/msgpack-c.git
$ cd msgpack-c
$ mkdir build
$ cd build
$ cmake ..
$ cmake --build .
$ cmake --build . --target install
```
### Build with autotools
In versions 1.4.2 and below, you can use `autotools` to build on UNIX-like platforms.
```
$ wget https://github.com/msgpack/msgpack-c/archive/cpp-1.3.0.tar.gz
$ tar zxvf msgpack-1.3.0.tar.gz
$ cd msgpack-1.3.0
$ ./bootstrap # If the 'configure' script already exists, you can omit this step.
$ ./configure
$ make
$ sudo make install
```
# Serialization QuickStart for C
## First program
Include `msgpack.h` header and link `msgpack` library to use MessagePack on your program.
```c
#include <msgpack.h>
#include <stdio.h>
int main(void) {
/* creates buffer and serializer instance. */
msgpack_sbuffer* buffer = msgpack_sbuffer_new();
msgpack_packer* pk = msgpack_packer_new(buffer, msgpack_sbuffer_write);
/* serializes ["Hello", "MessagePack"]. */
msgpack_pack_array(pk, 2);
msgpack_pack_bin(pk, 5);
msgpack_pack_bin_body(pk, "Hello", 5);
msgpack_pack_bin(pk, 11);
msgpack_pack_bin_body(pk, "MessagePack", 11);
/* deserializes it. */
msgpack_unpacked msg;
msgpack_unpacked_init(&msg);
msgpack_unpack_return ret = msgpack_unpack_next(&msg, buffer->data, buffer->size, NULL);
/* prints the deserialized object. */
msgpack_object obj = msg.data;
msgpack_object_print(stdout, obj); /*=> ["Hello", "MessagePack"] */
/* cleaning */
msgpack_sbuffer_free(buffer);
msgpack_packer_free(pk);
}
```
## Simple program with a loop
```c
#include <msgpack.h>
#include <stdio.h>
int main(void) {
/* creates buffer and serializer instance. */
msgpack_sbuffer* buffer = msgpack_sbuffer_new();
msgpack_packer* pk = msgpack_packer_new(buffer, msgpack_sbuffer_write);
int j;
for(j = 0; j<23; j++) {
/* NB: the buffer needs to be cleared on each iteration */
msgpack_sbuffer_clear(buffer);
/* serializes ["Hello", "MessagePack"]. */
msgpack_pack_array(pk, 3);
msgpack_pack_bin(pk, 5);
msgpack_pack_bin_body(pk, "Hello", 5);
msgpack_pack_bin(pk, 11);
msgpack_pack_bin_body(pk, "MessagePack", 11);
msgpack_pack_int(pk, j);
/* deserializes it. */
msgpack_unpacked msg;
msgpack_unpacked_init(&msg);
msgpack_unpack_return ret = msgpack_unpack_next(&msg, buffer->data, buffer->size, NULL);
/* prints the deserialized object. */
msgpack_object obj = msg.data;
msgpack_object_print(stdout, obj); /*=> ["Hello", "MessagePack"] */
puts("");
}
/* cleaning */
msgpack_sbuffer_free(buffer);
msgpack_packer_free(pk);
}
```
## Streaming feature
```c
#include <msgpack.h>
#include <stdio.h>
int main(void) {
/* serializes multiple objects using msgpack_packer. */
msgpack_sbuffer* buffer = msgpack_sbuffer_new();
msgpack_packer* pk = msgpack_packer_new(buffer, msgpack_sbuffer_write);
msgpack_pack_int(pk, 1);
msgpack_pack_int(pk, 2);
msgpack_pack_int(pk, 3);
/* deserializes these objects using msgpack_unpacker. */
msgpack_unpacker pac;
msgpack_unpacker_init(&pac, MSGPACK_UNPACKER_INIT_BUFFER_SIZE);
/* feeds the buffer. */
msgpack_unpacker_reserve_buffer(&pac, buffer->size);
memcpy(msgpack_unpacker_buffer(&pac), buffer->data, buffer->size);
msgpack_unpacker_buffer_consumed(&pac, buffer->size);
/* now starts streaming deserialization. */
msgpack_unpacked result;
msgpack_unpacked_init(&result);
while(msgpack_unpacker_next(&pac, &result)) {
msgpack_object_print(stdout, result.data);
puts("");
}
/* results:
* $ gcc stream.cc -lmsgpackc -o stream
* $ ./stream
* 1
* 2
* 3
*/
}
```

View File

@@ -1,59 +0,0 @@
#!/bin/bash
cd example/cmake
ret=$?
if [ $ret -ne 0 ]
then
exit $ret
fi
rm -f msgpack-c
ret=$?
if [ $ret -ne 0 ]
then
exit $ret
fi
ln -s ../.. msgpack-c
ret=$?
if [ $ret -ne 0 ]
then
exit $ret
fi
mkdir build
ret=$?
if [ $ret -ne 0 ]
then
exit $ret
fi
cd build
ret=$?
if [ $ret -ne 0 ]
then
exit $ret
fi
cmake -DEXAMPLE_MSGPACK_EMBEDDED=ON ..
ret=$?
if [ $ret -ne 0 ]
then
exit $ret
fi
make example example-static
ret=$?
if [ $ret -ne 0 ]
then
exit $ret
fi
exit 0

View File

@@ -1,44 +0,0 @@
FIND_PACKAGE (cJSON)
LIST (APPEND exec_PROGRAMS
boundary.c
lib_buffer_unpack.c
simple_c.c
speed_test_uint32_array.c
speed_test_uint64_array.c
user_buffer_unpack.c
)
IF (cJSON_FOUND)
LIST (APPEND exec_PROGRAMS jsonconv.c)
ENDIF ()
FOREACH (source_file ${exec_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
)
IF ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_C_COMPILER_ID}" STREQUAL "GNU")
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wall -Wextra")
ENDIF ()
IF ("${CMAKE_C_COMPILER_ID}" STREQUAL "Clang")
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-mismatched-tags")
ENDIF ()
IF ("${CMAKE_C_COMPILER_ID}" STREQUAL "MSVC")
IF (CMAKE_C_FLAGS MATCHES "/W[0-4]")
STRING(REGEX REPLACE "/W[0-4]" "/W3 /WX" CMAKE_C_FLAGS "${CMAKE_C_FLAGS}")
ELSE ()
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /W3 /WX")
ENDIF ()
ENDIF ()
ENDFOREACH ()
IF (cJSON_FOUND)
TARGET_LINK_LIBRARIES (jsonconv ${CJSON_LIBRARIES})
TARGET_INCLUDE_DIRECTORIES(jsonconv PRIVATE ${CJSON_INCLUDE_DIRS})
ENDIF ()

View File

@@ -1,296 +0,0 @@
/* gcc boundary.c -o boundary -Wconversion -Wpointer-sign */
#include <msgpack.h>
#include <stdio.h>
#include <assert.h>
static inline unsigned char atohex(char a)
{
int x;
if (a >= 'a') {
x = a - 'a' + 10;
} else if (a >= 'A') {
x = a - 'A' + 10;
} else {
x = a - '0';
}
assert(x >= 0 && x < 16);
return (unsigned char)x;
}
// Return 0 if equal
static inline int bytesncmp(char *data, const char *bytes, size_t len)
{
size_t n = len >> 1;
size_t i = 0;
int diff;
for (; i < n; i++) {
diff = (unsigned char)data[i] - (atohex(bytes[2 * i]) << 4) - atohex(bytes[2 * i + 1]);
if (diff != 0) {
return diff;
}
}
return 0;
}
int main()
{
msgpack_sbuffer sbuf;
msgpack_packer *x;
size_t offset = 0;
char data[65536];
msgpack_timestamp ts[] = {
{ 0xFFFFFFFF, 0 },
{ 0x100000000, 0 },
{ 0x3FFFFFFFF, 0 },
{ 0x400000000, 0 },
{ INT64_MAX, UINT32_MAX }
};
#define check_sbuffer(b) \
do { \
size_t len = strlen(#b); \
assert((sbuf.size - offset) * 2 == len); \
assert(bytesncmp(sbuf.data + offset, #b, len) == 0); \
offset = sbuf.size; \
} while (0)
msgpack_sbuffer_init(&sbuf);
x = msgpack_packer_new(&sbuf, msgpack_sbuffer_write);
msgpack_pack_fix_uint8(x, 0); check_sbuffer(cc00); /* cc 00 */
msgpack_pack_fix_uint8(x, 0xFF); check_sbuffer(ccff); /* cc ff */
msgpack_pack_fix_uint16(x, 0); check_sbuffer(cd0000); /* cd 00 00 */
msgpack_pack_fix_uint16(x, 0xFFFF); check_sbuffer(cdffff); /* cd ff ff */
msgpack_pack_fix_uint32(x, 0); check_sbuffer(ce00000000); /* ce 00 00 00 00 */
msgpack_pack_fix_uint32(x, 0xFFFFFFFF); check_sbuffer(ceffffffff); /* ce ff ff ff ff */
msgpack_pack_fix_uint64(x, 0); check_sbuffer(cf0000000000000000); /* cf 00 00 00 00 00 00 00 00 */
msgpack_pack_fix_uint64(x, 0xFFFFFFFFFFFFFFFF); check_sbuffer(cfffffffffffffffff); /* cf ff ff ff ff ff ff ff ff */
msgpack_pack_uint8(x, 0); check_sbuffer(00); /* 00 */
msgpack_pack_uint8(x, 0x7F); check_sbuffer(7f); /* 7f */
msgpack_pack_uint8(x, 0x80); check_sbuffer(cc80); /* cc 80 */
msgpack_pack_uint8(x, 0xFF); check_sbuffer(ccff); /* cc ff */
msgpack_pack_uint16(x, 0); check_sbuffer(00); /* 00 */
msgpack_pack_uint16(x, 0x7F); check_sbuffer(7f); /* 7f */
msgpack_pack_uint16(x, 0x80); check_sbuffer(cc80); /* cc 80 */
msgpack_pack_uint16(x, 0xFF); check_sbuffer(ccff); /* cc ff */
msgpack_pack_uint16(x, 0x100); check_sbuffer(cd0100); /* cd 01 00 */
msgpack_pack_uint16(x, 0xFFFF); check_sbuffer(cdffff); /* cd ff ff */
msgpack_pack_uint32(x, 0); check_sbuffer(00); /* 00 */
msgpack_pack_uint32(x, 0x7F); check_sbuffer(7f); /* 7f */
msgpack_pack_uint32(x, 0x80); check_sbuffer(cc80); /* cc 80 */
msgpack_pack_uint32(x, 0xFF); check_sbuffer(ccff); /* cc ff */
msgpack_pack_uint32(x, 0x100); check_sbuffer(cd0100); /* cd 01 00 */
msgpack_pack_uint32(x, 0xFFFF); check_sbuffer(cdffff); /* cd ff ff */
msgpack_pack_uint32(x, 0x10000); check_sbuffer(ce00010000); /* ce 00 01 00 00 */
msgpack_pack_uint32(x, 0xFFFFFFFF); check_sbuffer(ceffffffff); /* ce ff ff ff ff */
msgpack_pack_uint64(x, 0); check_sbuffer(00); /* 00 */
msgpack_pack_uint64(x, 0x7F); check_sbuffer(7f); /* 7f */
msgpack_pack_uint64(x, 0x80); check_sbuffer(cc80); /* cc 80 */
msgpack_pack_uint64(x, 0xFF); check_sbuffer(ccff); /* cc ff */
msgpack_pack_uint64(x, 0x100); check_sbuffer(cd0100); /* cd 01 00 */
msgpack_pack_uint64(x, 0xFFFF); check_sbuffer(cdffff); /* cd ff ff */
msgpack_pack_uint64(x, 0x10000); check_sbuffer(ce00010000); /* ce 00 01 00 00 */
msgpack_pack_uint64(x, 0xFFFFFFFF); check_sbuffer(ceffffffff); /* ce ff ff ff ff */
msgpack_pack_uint64(x, 0x100000000); check_sbuffer(cf0000000100000000); /* cf 00 00 00 01 00 00 00 00 */
msgpack_pack_uint64(x, 0xFFFFFFFFFFFFFFFF); check_sbuffer(cfffffffffffffffff); /* cf ff ff ff ff ff ff ff ff */
msgpack_pack_fix_int8(x, 0x7F); check_sbuffer(d07f); /* d0 7f */
msgpack_pack_fix_int8(x, -0x7F-1); check_sbuffer(d080); /* d0 80 */
msgpack_pack_fix_int16(x, 0x7FFF); check_sbuffer(d17fff); /* d1 7f ff */
msgpack_pack_fix_int16(x, -0x7FFF-1); check_sbuffer(d18000); /* d1 80 00 */
msgpack_pack_fix_int32(x, 0x7FFFFFFF); check_sbuffer(d27fffffff); /* d2 7f ff ff ff */
msgpack_pack_fix_int32(x, -0x7FFFFFFF-1); check_sbuffer(d280000000); /* d2 80 00 00 00 */
msgpack_pack_fix_int64(x, 0x7FFFFFFFFFFFFFFF); check_sbuffer(d37fffffffffffffff); /* d3 7f ff ff ff ff ff ff ff */
msgpack_pack_fix_int64(x, -0x7FFFFFFFFFFFFFFF-1); check_sbuffer(d38000000000000000); /* d3 80 00 00 00 00 00 00 00 */
msgpack_pack_int8(x, -0x7F-1); check_sbuffer(d080); /* d0 80 */
msgpack_pack_int8(x, -0x21); check_sbuffer(d0df); /* d0 df */
msgpack_pack_int8(x, -0x20); check_sbuffer(e0); /* e0 */
msgpack_pack_int8(x, -1); check_sbuffer(ff); /* ff */
msgpack_pack_int8(x, 0); check_sbuffer(00); /* 00 */
msgpack_pack_int8(x, 0x7F); check_sbuffer(7f); /* 7f */
msgpack_pack_int16(x, -0x7FFF-1); check_sbuffer(d18000); /* d1 80 00 */
msgpack_pack_int16(x, -0x81); check_sbuffer(d1ff7f); /* d1 ff 7f */
msgpack_pack_int16(x, -0x80); check_sbuffer(d080); /* d0 80 */
msgpack_pack_int16(x, -0x21); check_sbuffer(d0df); /* d0 df */
msgpack_pack_int16(x, -0x20); check_sbuffer(e0); /* e0 */
msgpack_pack_int16(x, -0x1); check_sbuffer(ff); /* ff */
msgpack_pack_int16(x, 0); check_sbuffer(00); /* 00 */
msgpack_pack_int16(x, 0x7F); check_sbuffer(7f); /* 7f */
msgpack_pack_int16(x, 0x80); check_sbuffer(cc80); /* cc 80 */
msgpack_pack_int16(x, 0xFF); check_sbuffer(ccff); /* cc ff */
msgpack_pack_int16(x, 0x100); check_sbuffer(cd0100); /* cd 01 00 */
msgpack_pack_int16(x, 0x7FFF); check_sbuffer(cd7fff); /* cd 7f ff */
msgpack_pack_int32(x, -0x7FFFFFFF-1); check_sbuffer(d280000000); /* d2 80 00 00 00 */
msgpack_pack_int32(x, -0x8001); check_sbuffer(d2ffff7fff); /* d2 ff ff 7f ff */
msgpack_pack_int32(x, -0x8000); check_sbuffer(d18000); /* d1 80 00 */
msgpack_pack_int32(x, -0x81); check_sbuffer(d1ff7f); /* d1 ff 7f */
msgpack_pack_int32(x, -0x80); check_sbuffer(d080); /* d0 80 */
msgpack_pack_int32(x, -0x21); check_sbuffer(d0df); /* d0 df */
msgpack_pack_int32(x, -0x20); check_sbuffer(e0); /* e0 */
msgpack_pack_int32(x, -0x1); check_sbuffer(ff); /* ff */
msgpack_pack_int32(x, 0); check_sbuffer(00); /* 00 */
msgpack_pack_int32(x, 0x7F); check_sbuffer(7f); /* 7f */
msgpack_pack_int32(x, 0x80); check_sbuffer(cc80); /* cc 80 */
msgpack_pack_int32(x, 0xFF); check_sbuffer(ccff); /* cc ff */
msgpack_pack_int32(x, 0x100); check_sbuffer(cd0100); /* cd 01 00 */
msgpack_pack_int32(x, 0xFFFF); check_sbuffer(cdffff); /* cd ff ff */
msgpack_pack_int32(x, 0x10000); check_sbuffer(ce00010000); /* ce 00 01 00 00 */
msgpack_pack_int32(x, 0x7FFFFFFF); check_sbuffer(ce7fffffff); /* ce 7f ff ff ff */
msgpack_pack_int64(x, -0x7FFFFFFFFFFFFFFF-1); check_sbuffer(d38000000000000000); /* d3 80 00 00 00 00 00 00 00 */
msgpack_pack_int64(x, -((1LL<<31)+1)); check_sbuffer(d3ffffffff7fffffff); /* d3 ff ff ff ff 7f ff ff ff */
msgpack_pack_int64(x, -(1LL<<31)); check_sbuffer(d280000000); /* d2 80 00 00 00 */
msgpack_pack_int64(x, -0x8001); check_sbuffer(d2ffff7fff); /* d2 ff ff 7f ff */
msgpack_pack_int64(x, -0x8000); check_sbuffer(d18000); /* d1 80 00 */
msgpack_pack_int64(x, -0x81); check_sbuffer(d1ff7f); /* d1 ff 7f */
msgpack_pack_int64(x, -0x80); check_sbuffer(d080); /* d0 80 */
msgpack_pack_int64(x, -0x21); check_sbuffer(d0df); /* d0 df */
msgpack_pack_int64(x, -0x20); check_sbuffer(e0); /* e0 */
msgpack_pack_int64(x, -0x1); check_sbuffer(ff); /* ff */
msgpack_pack_int64(x, 0); check_sbuffer(00); /* 00 */
msgpack_pack_int64(x, 0x7F); check_sbuffer(7f); /* 7f */
msgpack_pack_int64(x, 0x80); check_sbuffer(cc80); /* cc 80 */
msgpack_pack_int64(x, 0xFF); check_sbuffer(ccff); /* cc ff */
msgpack_pack_int64(x, 0x100); check_sbuffer(cd0100); /* cd 01 00 */
msgpack_pack_int64(x, 0xFFFF); check_sbuffer(cdffff); /* cd ff ff */
msgpack_pack_int64(x, 0x10000); check_sbuffer(ce00010000); /* ce 00 01 00 00 */
msgpack_pack_int64(x, 0xFFFFFFFF); check_sbuffer(ceffffffff); /* ce ff ff ff ff */
msgpack_pack_int64(x, 0x100000000); check_sbuffer(cf0000000100000000); /* cf 00 00 00 01 00 00 00 00 */
msgpack_pack_int64(x, 0x7FFFFFFFFFFFFFFF); check_sbuffer(cf7fffffffffffffff); /* cf 7f ff ff ff ff ff ff ff */
msgpack_pack_nil(x); check_sbuffer(c0); /* c0 */
msgpack_pack_false(x); check_sbuffer(c2); /* c2 */
msgpack_pack_true(x); check_sbuffer(c3); /* c3 */
msgpack_pack_float(x, 1.0); check_sbuffer(ca3f800000); /* ca 3f 80 00 00 */
msgpack_pack_double(x, 1.0); check_sbuffer(cb3ff0000000000000); /* cb 3f f0 00 00 00 00 00 00 */
msgpack_pack_unsigned_char(x, UINT8_MAX); /* same as msgpack_pack_uint8() */
msgpack_pack_unsigned_short(x, (unsigned short)UINT64_MAX);
msgpack_pack_unsigned_int(x, (unsigned int)UINT64_MAX);
msgpack_pack_unsigned_long(x, (unsigned long)UINT64_MAX);
msgpack_pack_unsigned_long_long(x, (unsigned long long)UINT64_MAX);
msgpack_pack_signed_char(x, INT8_MAX); /* same as msgpack_pack_int8() */
#define check_sbuffer_n(b) \
do { \
size_t len = strlen(#b); \
assert(bytesncmp(sbuf.data + offset, #b, len) == 0); \
offset = sbuf.size; \
} while (0)
#define fill_str(n) msgpack_pack_str_body(x, data, n)
offset = sbuf.size;
msgpack_pack_str(x, 0); /* "" */ check_sbuffer(a0); /* a0 */
msgpack_pack_str(x, 31);
fill_str(31); check_sbuffer_n(bf); /* bf ... */
msgpack_pack_str(x, 32);
fill_str(32); check_sbuffer_n(d920); /* d9 20 ... */
msgpack_pack_str(x, 255);
fill_str(255); check_sbuffer_n(d9ff); /* d9 ff ... */
msgpack_pack_str(x, 256);
fill_str(256); check_sbuffer_n(da0100); /* da 01 00 ... */
msgpack_pack_str(x, 65535);
fill_str(65535); check_sbuffer_n(daffff); /* da ff ff ... */
msgpack_pack_str(x, 65536);
fill_str(65536); check_sbuffer_n(db00010000); /* db 00 01 00 00 ... */
#define fill_map(n) \
do { \
size_t i = 0; \
for (; i < n * 2; i++) { msgpack_pack_int8(x, 0x1); } \
} while (0);
msgpack_pack_map(x, 0); /* {} */ check_sbuffer(80); /* 80 */
msgpack_pack_map(x, 1);
fill_map(1); check_sbuffer_n(81); /* 81 ... */
msgpack_pack_map(x, 15);
fill_map(15); check_sbuffer_n(8f); /* 8f ... */
msgpack_pack_map(x, 16);
fill_map(16); check_sbuffer_n(de0010); /* de 00 10 ... */
msgpack_pack_map(x, 65535);
fill_map(65535); check_sbuffer_n(deffff); /* de ff ff ... */
msgpack_pack_map(x, 65536);
fill_map(65536); check_sbuffer_n(df00010000); /* df 00 01 00 00 ... */
#define fill_array(n) \
do { \
size_t i = 0; \
for (; i < n; i++) { msgpack_pack_int8(x, 0x1); } \
} while (0);
msgpack_pack_array(x, 0); /* [] */ check_sbuffer(90); /* 90 */
msgpack_pack_array(x, 1);
fill_array(1); check_sbuffer_n(91); /* 91 ... */
msgpack_pack_array(x, 15);
fill_array(15); check_sbuffer_n(9f); /* 9f ... */
msgpack_pack_array(x, 16);
fill_array(16); check_sbuffer_n(dc0010); /* dc 00 10 ... */
msgpack_pack_array(x, 65535);
fill_array(65535); check_sbuffer_n(dcffff); /* dc ff ff ... */
msgpack_pack_array(x, 65536);
fill_array(65536); check_sbuffer_n(dd00010000); /* dd 00 01 00 00 ... */
#define fill_bin(n) msgpack_pack_bin_body(x, data, n)
msgpack_pack_bin(x, 0); check_sbuffer(c400); /* c4 00 */
msgpack_pack_bin(x, 1);
fill_bin(1); check_sbuffer_n(c401); /* c4 01 ... */
msgpack_pack_bin(x, 255);
fill_bin(255); check_sbuffer_n(c4ff); /* c4 ff ... */
msgpack_pack_bin(x, 256);
fill_bin(256); check_sbuffer_n(c50100); /* c5 01 00 ... */
msgpack_pack_bin(x, 65535);
fill_bin(65535); check_sbuffer_n(c5ffff); /* c5 ff ff ... */
msgpack_pack_bin(x, 65536);
fill_bin(65536); check_sbuffer_n(c600010000); /* c6 00 01 00 00 ... */
#define fill_ext(n) msgpack_pack_ext_body(x, data, n)
msgpack_pack_ext(x, 1, 0x7F);
fill_ext(1); check_sbuffer_n(d47f); /* d4 7f ... */
msgpack_pack_ext(x, 2, 0x7F);
fill_ext(2); check_sbuffer_n(d57f); /* d5 7f ... */
msgpack_pack_ext(x, 4, 0x7F);
fill_ext(4); check_sbuffer_n(d67f); /* d6 7f ... */
msgpack_pack_ext(x, 8, 0x7F);
fill_ext(8); check_sbuffer_n(d77f); /* d7 7f ... */
msgpack_pack_ext(x, 16, 0x7F);
fill_ext(16); check_sbuffer_n(d87f); /* d8 7f ... */
msgpack_pack_ext(x, 0, 0x7F); check_sbuffer(c7007f); /* c7 00 7f */
msgpack_pack_ext(x, 3, 0x7F);
fill_ext(3); check_sbuffer_n(c7037f); /* c7 03 7f */
msgpack_pack_ext(x, 5, 0x7F);
fill_ext(5); check_sbuffer_n(c7057f); /* c7 05 7f */
msgpack_pack_ext(x, 17, 0x7F);
fill_ext(17); check_sbuffer_n(c7117f); /* c7 11 7f */
msgpack_pack_ext(x, 255, 0x7F);
fill_ext(255); check_sbuffer_n(c7ff7f); /* c7 ff 7f ... */
msgpack_pack_ext(x, 256, 0x7F);
fill_ext(256); check_sbuffer_n(c801007f); /* c8 01 00 7f ... */
msgpack_pack_ext(x, 65535, 0x7F);
fill_ext(65535); check_sbuffer_n(c8ffff7f); /* c8 ff ff 7f ... */
msgpack_pack_ext(x, 65536, 0x7F);
fill_ext(65536); check_sbuffer_n(c9000100007f); /* c9 00 01 00 00 7f ... */
msgpack_pack_timestamp(x, ts); check_sbuffer(d6ffffffffff); /* d6 ff ff ff ff ff */
msgpack_pack_timestamp(x, ts + 1); check_sbuffer(d7ff0000000100000000); /* d7 ff 00 00 00 01 00 00 00 00 */
msgpack_pack_timestamp(x, ts + 2); check_sbuffer(d7ff00000003ffffffff); /* d7 ff 00 00 00 03 ff ff ff ff */
msgpack_pack_timestamp(x, ts + 3); check_sbuffer(c70cff000000000000000400000000); /* c7 0c ff 00 00 00 00 00 00 00 04 00 00 00 00 */
msgpack_pack_timestamp(x, ts + 4); check_sbuffer(c70cffffffffff7fffffffffffffff); /* c7 0c ff ff ff ff ff 7f ff ff ff ff ff ff ff */
msgpack_sbuffer_destroy(&sbuf);
msgpack_packer_free(x);
return 0;
}

View File

@@ -1,419 +0,0 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <msgpack.h>
#include <cjson/cJSON.h>
#if defined(_MSC_VER)
#if _MSC_VER >= 1800
#include <inttypes.h>
#else
#define PRIu64 "I64u"
#define PRIi64 "I64i"
#define PRIi8 "i"
#endif
#else
#include <inttypes.h>
#endif
#if defined(_KERNEL_MODE)
# undef snprintf
# define snprintf _snprintf
#endif
#define DEBUG(...) printf(__VA_ARGS__)
static char *format_string(const char *input)
{
const char *inptr;
char *output;
char *outptr;
size_t output_length = 0;
/* numbers of additional characters*/
size_t escape_characters = 0;
if (input == NULL) {
return NULL;
}
for (inptr = input; *inptr; inptr++) {
switch (*inptr) {
case '\"':
case '\\':
case '\b':
case '\f':
case '\n':
case '\r':
case '\t':
/* one character escape sequence */
escape_characters++;
break;
default:
break;
}
}
output_length = (size_t)(inptr - input) + escape_characters;
output = (char *)malloc(output_length + 1);
if (output == NULL) {
return NULL;
}
/* no add characters*/
if (escape_characters == 0) {
memcpy(output, input, output_length);
output[output_length] = '\0';
return output;
}
outptr = output;
/* copy string */
for (inptr = input; *inptr != '\0'; (void)inptr++, outptr++) {
if ((*inptr > 31) && (*inptr != '\"') && (*inptr != '\\')) {
/* normal character, copy */
*outptr = *inptr;
} else {
/* character needs to be escaped */
*outptr++ = '\\';
switch (*inptr)
{
case '\\':
*outptr = '\\';
break;
case '\"':
*outptr = '\"';
break;
case '\b':
*outptr = 'b';
break;
case '\f':
*outptr = 'f';
break;
case '\n':
*outptr = 'n';
break;
case '\r':
*outptr = 'r';
break;
case '\t':
*outptr = 't';
break;
default:
break;
}
}
}
output[output_length] = '\0';
return output;
}
/*
* Pack cJSON object.
* return 0 success, others failed
*/
static int parse_cjson_object(msgpack_packer *pk, cJSON *node)
{
int ret, sz, i;
cJSON *child;
char *strvalue;
if (node == NULL) {
return -1;
}
switch (node->type & 0xFF) {
case cJSON_Invalid:
return -1;
case cJSON_False:
return msgpack_pack_false(pk);
case cJSON_True:
return msgpack_pack_true(pk);
case cJSON_NULL:
return msgpack_pack_nil(pk);
case cJSON_String:
strvalue = format_string(node->valuestring);
if (strvalue != NULL) {
ret = msgpack_pack_str_with_body(pk, strvalue, strlen(strvalue));
free(strvalue);
return ret;
} else {
return -1;
}
case cJSON_Number:
if (isnan(node->valuedouble) || isinf(node->valuedouble)) {
ret = msgpack_pack_nil(pk);
} else if (node->valuedouble == node->valueint) {
ret = msgpack_pack_int(pk, node->valueint);
} else {
ret = msgpack_pack_double(pk, node->valuedouble);
}
return ret;
case cJSON_Array:
sz = cJSON_GetArraySize(node);
if (msgpack_pack_array(pk, sz) != 0) {
return -1;
}
for (i = 0; i < sz; i++) {
if (parse_cjson_object(pk, cJSON_GetArrayItem(node, i)) != 0) {
return -1;
}
}
return 0;
case cJSON_Object:
sz = cJSON_GetArraySize(node);
if (msgpack_pack_map(pk, sz) != 0) {
return -1;
}
for (i = 0; i < sz; i++) {
child = cJSON_GetArrayItem(node, i);
strvalue = format_string(child->string);
if (strvalue == NULL) {
return -1;
}
if (msgpack_pack_str_with_body(pk, strvalue, strlen(strvalue)) != 0) {
free(strvalue);
return -1;
}
free(strvalue);
if (parse_cjson_object(pk, child) != 0) {
return -1;
}
}
return 0;
default:
DEBUG("unknown type.\n");
return -1;
}
return 0;
}
/*
* Pack json string to msgpack format data.
* return 0 success, -1 failed
*/
int msgpack_pack_jsonstr(msgpack_packer *pk, const char *jsonstr)
{
int status;
cJSON *node;
const char *end = NULL;
if (pk == NULL || jsonstr == NULL) {
return -1;
}
node = cJSON_ParseWithOpts(jsonstr, &end, 1);
if (node == NULL) {
DEBUG("parse error: unexpected string `%s`\n", end);
return -1;
}
status = parse_cjson_object(pk, node);
cJSON_Delete(node);
return status;
}
static int bytes_contain_zero(const msgpack_object_bin *bin)
{
size_t i;
for (i = 0; i < bin->size; i++) {
if (bin->ptr[i] == 0) {
return 1;
}
}
return 0;
}
#define PRINT_JSONSTR_CALL(ret, func, aux_buffer, aux_buffer_size, ...) \
ret = func(aux_buffer, aux_buffer_size, __VA_ARGS__); \
if (ret <= 0) \
return ret; \
if (ret > aux_buffer_size) \
return 0; \
aux_buffer = aux_buffer + ret; \
aux_buffer_size = aux_buffer_size - ret
/*
* Convert msgpack format data to json string.
* return >0: success, 0: length of buffer not enough, -1: failed
*/
size_t msgpack_object_print_jsonstr(char *buffer, size_t length, const msgpack_object o)
{
char *aux_buffer = buffer;
size_t aux_buffer_size = length;
size_t ret;
switch (o.type) {
case MSGPACK_OBJECT_NIL:
PRINT_JSONSTR_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "null");
break;
case MSGPACK_OBJECT_BOOLEAN:
PRINT_JSONSTR_CALL(ret, snprintf, aux_buffer, aux_buffer_size, (o.via.boolean ? "true" : "false"));
break;
case MSGPACK_OBJECT_POSITIVE_INTEGER:
#if defined(PRIu64)
PRINT_JSONSTR_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "%" PRIu64, o.via.u64);
#else
if (o.via.u64 > ULONG_MAX) {
PRINT_JSONSTR_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "%lu", ULONG_MAX);
} else {
PRINT_JSONSTR_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "%lu", (unsigned long)o.via.u64);
}
#endif
break;
case MSGPACK_OBJECT_NEGATIVE_INTEGER:
#if defined(PRIi64)
PRINT_JSONSTR_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "%" PRIi64, o.via.i64);
#else
if (o.via.i64 > LONG_MAX) {
PRINT_JSONSTR_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "%ld", LONG_MAX);
} else if (o.via.i64 < LONG_MIN) {
PRINT_JSONSTR_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "%ld", LONG_MIN);
} else {
PRINT_JSONSTR_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "%ld", (signed long)o.via.i64);
}
#endif
break;
case MSGPACK_OBJECT_FLOAT32:
case MSGPACK_OBJECT_FLOAT64:
PRINT_JSONSTR_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "%f", o.via.f64);
break;
case MSGPACK_OBJECT_STR:
PRINT_JSONSTR_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "\"%.*s\"", (int)o.via.str.size, o.via.str.ptr);
break;
case MSGPACK_OBJECT_BIN:
if (bytes_contain_zero(&o.via.bin)) {
DEBUG("the value contains zero\n");
return -1;
}
PRINT_JSONSTR_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "\"%.*s\"", (int)o.via.bin.size, o.via.bin.ptr);
break;
case MSGPACK_OBJECT_EXT:
DEBUG("not support type: MSGPACK_OBJECT_EXT.\n");
return -1;
case MSGPACK_OBJECT_ARRAY:
PRINT_JSONSTR_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "[");
if (o.via.array.size != 0) {
msgpack_object *p = o.via.array.ptr;
msgpack_object *const pend = o.via.array.ptr + o.via.array.size;
PRINT_JSONSTR_CALL(ret, msgpack_object_print_jsonstr, aux_buffer, aux_buffer_size, *p);
++p;
for (; p < pend; ++p) {
PRINT_JSONSTR_CALL(ret, snprintf, aux_buffer, aux_buffer_size, ",");
PRINT_JSONSTR_CALL(ret, msgpack_object_print_jsonstr, aux_buffer, aux_buffer_size, *p);
}
}
PRINT_JSONSTR_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "]");
break;
case MSGPACK_OBJECT_MAP:
PRINT_JSONSTR_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "{");
if (o.via.map.size != 0) {
msgpack_object_kv *p = o.via.map.ptr;
msgpack_object_kv *const pend = o.via.map.ptr + o.via.map.size;
for (; p < pend; ++p) {
if (p->key.type != MSGPACK_OBJECT_STR) {
DEBUG("the key of in a map must be string.\n");
return -1;
}
if (p != o.via.map.ptr) {
PRINT_JSONSTR_CALL(ret, snprintf, aux_buffer, aux_buffer_size, ",");
}
PRINT_JSONSTR_CALL(ret, msgpack_object_print_jsonstr, aux_buffer, aux_buffer_size, p->key);
PRINT_JSONSTR_CALL(ret, snprintf, aux_buffer, aux_buffer_size, ":");
PRINT_JSONSTR_CALL(ret, msgpack_object_print_jsonstr, aux_buffer, aux_buffer_size, p->val);
}
}
PRINT_JSONSTR_CALL(ret, snprintf, aux_buffer, aux_buffer_size, "}");
break;
default:
DEBUG("unknown type.\n");
return -1;
}
return length - aux_buffer_size;
}
#undef PRINT_JSONSTR_CALL
static void test(const char *name, const char *input, const char *expect)
{
msgpack_sbuffer sbuf;
{
// pack
msgpack_packer pk;
msgpack_sbuffer_init(&sbuf);
msgpack_packer_init(&pk, &sbuf, msgpack_sbuffer_write);
if (msgpack_pack_jsonstr(&pk, input) < 0) {
msgpack_sbuffer_destroy(&sbuf);
printf("%s: invalid json string.\n", name);
return;
}
}
{
// unpack
#define MAX_JSONLEN 1024
msgpack_zone z;
msgpack_object obj;
size_t jsonstrlen = MAX_JSONLEN - 1;
char jsonparsed[MAX_JSONLEN];
msgpack_zone_init(&z, jsonstrlen);
msgpack_unpack(sbuf.data, sbuf.size, NULL, &z, &obj);
jsonstrlen = msgpack_object_print_jsonstr(jsonparsed, jsonstrlen, obj);
jsonparsed[jsonstrlen] = '\0';
//compare input and output
if (expect == NULL) {
expect = input;
}
if (strcmp(expect, jsonparsed) == 0) {
printf("%s: ok\n", name);
} else {
printf("%s: failed\n", name);
}
msgpack_zone_destroy(&z);
}
msgpack_sbuffer_destroy(&sbuf);
}
int main()
{
test("null", "null", NULL);
test("boolean", "false", NULL);
test("single string", "\"frsyuki\"", NULL);
test("single number", "\"100\"", NULL);
test("space", "[{\"valuespace\":\"\",\"\":\"keyspace\"},\"\",[\"\"]]", NULL);
test("quote", "\"My name is Tom (\\\"Bee\\\") Kobe\"", NULL);
test("escape", "\"\\\\b\\f\\n\\r\\t\"", NULL);
test("escape2", "\"\b\f\n\r\t\"", "\"\\b\\f\\n\\r\\t\"");
test("map", "{\"name\":\"Tom (\\\"Bee\\\") Kobe\",\"type\":\"image\",\"data\":{\"width\":360,\"height\":460,\"title\":\"View me\",\"ips\":[116,943,256,711]}}", NULL);
test("array", "[\"Sunday\",\"Monday\",\"Tuesday\",\"Wednesday\",\"Thursday\",\"Friday\",\"Saturday\"]", NULL);
test("number array", "[[101,121,-33],[119,911,171],[0,2,-3]]", NULL);
test("mix array", "[{\"name\":\"Tom\",\"city\":\"London\",\"country\":\"UK\",\"longitude\":23},{\"name\":\"Jack\",\"city\":\"Birmingham\",\"country\":\"UK\",\"longitude\":-22}]", NULL);
test("unicode", "\"\\u5C71\\u5DDD\\u7570\\u57DF\\u98A8\\u6708\\u540C\\u5929\"", "\"山川異域風月同天\"");
test("utf8", "\"山川異域風月同天\"", NULL);
test("double", "12.34", "12.340000");
return 0;
}

View File

@@ -1,127 +0,0 @@
#include <msgpack.h>
#include <stdio.h>
#include <assert.h>
typedef struct receiver {
msgpack_sbuffer sbuf;
size_t rest;
} receiver;
void receiver_init(receiver *r) {
msgpack_packer pk;
msgpack_sbuffer_init(&r->sbuf);
msgpack_packer_init(&pk, &r->sbuf, msgpack_sbuffer_write);
/* 1st object */
msgpack_pack_array(&pk, 3);
msgpack_pack_int(&pk, 1);
msgpack_pack_true(&pk);
msgpack_pack_str(&pk, 7);
msgpack_pack_str_body(&pk, "example", 7);
/* 2nd object */
msgpack_pack_str(&pk, 6);
msgpack_pack_str_body(&pk, "second", 6);
/* 3rd object */
msgpack_pack_array(&pk, 2);
msgpack_pack_int(&pk, 42);
msgpack_pack_false(&pk);
r->rest = r->sbuf.size;
}
size_t receiver_recv(receiver *r, char* buf, size_t try_size) {
size_t off = r->sbuf.size - r->rest;
size_t actual_size = try_size;
if (actual_size > r->rest) actual_size = r->rest;
memcpy(buf, r->sbuf.data + off, actual_size);
r->rest -= actual_size;
return actual_size;
}
size_t receiver_to_unpacker(receiver* r, size_t request_size,
msgpack_unpacker *unpacker)
{
size_t recv_len;
// make sure there's enough room, or expand the unpacker accordingly
if (msgpack_unpacker_buffer_capacity(unpacker) < request_size) {
msgpack_unpacker_reserve_buffer(unpacker, request_size);
assert(msgpack_unpacker_buffer_capacity(unpacker) >= request_size);
}
recv_len = receiver_recv(r, msgpack_unpacker_buffer(unpacker),
request_size);
msgpack_unpacker_buffer_consumed(unpacker, recv_len);
return recv_len;
}
#define EACH_RECV_SIZE 4
void unpack(receiver* r) {
/* buf is allocated by unpacker. */
msgpack_unpacker* unp = msgpack_unpacker_new(100);
msgpack_unpacked result;
msgpack_unpack_return ret;
size_t recv_len;
int recv_count = 0;
int i = 0;
msgpack_unpacked_init(&result);
while (true) {
recv_len = receiver_to_unpacker(r, EACH_RECV_SIZE, unp);
if (recv_len == 0) break; // (reached end of input)
#if defined(_MSC_VER) || defined(__MINGW32__)
printf("receive count: %d %Id bytes received.\n", recv_count++, recv_len);
#else // defined(_MSC_VER) || defined(__MINGW32__)
printf("receive count: %d %zd bytes received.\n", recv_count++, recv_len);
#endif // defined(_MSC_VER) || defined(__MINGW32__)
ret = msgpack_unpacker_next(unp, &result);
while (ret == MSGPACK_UNPACK_SUCCESS) {
msgpack_object obj = result.data;
/* Use obj. */
printf("Object no %d:\n", ++i);
msgpack_object_print(stdout, obj);
printf("\n");
/* If you want to allocate something on the zone, you can use zone. */
/* msgpack_zone* zone = result.zone; */
/* The lifetime of the obj and the zone, */
ret = msgpack_unpacker_next(unp, &result);
}
if (ret == MSGPACK_UNPACK_PARSE_ERROR) {
printf("The data in the buf is invalid format.\n");
msgpack_unpacked_destroy(&result);
return;
}
}
msgpack_unpacked_destroy(&result);
msgpack_unpacker_free(unp);
}
int main(void) {
receiver r;
receiver_init(&r);
unpack(&r);
return 0;
}
/* Output */
/*
receive count: 0 4 bytes received.
receive count: 1 4 bytes received.
receive count: 2 4 bytes received.
Object no 1:
[1, true, "example"]
receive count: 3 4 bytes received.
receive count: 4 4 bytes received.
Object no 2:
"second"
receive count: 5 1 bytes received.
Object no 3:
[42, false]
*/

View File

@@ -1,47 +0,0 @@
#include <msgpack.h>
#include <stdio.h>
void print(char const* buf,size_t len)
{
size_t i = 0;
for(; i < len ; ++i)
printf("%02x ", 0xff & buf[i]);
printf("\n");
}
int main(void)
{
msgpack_sbuffer sbuf;
msgpack_packer pk;
msgpack_zone mempool;
msgpack_object deserialized;
/* msgpack::sbuffer is a simple buffer implementation. */
msgpack_sbuffer_init(&sbuf);
/* serialize values into the buffer using msgpack_sbuffer_write callback function. */
msgpack_packer_init(&pk, &sbuf, msgpack_sbuffer_write);
msgpack_pack_array(&pk, 3);
msgpack_pack_int(&pk, 1);
msgpack_pack_true(&pk);
msgpack_pack_str(&pk, 7);
msgpack_pack_str_body(&pk, "example", 7);
print(sbuf.data, sbuf.size);
/* deserialize the buffer into msgpack_object instance. */
/* deserialized object is valid during the msgpack_zone instance alive. */
msgpack_zone_init(&mempool, 2048);
msgpack_unpack(sbuf.data, sbuf.size, NULL, &mempool, &deserialized);
/* print the deserialized object. */
msgpack_object_print(stdout, deserialized);
puts("");
msgpack_zone_destroy(&mempool);
msgpack_sbuffer_destroy(&sbuf);
return 0;
}

View File

@@ -1,36 +0,0 @@
#include <msgpack.h>
void test()
{
size_t size = 10000000;
msgpack_sbuffer buf;
msgpack_packer * pk;
size_t upk_pos = 0;
msgpack_unpacked msg;
msgpack_sbuffer_init(&buf);
pk = msgpack_packer_new(&buf, msgpack_sbuffer_write);
msgpack_pack_array(pk, size);
{
size_t idx = 0;
for (; idx < size; ++idx)
msgpack_pack_uint32(pk, 1);
}
msgpack_packer_free(pk);
msgpack_unpacked_init(&msg);
while (msgpack_unpack_next(&msg, buf.data, buf.size, &upk_pos) == MSGPACK_UNPACK_SUCCESS) {
}
msgpack_sbuffer_destroy(&buf);
}
int main(void)
{
int i = 0;
for (; i < 10; ++i) test();
return 0;
}

View File

@@ -1,37 +0,0 @@
#include <msgpack.h>
void test()
{
uint64_t test_u64 = 0xFFF0000000000001LL;
size_t size = 10000000;
msgpack_sbuffer buf;
msgpack_packer * pk;
size_t upk_pos = 0;
msgpack_unpacked msg;
msgpack_sbuffer_init(&buf);
pk = msgpack_packer_new(&buf, msgpack_sbuffer_write);
msgpack_pack_array(pk, size);
{
size_t idx = 0;
for (; idx < size; ++idx)
msgpack_pack_uint64(pk, test_u64);
}
msgpack_packer_free(pk);
msgpack_unpacked_init(&msg);
while (msgpack_unpack_next(&msg, buf.data, buf.size, &upk_pos) == MSGPACK_UNPACK_SUCCESS) {
}
msgpack_sbuffer_destroy(&buf);
}
int main(void)
{
int i = 0;
for (; i < 10; ++i) test();
return 0;
}

View File

@@ -1,81 +0,0 @@
#include <msgpack.h>
#include <stdio.h>
#include <assert.h>
#define UNPACKED_BUFFER_SIZE 2048
void prepare(msgpack_sbuffer* sbuf) {
msgpack_packer pk;
msgpack_packer_init(&pk, sbuf, msgpack_sbuffer_write);
/* 1st object */
msgpack_pack_array(&pk, 3);
msgpack_pack_int(&pk, 1);
msgpack_pack_true(&pk);
msgpack_pack_str(&pk, 7);
msgpack_pack_str_body(&pk, "example", 7);
/* 2nd object */
msgpack_pack_str(&pk, 6);
msgpack_pack_str_body(&pk, "second", 6);
/* 3rd object */
msgpack_pack_array(&pk, 2);
msgpack_pack_int(&pk, 42);
msgpack_pack_false(&pk);
}
void unpack(char const* buf, size_t len) {
/* buf is allocated by client. */
msgpack_unpacked result;
size_t off = 0;
msgpack_unpack_return ret;
int i = 0;
char unpacked_buffer[UNPACKED_BUFFER_SIZE];
msgpack_unpacked_init(&result);
ret = msgpack_unpack_next(&result, buf, len, &off);
while (ret == MSGPACK_UNPACK_SUCCESS) {
msgpack_object obj = result.data;
/* Use obj. */
printf("Object no %d:\n", ++i);
msgpack_object_print(stdout, obj);
printf("\n");
msgpack_object_print_buffer(unpacked_buffer, UNPACKED_BUFFER_SIZE, obj);
printf("%s\n", unpacked_buffer);
/* If you want to allocate something on the zone, you can use zone. */
/* msgpack_zone* zone = result.zone; */
/* The lifetime of the obj and the zone, */
ret = msgpack_unpack_next(&result, buf, len, &off);
}
msgpack_unpacked_destroy(&result);
if (ret == MSGPACK_UNPACK_CONTINUE) {
printf("All msgpack_object in the buffer is consumed.\n");
}
else if (ret == MSGPACK_UNPACK_PARSE_ERROR) {
printf("The data in the buf is invalid format.\n");
}
}
int main(void) {
msgpack_sbuffer sbuf;
msgpack_sbuffer_init(&sbuf);
prepare(&sbuf);
unpack(sbuf.data, sbuf.size);
msgpack_sbuffer_destroy(&sbuf);
return 0;
}
/* Output */
/*
Object no 1:
[1, true, "example"]
Object no 2:
"second"
Object no 3:
[42, false]
All msgpack_object in the buffer is consumed.
*/

View File

@@ -1,17 +0,0 @@
cmake_minimum_required (VERSION 3.0)
project (example)
if(EXAMPLE_MSGPACK_EMBEDDED)
add_subdirectory(msgpack-c)
set(msgpack_DIR ${CMAKE_CURRENT_BINARY_DIR}/msgpack-c)
endif()
find_package(msgpack REQUIRED)
add_executable (${PROJECT_NAME} ${CMAKE_CURRENT_LIST_DIR}/../c/simple_c.c)
target_link_libraries(${PROJECT_NAME} msgpackc)
if(TARGET msgpackc-static)
add_executable (${PROJECT_NAME}-static ${CMAKE_CURRENT_LIST_DIR}/../c/simple_c.c)
target_link_libraries(${PROJECT_NAME}-static msgpackc-static)
endif()

Submodule external/boost/predef deleted from 560ff5298e

View File

@@ -1,24 +0,0 @@
/*
* MessagePack for C
*
* Copyright (C) 2008-2009 FURUHASHI Sadayuki
*
* 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)
*/
/**
* @defgroup msgpack MessagePack C
* @{
* @}
*/
#include "msgpack/util.h"
#include "msgpack/object.h"
#include "msgpack/zone.h"
#include "msgpack/pack.h"
#include "msgpack/unpack.h"
#include "msgpack/sbuffer.h"
#include "msgpack/vrefbuffer.h"
#include "msgpack/version.h"

View File

@@ -1,38 +0,0 @@
/*
* MessagePack for C FILE* buffer adaptor
*
* Copyright (C) 2013 Vladimir Volodko
*
* 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_FBUFFER_H
#define MSGPACK_FBUFFER_H
#include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @defgroup msgpack_fbuffer FILE* buffer
* @ingroup msgpack_buffer
* @{
*/
static inline int msgpack_fbuffer_write(void* data, const char* buf, size_t len)
{
return (1 == fwrite(buf, len, 1, (FILE *)data)) ? 0 : -1;
}
/** @} */
#ifdef __cplusplus
}
#endif
#endif /* msgpack/fbuffer.h */

View File

@@ -1,25 +0,0 @@
/*
* 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_GCC_ATOMIC_H
#define MSGPACK_GCC_ATOMIC_H
#if defined(__cplusplus)
extern "C" {
#endif
typedef int _msgpack_atomic_counter_t;
int _msgpack_sync_decr_and_fetch(volatile _msgpack_atomic_counter_t* ptr);
int _msgpack_sync_incr_and_fetch(volatile _msgpack_atomic_counter_t* ptr);
#if defined(__cplusplus)
}
#endif
#endif // MSGPACK_GCC_ATOMIC_H

View File

@@ -1,118 +0,0 @@
/*
* MessagePack for C dynamic typing routine
*
* Copyright (C) 2008-2009 FURUHASHI Sadayuki
*
* 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_OBJECT_H
#define MSGPACK_OBJECT_H
#include "zone.h"
#include <stdio.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @defgroup msgpack_object Dynamically typed object
* @ingroup msgpack
* @{
*/
typedef enum {
MSGPACK_OBJECT_NIL = 0x00,
MSGPACK_OBJECT_BOOLEAN = 0x01,
MSGPACK_OBJECT_POSITIVE_INTEGER = 0x02,
MSGPACK_OBJECT_NEGATIVE_INTEGER = 0x03,
MSGPACK_OBJECT_FLOAT32 = 0x0a,
MSGPACK_OBJECT_FLOAT64 = 0x04,
MSGPACK_OBJECT_FLOAT = 0x04,
#if defined(MSGPACK_USE_LEGACY_NAME_AS_FLOAT)
MSGPACK_OBJECT_DOUBLE = MSGPACK_OBJECT_FLOAT, /* obsolete */
#endif /* MSGPACK_USE_LEGACY_NAME_AS_FLOAT */
MSGPACK_OBJECT_STR = 0x05,
MSGPACK_OBJECT_ARRAY = 0x06,
MSGPACK_OBJECT_MAP = 0x07,
MSGPACK_OBJECT_BIN = 0x08,
MSGPACK_OBJECT_EXT = 0x09
} msgpack_object_type;
struct msgpack_object;
struct msgpack_object_kv;
typedef struct {
uint32_t size;
struct msgpack_object* ptr;
} msgpack_object_array;
typedef struct {
uint32_t size;
struct msgpack_object_kv* ptr;
} msgpack_object_map;
typedef struct {
uint32_t size;
const char* ptr;
} msgpack_object_str;
typedef struct {
uint32_t size;
const char* ptr;
} msgpack_object_bin;
typedef struct {
int8_t type;
uint32_t size;
const char* ptr;
} msgpack_object_ext;
typedef union {
bool boolean;
uint64_t u64;
int64_t i64;
#if defined(MSGPACK_USE_LEGACY_NAME_AS_FLOAT)
double dec; /* obsolete*/
#endif /* MSGPACK_USE_LEGACY_NAME_AS_FLOAT */
double f64;
msgpack_object_array array;
msgpack_object_map map;
msgpack_object_str str;
msgpack_object_bin bin;
msgpack_object_ext ext;
} msgpack_object_union;
typedef struct msgpack_object {
msgpack_object_type type;
msgpack_object_union via;
} msgpack_object;
typedef struct msgpack_object_kv {
msgpack_object key;
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);
MSGPACK_DLLEXPORT
bool msgpack_object_equal(const msgpack_object x, const msgpack_object y);
/** @} */
#ifdef __cplusplus
}
#endif
#endif /* msgpack/object.h */

View File

@@ -1,174 +0,0 @@
/*
* MessagePack for C packing routine
*
* Copyright (C) 2008-2009 FURUHASHI Sadayuki
*
* 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_PACK_H
#define MSGPACK_PACK_H
#include "pack_define.h"
#include "object.h"
#include "timestamp.h"
#include <stdlib.h>
#ifdef __cplusplus
extern "C" {
#endif
/**
* @defgroup msgpack_buffer Buffers
* @ingroup msgpack
* @{
* @}
*/
/**
* @defgroup msgpack_pack Serializer
* @ingroup msgpack
* @{
*/
typedef int (*msgpack_packer_write)(void* data, const char* buf, size_t len);
typedef struct msgpack_packer {
void* data;
msgpack_packer_write callback;
} msgpack_packer;
static void msgpack_packer_init(msgpack_packer* pk, void* data, msgpack_packer_write callback);
static msgpack_packer* msgpack_packer_new(void* data, msgpack_packer_write callback);
static void msgpack_packer_free(msgpack_packer* pk);
static int msgpack_pack_char(msgpack_packer* pk, char d);
static int msgpack_pack_signed_char(msgpack_packer* pk, signed char d);
static int msgpack_pack_short(msgpack_packer* pk, short d);
static int msgpack_pack_int(msgpack_packer* pk, int d);
static int msgpack_pack_long(msgpack_packer* pk, long d);
static int msgpack_pack_long_long(msgpack_packer* pk, long long d);
static int msgpack_pack_unsigned_char(msgpack_packer* pk, unsigned char d);
static int msgpack_pack_unsigned_short(msgpack_packer* pk, unsigned short d);
static int msgpack_pack_unsigned_int(msgpack_packer* pk, unsigned int d);
static int msgpack_pack_unsigned_long(msgpack_packer* pk, unsigned long d);
static int msgpack_pack_unsigned_long_long(msgpack_packer* pk, unsigned long long d);
static int msgpack_pack_uint8(msgpack_packer* pk, uint8_t d);
static int msgpack_pack_uint16(msgpack_packer* pk, uint16_t d);
static int msgpack_pack_uint32(msgpack_packer* pk, uint32_t d);
static int msgpack_pack_uint64(msgpack_packer* pk, uint64_t d);
static int msgpack_pack_int8(msgpack_packer* pk, int8_t d);
static int msgpack_pack_int16(msgpack_packer* pk, int16_t d);
static int msgpack_pack_int32(msgpack_packer* pk, int32_t d);
static int msgpack_pack_int64(msgpack_packer* pk, int64_t d);
static int msgpack_pack_fix_uint8(msgpack_packer* pk, uint8_t d);
static int msgpack_pack_fix_uint16(msgpack_packer* pk, uint16_t d);
static int msgpack_pack_fix_uint32(msgpack_packer* pk, uint32_t d);
static int msgpack_pack_fix_uint64(msgpack_packer* pk, uint64_t d);
static int msgpack_pack_fix_int8(msgpack_packer* pk, int8_t d);
static int msgpack_pack_fix_int16(msgpack_packer* pk, int16_t d);
static int msgpack_pack_fix_int32(msgpack_packer* pk, int32_t d);
static int msgpack_pack_fix_int64(msgpack_packer* pk, int64_t d);
static int msgpack_pack_float(msgpack_packer* pk, float d);
static int msgpack_pack_double(msgpack_packer* pk, double d);
static int msgpack_pack_nil(msgpack_packer* pk);
static int msgpack_pack_true(msgpack_packer* pk);
static int msgpack_pack_false(msgpack_packer* pk);
static int msgpack_pack_array(msgpack_packer* pk, size_t n);
static int msgpack_pack_map(msgpack_packer* pk, size_t n);
static int msgpack_pack_str(msgpack_packer* pk, size_t l);
static int msgpack_pack_str_body(msgpack_packer* pk, const void* b, size_t l);
static int msgpack_pack_str_with_body(msgpack_packer* pk, const void* b, size_t l);
static int msgpack_pack_v4raw(msgpack_packer* pk, size_t l);
static int msgpack_pack_v4raw_body(msgpack_packer* pk, const void* b, size_t l);
static int msgpack_pack_bin(msgpack_packer* pk, size_t l);
static int msgpack_pack_bin_body(msgpack_packer* pk, const void* b, size_t l);
static int msgpack_pack_bin_with_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_ext_with_body(msgpack_packer* pk, const void* b, size_t l, int8_t type);
static int msgpack_pack_timestamp(msgpack_packer* pk, const msgpack_timestamp* d);
MSGPACK_DLLEXPORT
int msgpack_pack_object(msgpack_packer* pk, msgpack_object d);
/** @} */
#define msgpack_pack_inline_func(name) \
inline int msgpack_pack ## name
#define msgpack_pack_inline_func_cint(name) \
inline int msgpack_pack ## name
#define msgpack_pack_inline_func_fixint(name) \
inline int msgpack_pack_fix ## name
#define msgpack_pack_user msgpack_packer*
#define msgpack_pack_append_buffer(user, buf, len) \
return (*(user)->callback)((user)->data, (const char*)buf, len)
#include "pack_template.h"
inline void msgpack_packer_init(msgpack_packer* pk, void* data, msgpack_packer_write callback)
{
pk->data = data;
pk->callback = callback;
}
inline msgpack_packer* msgpack_packer_new(void* data, msgpack_packer_write callback)
{
msgpack_packer* pk = (msgpack_packer*)calloc(1, sizeof(msgpack_packer));
if(!pk) { return NULL; }
msgpack_packer_init(pk, data, callback);
return pk;
}
inline void msgpack_packer_free(msgpack_packer* pk)
{
free(pk);
}
inline int msgpack_pack_str_with_body(msgpack_packer* pk, const void* b, size_t l)
{
int ret = msgpack_pack_str(pk, l);
if (ret != 0) { return ret; }
return msgpack_pack_str_body(pk, b, l);
}
inline int msgpack_pack_bin_with_body(msgpack_packer* pk, const void* b, size_t l)
{
int ret = msgpack_pack_bin(pk, l);
if (ret != 0) { return ret; }
return msgpack_pack_bin_body(pk, b, l);
}
inline int msgpack_pack_ext_with_body(msgpack_packer* pk, const void* b, size_t l, int8_t type)
{
int ret = msgpack_pack_ext(pk, l, type);
if (ret != 0) { return ret; }
return msgpack_pack_ext_body(pk, b, l);
}
#ifdef __cplusplus
}
#endif
#endif /* msgpack/pack.h */

View File

@@ -1,18 +0,0 @@
/*
* MessagePack unpacking routine template
*
* Copyright (C) 2008-2010 FURUHASHI Sadayuki
*
* 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_PACK_DEFINE_H
#define MSGPACK_PACK_DEFINE_H
#include "msgpack/sysdep.h"
#include <limits.h>
#include <string.h>
#endif /* msgpack/pack_define.h */

View File

@@ -1,945 +0,0 @@
/*
* MessagePack packing routine template
*
* Copyright (C) 2008-2010 FURUHASHI Sadayuki
*
* 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)
*/
#if MSGPACK_ENDIAN_LITTLE_BYTE
#define TAKE8_8(d) ((uint8_t*)&d)[0]
#define TAKE8_16(d) ((uint8_t*)&d)[0]
#define TAKE8_32(d) ((uint8_t*)&d)[0]
#define TAKE8_64(d) ((uint8_t*)&d)[0]
#elif MSGPACK_ENDIAN_BIG_BYTE
#define TAKE8_8(d) ((uint8_t*)&d)[0]
#define TAKE8_16(d) ((uint8_t*)&d)[1]
#define TAKE8_32(d) ((uint8_t*)&d)[3]
#define TAKE8_64(d) ((uint8_t*)&d)[7]
#else
#error msgpack-c supports only big endian and little endian
#endif
#ifndef msgpack_pack_inline_func
#error msgpack_pack_inline_func template is not defined
#endif
#ifndef msgpack_pack_user
#error msgpack_pack_user type is not defined
#endif
#ifndef msgpack_pack_append_buffer
#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
*/
#define msgpack_pack_real_uint8(x, d) \
do { \
if(d < (1<<7)) { \
/* fixnum */ \
msgpack_pack_append_buffer(x, &TAKE8_8(d), 1); \
} else { \
/* unsigned 8 */ \
unsigned char buf[2] = {0xcc, TAKE8_8(d)}; \
msgpack_pack_append_buffer(x, buf, 2); \
} \
} while(0)
#define msgpack_pack_real_uint16(x, d) \
do { \
if(d < (1<<7)) { \
/* fixnum */ \
msgpack_pack_append_buffer(x, &TAKE8_16(d), 1); \
} else if(d < (1<<8)) { \
/* unsigned 8 */ \
unsigned char buf[2] = {0xcc, TAKE8_16(d)}; \
msgpack_pack_append_buffer(x, buf, 2); \
} else { \
/* unsigned 16 */ \
unsigned char buf[3]; \
buf[0] = 0xcd; _msgpack_store16(&buf[1], (uint16_t)d); \
msgpack_pack_append_buffer(x, buf, 3); \
} \
} while(0)
#define msgpack_pack_real_uint32(x, d) \
do { \
if(d < (1<<8)) { \
if(d < (1<<7)) { \
/* fixnum */ \
msgpack_pack_append_buffer(x, &TAKE8_32(d), 1); \
} else { \
/* unsigned 8 */ \
unsigned char buf[2] = {0xcc, TAKE8_32(d)}; \
msgpack_pack_append_buffer(x, buf, 2); \
} \
} else { \
if(d < (1<<16)) { \
/* unsigned 16 */ \
unsigned char buf[3]; \
buf[0] = 0xcd; _msgpack_store16(&buf[1], (uint16_t)d); \
msgpack_pack_append_buffer(x, buf, 3); \
} else { \
/* unsigned 32 */ \
unsigned char buf[5]; \
buf[0] = 0xce; _msgpack_store32(&buf[1], (uint32_t)d); \
msgpack_pack_append_buffer(x, buf, 5); \
} \
} \
} while(0)
#define msgpack_pack_real_uint64(x, d) \
do { \
if(d < (1ULL<<8)) { \
if(d < (1ULL<<7)) { \
/* fixnum */ \
msgpack_pack_append_buffer(x, &TAKE8_64(d), 1); \
} else { \
/* unsigned 8 */ \
unsigned char buf[2] = {0xcc, TAKE8_64(d)}; \
msgpack_pack_append_buffer(x, buf, 2); \
} \
} else { \
if(d < (1ULL<<16)) { \
/* unsigned 16 */ \
unsigned char buf[3]; \
buf[0] = 0xcd; _msgpack_store16(&buf[1], (uint16_t)d); \
msgpack_pack_append_buffer(x, buf, 3); \
} else if(d < (1ULL<<32)) { \
/* unsigned 32 */ \
unsigned char buf[5]; \
buf[0] = 0xce; _msgpack_store32(&buf[1], (uint32_t)d); \
msgpack_pack_append_buffer(x, buf, 5); \
} else { \
/* unsigned 64 */ \
unsigned char buf[9]; \
buf[0] = 0xcf; _msgpack_store64(&buf[1], d); \
msgpack_pack_append_buffer(x, buf, 9); \
} \
} \
} while(0)
#define msgpack_pack_real_int8(x, d) \
do { \
if(d < -(1<<5)) { \
/* signed 8 */ \
unsigned char buf[2] = {0xd0, TAKE8_8(d)}; \
msgpack_pack_append_buffer(x, buf, 2); \
} else { \
/* fixnum */ \
msgpack_pack_append_buffer(x, &TAKE8_8(d), 1); \
} \
} while(0)
#define msgpack_pack_real_int16(x, d) \
do { \
if(d < -(1<<5)) { \
if(d < -(1<<7)) { \
/* signed 16 */ \
unsigned char buf[3]; \
buf[0] = 0xd1; _msgpack_store16(&buf[1], (int16_t)d); \
msgpack_pack_append_buffer(x, buf, 3); \
} else { \
/* signed 8 */ \
unsigned char buf[2] = {0xd0, TAKE8_16(d)}; \
msgpack_pack_append_buffer(x, buf, 2); \
} \
} else if(d < (1<<7)) { \
/* fixnum */ \
msgpack_pack_append_buffer(x, &TAKE8_16(d), 1); \
} else { \
if(d < (1<<8)) { \
/* unsigned 8 */ \
unsigned char buf[2] = {0xcc, TAKE8_16(d)}; \
msgpack_pack_append_buffer(x, buf, 2); \
} else { \
/* unsigned 16 */ \
unsigned char buf[3]; \
buf[0] = 0xcd; _msgpack_store16(&buf[1], (uint16_t)d); \
msgpack_pack_append_buffer(x, buf, 3); \
} \
} \
} while(0)
#define msgpack_pack_real_int32(x, d) \
do { \
if(d < -(1<<5)) { \
if(d < -(1<<15)) { \
/* signed 32 */ \
unsigned char buf[5]; \
buf[0] = 0xd2; _msgpack_store32(&buf[1], (int32_t)d); \
msgpack_pack_append_buffer(x, buf, 5); \
} else if(d < -(1<<7)) { \
/* signed 16 */ \
unsigned char buf[3]; \
buf[0] = 0xd1; _msgpack_store16(&buf[1], (int16_t)d); \
msgpack_pack_append_buffer(x, buf, 3); \
} else { \
/* signed 8 */ \
unsigned char buf[2] = {0xd0, TAKE8_32(d)}; \
msgpack_pack_append_buffer(x, buf, 2); \
} \
} else if(d < (1<<7)) { \
/* fixnum */ \
msgpack_pack_append_buffer(x, &TAKE8_32(d), 1); \
} else { \
if(d < (1<<8)) { \
/* unsigned 8 */ \
unsigned char buf[2] = {0xcc, TAKE8_32(d)}; \
msgpack_pack_append_buffer(x, buf, 2); \
} else if(d < (1<<16)) { \
/* unsigned 16 */ \
unsigned char buf[3]; \
buf[0] = 0xcd; _msgpack_store16(&buf[1], (uint16_t)d); \
msgpack_pack_append_buffer(x, buf, 3); \
} else { \
/* unsigned 32 */ \
unsigned char buf[5]; \
buf[0] = 0xce; _msgpack_store32(&buf[1], (uint32_t)d); \
msgpack_pack_append_buffer(x, buf, 5); \
} \
} \
} while(0)
#define msgpack_pack_real_int64(x, d) \
do { \
if(d < -(1LL<<5)) { \
if(d < -(1LL<<15)) { \
if(d < -(1LL<<31)) { \
/* signed 64 */ \
unsigned char buf[9]; \
buf[0] = 0xd3; _msgpack_store64(&buf[1], d); \
msgpack_pack_append_buffer(x, buf, 9); \
} else { \
/* signed 32 */ \
unsigned char buf[5]; \
buf[0] = 0xd2; _msgpack_store32(&buf[1], (int32_t)d); \
msgpack_pack_append_buffer(x, buf, 5); \
} \
} else { \
if(d < -(1<<7)) { \
/* signed 16 */ \
unsigned char buf[3]; \
buf[0] = 0xd1; _msgpack_store16(&buf[1], (int16_t)d); \
msgpack_pack_append_buffer(x, buf, 3); \
} else { \
/* signed 8 */ \
unsigned char buf[2] = {0xd0, TAKE8_64(d)}; \
msgpack_pack_append_buffer(x, buf, 2); \
} \
} \
} else if(d < (1<<7)) { \
/* fixnum */ \
msgpack_pack_append_buffer(x, &TAKE8_64(d), 1); \
} else { \
if(d < (1LL<<16)) { \
if(d < (1<<8)) { \
/* unsigned 8 */ \
unsigned char buf[2] = {0xcc, TAKE8_64(d)}; \
msgpack_pack_append_buffer(x, buf, 2); \
} else { \
/* unsigned 16 */ \
unsigned char buf[3]; \
buf[0] = 0xcd; _msgpack_store16(&buf[1], (uint16_t)d); \
msgpack_pack_append_buffer(x, buf, 3); \
} \
} else { \
if(d < (1LL<<32)) { \
/* unsigned 32 */ \
unsigned char buf[5]; \
buf[0] = 0xce; _msgpack_store32(&buf[1], (uint32_t)d); \
msgpack_pack_append_buffer(x, buf, 5); \
} else { \
/* unsigned 64 */ \
unsigned char buf[9]; \
buf[0] = 0xcf; _msgpack_store64(&buf[1], d); \
msgpack_pack_append_buffer(x, buf, 9); \
} \
} \
} \
} while(0)
#ifdef msgpack_pack_inline_func_fixint
msgpack_pack_inline_func_fixint(_uint8)(msgpack_pack_user x, uint8_t d)
{
unsigned char buf[2] = {0xcc, TAKE8_8(d)};
msgpack_pack_append_buffer(x, buf, 2);
}
msgpack_pack_inline_func_fixint(_uint16)(msgpack_pack_user x, uint16_t d)
{
unsigned char buf[3];
buf[0] = 0xcd; _msgpack_store16(&buf[1], d);
msgpack_pack_append_buffer(x, buf, 3);
}
msgpack_pack_inline_func_fixint(_uint32)(msgpack_pack_user x, uint32_t d)
{
unsigned char buf[5];
buf[0] = 0xce; _msgpack_store32(&buf[1], d);
msgpack_pack_append_buffer(x, buf, 5);
}
msgpack_pack_inline_func_fixint(_uint64)(msgpack_pack_user x, uint64_t d)
{
unsigned char buf[9];
buf[0] = 0xcf; _msgpack_store64(&buf[1], d);
msgpack_pack_append_buffer(x, buf, 9);
}
msgpack_pack_inline_func_fixint(_int8)(msgpack_pack_user x, int8_t d)
{
unsigned char buf[2] = {0xd0, TAKE8_8(d)};
msgpack_pack_append_buffer(x, buf, 2);
}
msgpack_pack_inline_func_fixint(_int16)(msgpack_pack_user x, int16_t d)
{
unsigned char buf[3];
buf[0] = 0xd1; _msgpack_store16(&buf[1], d);
msgpack_pack_append_buffer(x, buf, 3);
}
msgpack_pack_inline_func_fixint(_int32)(msgpack_pack_user x, int32_t d)
{
unsigned char buf[5];
buf[0] = 0xd2; _msgpack_store32(&buf[1], d);
msgpack_pack_append_buffer(x, buf, 5);
}
msgpack_pack_inline_func_fixint(_int64)(msgpack_pack_user x, int64_t d)
{
unsigned char buf[9];
buf[0] = 0xd3; _msgpack_store64(&buf[1], d);
msgpack_pack_append_buffer(x, buf, 9);
}
#undef msgpack_pack_inline_func_fixint
#endif
msgpack_pack_inline_func(_uint8)(msgpack_pack_user x, uint8_t d)
{
msgpack_pack_real_uint8(x, d);
}
msgpack_pack_inline_func(_uint16)(msgpack_pack_user x, uint16_t d)
{
msgpack_pack_real_uint16(x, d);
}
msgpack_pack_inline_func(_uint32)(msgpack_pack_user x, uint32_t d)
{
msgpack_pack_real_uint32(x, d);
}
msgpack_pack_inline_func(_uint64)(msgpack_pack_user x, uint64_t d)
{
msgpack_pack_real_uint64(x, d);
}
msgpack_pack_inline_func(_int8)(msgpack_pack_user x, int8_t d)
{
msgpack_pack_real_int8(x, d);
}
msgpack_pack_inline_func(_int16)(msgpack_pack_user x, int16_t d)
{
msgpack_pack_real_int16(x, d);
}
msgpack_pack_inline_func(_int32)(msgpack_pack_user x, int32_t d)
{
msgpack_pack_real_int32(x, d);
}
msgpack_pack_inline_func(_int64)(msgpack_pack_user x, int64_t d)
{
msgpack_pack_real_int64(x, d);
}
msgpack_pack_inline_func(_char)(msgpack_pack_user x, char d)
{
#if defined(CHAR_MIN)
#if CHAR_MIN < 0
msgpack_pack_real_int8(x, d);
#else
msgpack_pack_real_uint8(x, d);
#endif
#else
#error CHAR_MIN is not defined
#endif
}
msgpack_pack_inline_func(_signed_char)(msgpack_pack_user x, signed char d)
{
msgpack_pack_real_int8(x, d);
}
msgpack_pack_inline_func(_unsigned_char)(msgpack_pack_user x, unsigned char d)
{
msgpack_pack_real_uint8(x, d);
}
#ifdef msgpack_pack_inline_func_cint
msgpack_pack_inline_func_cint(_short)(msgpack_pack_user x, short d)
{
#if defined(SIZEOF_SHORT)
#if SIZEOF_SHORT == 2
msgpack_pack_real_int16(x, d);
#elif SIZEOF_SHORT == 4
msgpack_pack_real_int32(x, d);
#else
msgpack_pack_real_int64(x, d);
#endif
#elif defined(SHRT_MAX)
#if SHRT_MAX == 0x7fff
msgpack_pack_real_int16(x, d);
#elif SHRT_MAX == 0x7fffffff
msgpack_pack_real_int32(x, d);
#else
msgpack_pack_real_int64(x, d);
#endif
#else
if(sizeof(short) == 2) {
msgpack_pack_real_int16(x, d);
} else if(sizeof(short) == 4) {
msgpack_pack_real_int32(x, d);
} else {
msgpack_pack_real_int64(x, d);
}
#endif
}
msgpack_pack_inline_func_cint(_int)(msgpack_pack_user x, int d)
{
#if defined(SIZEOF_INT)
#if SIZEOF_INT == 2
msgpack_pack_real_int16(x, d);
#elif SIZEOF_INT == 4
msgpack_pack_real_int32(x, d);
#else
msgpack_pack_real_int64(x, d);
#endif
#elif defined(INT_MAX)
#if INT_MAX == 0x7fff
msgpack_pack_real_int16(x, d);
#elif INT_MAX == 0x7fffffff
msgpack_pack_real_int32(x, d);
#else
msgpack_pack_real_int64(x, d);
#endif
#else
if(sizeof(int) == 2) {
msgpack_pack_real_int16(x, d);
} else if(sizeof(int) == 4) {
msgpack_pack_real_int32(x, d);
} else {
msgpack_pack_real_int64(x, d);
}
#endif
}
msgpack_pack_inline_func_cint(_long)(msgpack_pack_user x, long d)
{
#if defined(SIZEOF_LONG)
#if SIZEOF_LONG == 2
msgpack_pack_real_int16(x, d);
#elif SIZEOF_LONG == 4
msgpack_pack_real_int32(x, d);
#else
msgpack_pack_real_int64(x, d);
#endif
#elif defined(LONG_MAX)
#if LONG_MAX == 0x7fffL
msgpack_pack_real_int16(x, d);
#elif LONG_MAX == 0x7fffffffL
msgpack_pack_real_int32(x, d);
#else
msgpack_pack_real_int64(x, d);
#endif
#else
if(sizeof(long) == 2) {
msgpack_pack_real_int16(x, d);
} else if(sizeof(long) == 4) {
msgpack_pack_real_int32(x, d);
} else {
msgpack_pack_real_int64(x, d);
}
#endif
}
msgpack_pack_inline_func_cint(_long_long)(msgpack_pack_user x, long long d)
{
#if defined(SIZEOF_LONG_LONG)
#if SIZEOF_LONG_LONG == 2
msgpack_pack_real_int16(x, d);
#elif SIZEOF_LONG_LONG == 4
msgpack_pack_real_int32(x, d);
#else
msgpack_pack_real_int64(x, d);
#endif
#elif defined(LLONG_MAX)
#if LLONG_MAX == 0x7fffL
msgpack_pack_real_int16(x, d);
#elif LLONG_MAX == 0x7fffffffL
msgpack_pack_real_int32(x, d);
#else
msgpack_pack_real_int64(x, d);
#endif
#else
if(sizeof(long long) == 2) {
msgpack_pack_real_int16(x, d);
} else if(sizeof(long long) == 4) {
msgpack_pack_real_int32(x, d);
} else {
msgpack_pack_real_int64(x, d);
}
#endif
}
msgpack_pack_inline_func_cint(_unsigned_short)(msgpack_pack_user x, unsigned short d)
{
#if defined(SIZEOF_SHORT)
#if SIZEOF_SHORT == 2
msgpack_pack_real_uint16(x, d);
#elif SIZEOF_SHORT == 4
msgpack_pack_real_uint32(x, d);
#else
msgpack_pack_real_uint64(x, d);
#endif
#elif defined(USHRT_MAX)
#if USHRT_MAX == 0xffffU
msgpack_pack_real_uint16(x, d);
#elif USHRT_MAX == 0xffffffffU
msgpack_pack_real_uint32(x, d);
#else
msgpack_pack_real_uint64(x, d);
#endif
#else
if(sizeof(unsigned short) == 2) {
msgpack_pack_real_uint16(x, d);
} else if(sizeof(unsigned short) == 4) {
msgpack_pack_real_uint32(x, d);
} else {
msgpack_pack_real_uint64(x, d);
}
#endif
}
msgpack_pack_inline_func_cint(_unsigned_int)(msgpack_pack_user x, unsigned int d)
{
#if defined(SIZEOF_INT)
#if SIZEOF_INT == 2
msgpack_pack_real_uint16(x, d);
#elif SIZEOF_INT == 4
msgpack_pack_real_uint32(x, d);
#else
msgpack_pack_real_uint64(x, d);
#endif
#elif defined(UINT_MAX)
#if UINT_MAX == 0xffffU
msgpack_pack_real_uint16(x, d);
#elif UINT_MAX == 0xffffffffU
msgpack_pack_real_uint32(x, d);
#else
msgpack_pack_real_uint64(x, d);
#endif
#else
if(sizeof(unsigned int) == 2) {
msgpack_pack_real_uint16(x, d);
} else if(sizeof(unsigned int) == 4) {
msgpack_pack_real_uint32(x, d);
} else {
msgpack_pack_real_uint64(x, d);
}
#endif
}
msgpack_pack_inline_func_cint(_unsigned_long)(msgpack_pack_user x, unsigned long d)
{
#if defined(SIZEOF_LONG)
#if SIZEOF_LONG == 2
msgpack_pack_real_uint16(x, d);
#elif SIZEOF_LONG == 4
msgpack_pack_real_uint32(x, d);
#else
msgpack_pack_real_uint64(x, d);
#endif
#elif defined(ULONG_MAX)
#if ULONG_MAX == 0xffffUL
msgpack_pack_real_uint16(x, d);
#elif ULONG_MAX == 0xffffffffUL
msgpack_pack_real_uint32(x, d);
#else
msgpack_pack_real_uint64(x, d);
#endif
#else
if(sizeof(unsigned long) == 2) {
msgpack_pack_real_uint16(x, d);
} else if(sizeof(unsigned long) == 4) {
msgpack_pack_real_uint32(x, d);
} else {
msgpack_pack_real_uint64(x, d);
}
#endif
}
msgpack_pack_inline_func_cint(_unsigned_long_long)(msgpack_pack_user x, unsigned long long d)
{
#if defined(SIZEOF_LONG_LONG)
#if SIZEOF_LONG_LONG == 2
msgpack_pack_real_uint16(x, d);
#elif SIZEOF_LONG_LONG == 4
msgpack_pack_real_uint32(x, d);
#else
msgpack_pack_real_uint64(x, d);
#endif
#elif defined(ULLONG_MAX)
#if ULLONG_MAX == 0xffffUL
msgpack_pack_real_uint16(x, d);
#elif ULLONG_MAX == 0xffffffffUL
msgpack_pack_real_uint32(x, d);
#else
msgpack_pack_real_uint64(x, d);
#endif
#else
if(sizeof(unsigned long long) == 2) {
msgpack_pack_real_uint16(x, d);
} else if(sizeof(unsigned long long) == 4) {
msgpack_pack_real_uint32(x, d);
} else {
msgpack_pack_real_uint64(x, d);
}
#endif
}
#undef msgpack_pack_inline_func_cint
#endif
/*
* Float
*/
msgpack_pack_inline_func(_float)(msgpack_pack_user x, float d)
{
unsigned char buf[5];
union { float f; uint32_t i; } mem;
mem.f = d;
buf[0] = 0xca; _msgpack_store32(&buf[1], mem.i);
msgpack_pack_append_buffer(x, buf, 5);
}
msgpack_pack_inline_func(_double)(msgpack_pack_user x, double d)
{
unsigned char buf[9];
union { double f; uint64_t i; } mem;
mem.f = d;
buf[0] = 0xcb;
#if defined(TARGET_OS_IPHONE)
// ok
#elif defined(__arm__) && !(__ARM_EABI__) // arm-oabi
// https://github.com/msgpack/msgpack-perl/pull/1
mem.i = (mem.i & 0xFFFFFFFFUL) << 32UL | (mem.i >> 32UL);
#endif
_msgpack_store64(&buf[1], mem.i);
msgpack_pack_append_buffer(x, buf, 9);
}
/*
* Nil
*/
msgpack_pack_inline_func(_nil)(msgpack_pack_user x)
{
static const unsigned char d = 0xc0;
msgpack_pack_append_buffer(x, &d, 1);
}
/*
* Boolean
*/
msgpack_pack_inline_func(_true)(msgpack_pack_user x)
{
static const unsigned char d = 0xc3;
msgpack_pack_append_buffer(x, &d, 1);
}
msgpack_pack_inline_func(_false)(msgpack_pack_user x)
{
static const unsigned char d = 0xc2;
msgpack_pack_append_buffer(x, &d, 1);
}
/*
* Array
*/
msgpack_pack_inline_func(_array)(msgpack_pack_user x, size_t n)
{
if(n < 16) {
unsigned char d = 0x90 | (uint8_t)n;
msgpack_pack_append_buffer(x, &d, 1);
} else if(n < 65536) {
unsigned char buf[3];
buf[0] = 0xdc; _msgpack_store16(&buf[1], (uint16_t)n);
msgpack_pack_append_buffer(x, buf, 3);
} else {
unsigned char buf[5];
buf[0] = 0xdd; _msgpack_store32(&buf[1], (uint32_t)n);
msgpack_pack_append_buffer(x, buf, 5);
}
}
/*
* Map
*/
msgpack_pack_inline_func(_map)(msgpack_pack_user x, size_t n)
{
if(n < 16) {
unsigned char d = 0x80 | (uint8_t)n;
msgpack_pack_append_buffer(x, &TAKE8_8(d), 1);
} else if(n < 65536) {
unsigned char buf[3];
buf[0] = 0xde; _msgpack_store16(&buf[1], (uint16_t)n);
msgpack_pack_append_buffer(x, buf, 3);
} else {
unsigned char buf[5];
buf[0] = 0xdf; _msgpack_store32(&buf[1], (uint32_t)n);
msgpack_pack_append_buffer(x, buf, 5);
}
}
/*
* Str
*/
msgpack_pack_inline_func(_str)(msgpack_pack_user x, size_t l)
{
if(l < 32) {
unsigned char d = 0xa0 | (uint8_t)l;
msgpack_pack_append_buffer(x, &TAKE8_8(d), 1);
} else if(l < 256) {
unsigned char buf[2];
buf[0] = 0xd9; buf[1] = (uint8_t)l;
msgpack_pack_append_buffer(x, buf, 2);
} else if(l < 65536) {
unsigned char buf[3];
buf[0] = 0xda; _msgpack_store16(&buf[1], (uint16_t)l);
msgpack_pack_append_buffer(x, buf, 3);
} else {
unsigned char buf[5];
buf[0] = 0xdb; _msgpack_store32(&buf[1], (uint32_t)l);
msgpack_pack_append_buffer(x, buf, 5);
}
}
msgpack_pack_inline_func(_str_body)(msgpack_pack_user x, const void* b, size_t l)
{
msgpack_pack_append_buffer(x, (const unsigned char*)b, l);
}
/*
* Raw (V4)
*/
msgpack_pack_inline_func(_v4raw)(msgpack_pack_user x, size_t l)
{
if(l < 32) {
unsigned char d = 0xa0 | (uint8_t)l;
msgpack_pack_append_buffer(x, &TAKE8_8(d), 1);
} else if(l < 65536) {
unsigned char buf[3];
buf[0] = 0xda; _msgpack_store16(&buf[1], (uint16_t)l);
msgpack_pack_append_buffer(x, buf, 3);
} else {
unsigned char buf[5];
buf[0] = 0xdb; _msgpack_store32(&buf[1], (uint32_t)l);
msgpack_pack_append_buffer(x, buf, 5);
}
}
msgpack_pack_inline_func(_v4raw_body)(msgpack_pack_user x, const void* b, size_t l)
{
msgpack_pack_append_buffer(x, (const unsigned char*)b, l);
}
/*
* Bin
*/
msgpack_pack_inline_func(_bin)(msgpack_pack_user x, size_t l)
{
if(l < 256) {
unsigned char buf[2];
buf[0] = 0xc4; buf[1] = (uint8_t)l;
msgpack_pack_append_buffer(x, buf, 2);
} else if(l < 65536) {
unsigned char buf[3];
buf[0] = 0xc5; _msgpack_store16(&buf[1], (uint16_t)l);
msgpack_pack_append_buffer(x, buf, 3);
} else {
unsigned char buf[5];
buf[0] = 0xc6; _msgpack_store32(&buf[1], (uint32_t)l);
msgpack_pack_append_buffer(x, buf, 5);
}
}
msgpack_pack_inline_func(_bin_body)(msgpack_pack_user x, const void* b, size_t l)
{
msgpack_pack_append_buffer(x, (const unsigned char*)b, l);
}
/*
* Ext
*/
msgpack_pack_inline_func(_ext)(msgpack_pack_user x, size_t l, int8_t type)
{
switch(l) {
case 1: {
unsigned char buf[2];
buf[0] = 0xd4;
buf[1] = (unsigned char)type;
msgpack_pack_append_buffer(x, buf, 2);
} break;
case 2: {
unsigned char buf[2];
buf[0] = 0xd5;
buf[1] = (unsigned char)type;
msgpack_pack_append_buffer(x, buf, 2);
} break;
case 4: {
unsigned char buf[2];
buf[0] = 0xd6;
buf[1] = (unsigned char)type;
msgpack_pack_append_buffer(x, buf, 2);
} break;
case 8: {
unsigned char buf[2];
buf[0] = 0xd7;
buf[1] = (unsigned char)type;
msgpack_pack_append_buffer(x, buf, 2);
} break;
case 16: {
unsigned char buf[2];
buf[0] = 0xd8;
buf[1] = (unsigned char)type;
msgpack_pack_append_buffer(x, buf, 2);
} break;
default:
if(l < 256) {
unsigned char buf[3];
buf[0] = 0xc7;
buf[1] = (unsigned char)l;
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] = (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] = (unsigned char)type;
msgpack_pack_append_buffer(x, buf, 6);
}
break;
}
}
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
#undef TAKE8_8
#undef TAKE8_16
#undef TAKE8_32
#undef TAKE8_64
#undef msgpack_pack_real_uint8
#undef msgpack_pack_real_uint16
#undef msgpack_pack_real_uint32
#undef msgpack_pack_real_uint64
#undef msgpack_pack_real_int8
#undef msgpack_pack_real_int16
#undef msgpack_pack_real_int32
#undef msgpack_pack_real_int64
#if defined(_MSC_VER)
# pragma warning(pop)
#endif

View File

@@ -1,24 +0,0 @@
/*
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)
*/
#if !defined(MSGPACK_PREDEF_H) || defined(MSGPACK_PREDEF_INTERNAL_GENERATE_TESTS)
#ifndef MSGPACK_PREDEF_H
#define MSGPACK_PREDEF_H
#endif
#include <msgpack/predef/language.h>
#include <msgpack/predef/architecture.h>
#include <msgpack/predef/compiler.h>
#include <msgpack/predef/library.h>
#include <msgpack/predef/os.h>
#include <msgpack/predef/other.h>
#include <msgpack/predef/platform.h>
#include <msgpack/predef/hardware.h>
#include <msgpack/predef/version.h>
#endif

View File

@@ -1,33 +0,0 @@
/*
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)
*/
#if !defined(MSGPACK_PREDEF_ARCHITECTURE_H) || defined(MSGPACK_PREDEF_INTERNAL_GENERATE_TESTS)
#ifndef MSGPACK_PREDEF_ARCHITECTURE_H
#define MSGPACK_PREDEF_ARCHITECTURE_H
#endif
#include <msgpack/predef/architecture/alpha.h>
#include <msgpack/predef/architecture/arm.h>
#include <msgpack/predef/architecture/blackfin.h>
#include <msgpack/predef/architecture/convex.h>
#include <msgpack/predef/architecture/ia64.h>
#include <msgpack/predef/architecture/m68k.h>
#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>
#include <msgpack/predef/architecture/superh.h>
#include <msgpack/predef/architecture/sys370.h>
#include <msgpack/predef/architecture/sys390.h>
#include <msgpack/predef/architecture/x86.h>
#include <msgpack/predef/architecture/z.h>
/*#include <msgpack/predef/architecture/.h>*/
#endif

View File

@@ -1,59 +0,0 @@
/*
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_ARCHITECTURE_ALPHA_H
#define MSGPACK_PREDEF_ARCHITECTURE_ALPHA_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_ARCH_ALPHA`]
[@http://en.wikipedia.org/wiki/DEC_Alpha DEC Alpha] architecture.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__alpha__`] [__predef_detection__]]
[[`__alpha`] [__predef_detection__]]
[[`_M_ALPHA`] [__predef_detection__]]
[[`__alpha_ev4__`] [4.0.0]]
[[`__alpha_ev5__`] [5.0.0]]
[[`__alpha_ev6__`] [6.0.0]]
]
*/
#define MSGPACK_ARCH_ALPHA MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__alpha__) || defined(__alpha) || \
defined(_M_ALPHA)
# undef MSGPACK_ARCH_ALPHA
# if !defined(MSGPACK_ARCH_ALPHA) && defined(__alpha_ev4__)
# define MSGPACK_ARCH_ALPHA MSGPACK_VERSION_NUMBER(4,0,0)
# endif
# if !defined(MSGPACK_ARCH_ALPHA) && defined(__alpha_ev5__)
# define MSGPACK_ARCH_ALPHA MSGPACK_VERSION_NUMBER(5,0,0)
# endif
# if !defined(MSGPACK_ARCH_ALPHA) && defined(__alpha_ev6__)
# define MSGPACK_ARCH_ALPHA MSGPACK_VERSION_NUMBER(6,0,0)
# endif
# if !defined(MSGPACK_ARCH_ALPHA)
# define MSGPACK_ARCH_ALPHA MSGPACK_VERSION_NUMBER_AVAILABLE
# endif
#endif
#if MSGPACK_ARCH_ALPHA
# define MSGPACK_ARCH_ALPHA_AVAILABLE
#endif
#define MSGPACK_ARCH_ALPHA_NAME "DEC Alpha"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_ARCH_ALPHA,MSGPACK_ARCH_ALPHA_NAME)

View File

@@ -1,80 +0,0 @@
/*
Copyright Rene Rivera 2008-2015
Copyright Franz Detro 2014
Copyright (c) Microsoft Corporation 2014
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_ARM_H
#define MSGPACK_PREDEF_ARCHITECTURE_ARM_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_ARCH_ARM`]
[@http://en.wikipedia.org/wiki/ARM_architecture ARM] architecture.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__arm__`] [__predef_detection__]]
[[`__arm64`] [__predef_detection__]]
[[`__thumb__`] [__predef_detection__]]
[[`__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]]
]
*/
#define MSGPACK_ARCH_ARM MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__arm__) || defined(__arm64) || defined(__thumb__) || \
defined(__TARGET_ARCH_ARM) || defined(__TARGET_ARCH_THUMB) || \
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)
# endif
# if !defined(MSGPACK_ARCH_ARM) && defined(__TARGET_ARCH_ARM)
# define MSGPACK_ARCH_ARM MSGPACK_VERSION_NUMBER(__TARGET_ARCH_ARM,0,0)
# endif
# 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
# if !defined(MSGPACK_ARCH_ARM)
# define MSGPACK_ARCH_ARM MSGPACK_VERSION_NUMBER_AVAILABLE
# endif
#endif
#if MSGPACK_ARCH_ARM
# define MSGPACK_ARCH_ARM_AVAILABLE
#endif
#define MSGPACK_ARCH_ARM_NAME "ARM"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_ARCH_ARM,MSGPACK_ARCH_ARM_NAME)

View File

@@ -1,46 +0,0 @@
/*
Copyright Rene Rivera 2013-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_ARCHITECTURE_BLACKFIN_H
#define MSGPACK_PREDEF_ARCHITECTURE_BLACKFIN_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_ARCH_BLACKFIN`]
Blackfin Processors from Analog Devices.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__bfin__`] [__predef_detection__]]
[[`__BFIN__`] [__predef_detection__]]
[[`bfin`] [__predef_detection__]]
[[`BFIN`] [__predef_detection__]]
]
*/
#define MSGPACK_ARCH_BLACKFIN MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__bfin__) || defined(__BFIN__) || \
defined(bfin) || defined(BFIN)
# undef MSGPACK_ARCH_BLACKFIN
# define MSGPACK_ARCH_BLACKFIN MSGPACK_VERSION_NUMBER_AVAILABLE
#endif
#if MSGPACK_ARCH_BLACKFIN
# define MSGPACK_ARCH_BLACKFIN_AVAILABLE
#endif
#define MSGPACK_ARCH_BLACKFIN_NAME "Blackfin"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_ARCH_BLACKFIN,MSGPACK_ARCH_BLACKFIN_NAME)

View File

@@ -1,65 +0,0 @@
/*
Copyright Rene Rivera 2011-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_ARCHITECTURE_CONVEX_H
#define MSGPACK_PREDEF_ARCHITECTURE_CONVEX_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_ARCH_CONVEX`]
[@http://en.wikipedia.org/wiki/Convex_Computer Convex Computer] architecture.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__convex__`] [__predef_detection__]]
[[`__convex_c1__`] [1.0.0]]
[[`__convex_c2__`] [2.0.0]]
[[`__convex_c32__`] [3.2.0]]
[[`__convex_c34__`] [3.4.0]]
[[`__convex_c38__`] [3.8.0]]
]
*/
#define MSGPACK_ARCH_CONVEX MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__convex__)
# undef MSGPACK_ARCH_CONVEX
# if !defined(MSGPACK_ARCH_CONVEX) && defined(__convex_c1__)
# define MSGPACK_ARCH_CONVEX MSGPACK_VERSION_NUMBER(1,0,0)
# endif
# if !defined(MSGPACK_ARCH_CONVEX) && defined(__convex_c2__)
# define MSGPACK_ARCH_CONVEX MSGPACK_VERSION_NUMBER(2,0,0)
# endif
# if !defined(MSGPACK_ARCH_CONVEX) && defined(__convex_c32__)
# define MSGPACK_ARCH_CONVEX MSGPACK_VERSION_NUMBER(3,2,0)
# endif
# if !defined(MSGPACK_ARCH_CONVEX) && defined(__convex_c34__)
# define MSGPACK_ARCH_CONVEX MSGPACK_VERSION_NUMBER(3,4,0)
# endif
# if !defined(MSGPACK_ARCH_CONVEX) && defined(__convex_c38__)
# define MSGPACK_ARCH_CONVEX MSGPACK_VERSION_NUMBER(3,8,0)
# endif
# if !defined(MSGPACK_ARCH_CONVEX)
# define MSGPACK_ARCH_CONVEX MSGPACK_VERSION_NUMBER_AVAILABLE
# endif
#endif
#if MSGPACK_ARCH_CONVEX
# define MSGPACK_ARCH_CONVEX_AVAILABLE
#endif
#define MSGPACK_ARCH_CONVEX_NAME "Convex Computer"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_ARCH_CONVEX,MSGPACK_ARCH_CONVEX_NAME)

View File

@@ -1,49 +0,0 @@
/*
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_ARCHITECTURE_IA64_H
#define MSGPACK_PREDEF_ARCHITECTURE_IA64_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_ARCH_IA64`]
[@http://en.wikipedia.org/wiki/Ia64 Intel Itanium 64] architecture.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__ia64__`] [__predef_detection__]]
[[`_IA64`] [__predef_detection__]]
[[`__IA64__`] [__predef_detection__]]
[[`__ia64`] [__predef_detection__]]
[[`_M_IA64`] [__predef_detection__]]
[[`__itanium__`] [__predef_detection__]]
]
*/
#define MSGPACK_ARCH_IA64 MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__ia64__) || defined(_IA64) || \
defined(__IA64__) || defined(__ia64) || \
defined(_M_IA64) || defined(__itanium__)
# undef MSGPACK_ARCH_IA64
# define MSGPACK_ARCH_IA64 MSGPACK_VERSION_NUMBER_AVAILABLE
#endif
#if MSGPACK_ARCH_IA64
# define MSGPACK_ARCH_IA64_AVAILABLE
#endif
#define MSGPACK_ARCH_IA64_NAME "Intel Itanium 64"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_ARCH_IA64,MSGPACK_ARCH_IA64_NAME)

View File

@@ -1,82 +0,0 @@
/*
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_ARCHITECTURE_M68K_H
#define MSGPACK_PREDEF_ARCHITECTURE_M68K_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_ARCH_M68K`]
[@http://en.wikipedia.org/wiki/M68k Motorola 68k] architecture.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__m68k__`] [__predef_detection__]]
[[`M68000`] [__predef_detection__]]
[[`__mc68060__`] [6.0.0]]
[[`mc68060`] [6.0.0]]
[[`__mc68060`] [6.0.0]]
[[`__mc68040__`] [4.0.0]]
[[`mc68040`] [4.0.0]]
[[`__mc68040`] [4.0.0]]
[[`__mc68030__`] [3.0.0]]
[[`mc68030`] [3.0.0]]
[[`__mc68030`] [3.0.0]]
[[`__mc68020__`] [2.0.0]]
[[`mc68020`] [2.0.0]]
[[`__mc68020`] [2.0.0]]
[[`__mc68010__`] [1.0.0]]
[[`mc68010`] [1.0.0]]
[[`__mc68010`] [1.0.0]]
[[`__mc68000__`] [0.0.1]]
[[`mc68000`] [0.0.1]]
[[`__mc68000`] [0.0.1]]
]
*/
#define MSGPACK_ARCH_M68K MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__m68k__) || defined(M68000)
# undef MSGPACK_ARCH_M68K
# if !defined(MSGPACK_ARCH_M68K) && (defined(__mc68060__) || defined(mc68060) || defined(__mc68060))
# define MSGPACK_ARCH_M68K MSGPACK_VERSION_NUMBER(6,0,0)
# endif
# if !defined(MSGPACK_ARCH_M68K) && (defined(__mc68040__) || defined(mc68040) || defined(__mc68040))
# define MSGPACK_ARCH_M68K MSGPACK_VERSION_NUMBER(4,0,0)
# endif
# if !defined(MSGPACK_ARCH_M68K) && (defined(__mc68030__) || defined(mc68030) || defined(__mc68030))
# define MSGPACK_ARCH_M68K MSGPACK_VERSION_NUMBER(3,0,0)
# endif
# if !defined(MSGPACK_ARCH_M68K) && (defined(__mc68020__) || defined(mc68020) || defined(__mc68020))
# define MSGPACK_ARCH_M68K MSGPACK_VERSION_NUMBER(2,0,0)
# endif
# if !defined(MSGPACK_ARCH_M68K) && (defined(__mc68010__) || defined(mc68010) || defined(__mc68010))
# define MSGPACK_ARCH_M68K MSGPACK_VERSION_NUMBER(1,0,0)
# endif
# if !defined(MSGPACK_ARCH_M68K) && (defined(__mc68000__) || defined(mc68000) || defined(__mc68000))
# define MSGPACK_ARCH_M68K MSGPACK_VERSION_NUMBER_AVAILABLE
# endif
# if !defined(MSGPACK_ARCH_M68K)
# define MSGPACK_ARCH_M68K MSGPACK_VERSION_NUMBER_AVAILABLE
# endif
#endif
#if MSGPACK_ARCH_M68K
# define MSGPACK_ARCH_M68K_AVAILABLE
#endif
#define MSGPACK_ARCH_M68K_NAME "Motorola 68k"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_ARCH_M68K,MSGPACK_ARCH_M68K_NAME)

View File

@@ -1,73 +0,0 @@
/*
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_ARCHITECTURE_MIPS_H
#define MSGPACK_PREDEF_ARCHITECTURE_MIPS_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_ARCH_MIPS`]
[@http://en.wikipedia.org/wiki/MIPS_architecture MIPS] architecture.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__mips__`] [__predef_detection__]]
[[`__mips`] [__predef_detection__]]
[[`__MIPS__`] [__predef_detection__]]
[[`__mips`] [V.0.0]]
[[`_MIPS_ISA_MIPS1`] [1.0.0]]
[[`_R3000`] [1.0.0]]
[[`_MIPS_ISA_MIPS2`] [2.0.0]]
[[`__MIPS_ISA2__`] [2.0.0]]
[[`_R4000`] [2.0.0]]
[[`_MIPS_ISA_MIPS3`] [3.0.0]]
[[`__MIPS_ISA3__`] [3.0.0]]
[[`_MIPS_ISA_MIPS4`] [4.0.0]]
[[`__MIPS_ISA4__`] [4.0.0]]
]
*/
#define MSGPACK_ARCH_MIPS MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__mips__) || defined(__mips) || \
defined(__MIPS__)
# undef MSGPACK_ARCH_MIPS
# if !defined(MSGPACK_ARCH_MIPS) && (defined(__mips))
# define MSGPACK_ARCH_MIPS MSGPACK_VERSION_NUMBER(__mips,0,0)
# endif
# if !defined(MSGPACK_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS1) || defined(_R3000))
# define MSGPACK_ARCH_MIPS MSGPACK_VERSION_NUMBER(1,0,0)
# endif
# if !defined(MSGPACK_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS2) || defined(__MIPS_ISA2__) || defined(_R4000))
# define MSGPACK_ARCH_MIPS MSGPACK_VERSION_NUMBER(2,0,0)
# endif
# if !defined(MSGPACK_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS3) || defined(__MIPS_ISA3__))
# define MSGPACK_ARCH_MIPS MSGPACK_VERSION_NUMBER(3,0,0)
# endif
# if !defined(MSGPACK_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS4) || defined(__MIPS_ISA4__))
# define MSGPACK_ARCH_MIPS MSGPACK_VERSION_NUMBER(4,0,0)
# endif
# if !defined(MSGPACK_ARCH_MIPS)
# define MSGPACK_ARCH_MIPS MSGPACK_VERSION_NUMBER_AVAILABLE
# endif
#endif
#if MSGPACK_ARCH_MIPS
# define MSGPACK_ARCH_MIPS_AVAILABLE
#endif
#define MSGPACK_ARCH_MIPS_NAME "MIPS"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_ARCH_MIPS,MSGPACK_ARCH_MIPS_NAME)

View File

@@ -1,64 +0,0 @@
/*
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_ARCHITECTURE_PARISC_H
#define MSGPACK_PREDEF_ARCHITECTURE_PARISC_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_ARCH_PARISC`]
[@http://en.wikipedia.org/wiki/PA-RISC_family HP/PA RISC] architecture.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__hppa__`] [__predef_detection__]]
[[`__hppa`] [__predef_detection__]]
[[`__HPPA__`] [__predef_detection__]]
[[`_PA_RISC1_0`] [1.0.0]]
[[`_PA_RISC1_1`] [1.1.0]]
[[`__HPPA11__`] [1.1.0]]
[[`__PA7100__`] [1.1.0]]
[[`_PA_RISC2_0`] [2.0.0]]
[[`__RISC2_0__`] [2.0.0]]
[[`__HPPA20__`] [2.0.0]]
[[`__PA8000__`] [2.0.0]]
]
*/
#define MSGPACK_ARCH_PARISC MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__hppa__) || defined(__hppa) || defined(__HPPA__)
# undef MSGPACK_ARCH_PARISC
# if !defined(MSGPACK_ARCH_PARISC) && (defined(_PA_RISC1_0))
# define MSGPACK_ARCH_PARISC MSGPACK_VERSION_NUMBER(1,0,0)
# endif
# if !defined(MSGPACK_ARCH_PARISC) && (defined(_PA_RISC1_1) || defined(__HPPA11__) || defined(__PA7100__))
# define MSGPACK_ARCH_PARISC MSGPACK_VERSION_NUMBER(1,1,0)
# endif
# if !defined(MSGPACK_ARCH_PARISC) && (defined(_PA_RISC2_0) || defined(__RISC2_0__) || defined(__HPPA20__) || defined(__PA8000__))
# define MSGPACK_ARCH_PARISC MSGPACK_VERSION_NUMBER(2,0,0)
# endif
# if !defined(MSGPACK_ARCH_PARISC)
# define MSGPACK_ARCH_PARISC MSGPACK_VERSION_NUMBER_AVAILABLE
# endif
#endif
#if MSGPACK_ARCH_PARISC
# define MSGPACK_ARCH_PARISC_AVAILABLE
#endif
#define MSGPACK_ARCH_PARISC_NAME "HP/PA RISC"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_ARCH_PARISC,MSGPACK_ARCH_PARISC_NAME)

View File

@@ -1,72 +0,0 @@
/*
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_ARCHITECTURE_PPC_H
#define MSGPACK_PREDEF_ARCHITECTURE_PPC_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_ARCH_PPC`]
[@http://en.wikipedia.org/wiki/PowerPC PowerPC] architecture.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__powerpc`] [__predef_detection__]]
[[`__powerpc__`] [__predef_detection__]]
[[`__POWERPC__`] [__predef_detection__]]
[[`__ppc__`] [__predef_detection__]]
[[`_M_PPC`] [__predef_detection__]]
[[`_ARCH_PPC`] [__predef_detection__]]
[[`__PPCGECKO__`] [__predef_detection__]]
[[`__PPCBROADWAY__`] [__predef_detection__]]
[[`_XENON`] [__predef_detection__]]
[[`__ppc601__`] [6.1.0]]
[[`_ARCH_601`] [6.1.0]]
[[`__ppc603__`] [6.3.0]]
[[`_ARCH_603`] [6.3.0]]
[[`__ppc604__`] [6.4.0]]
[[`__ppc604__`] [6.4.0]]
]
*/
#define MSGPACK_ARCH_PPC MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__powerpc) || defined(__powerpc__) || \
defined(__POWERPC__) || defined(__ppc__) || \
defined(_M_PPC) || defined(_ARCH_PPC) || \
defined(__PPCGECKO__) || defined(__PPCBROADWAY__) || \
defined(_XENON)
# undef MSGPACK_ARCH_PPC
# if !defined (MSGPACK_ARCH_PPC) && (defined(__ppc601__) || defined(_ARCH_601))
# define MSGPACK_ARCH_PPC MSGPACK_VERSION_NUMBER(6,1,0)
# endif
# if !defined (MSGPACK_ARCH_PPC) && (defined(__ppc603__) || defined(_ARCH_603))
# define MSGPACK_ARCH_PPC MSGPACK_VERSION_NUMBER(6,3,0)
# endif
# if !defined (MSGPACK_ARCH_PPC) && (defined(__ppc604__) || defined(__ppc604__))
# define MSGPACK_ARCH_PPC MSGPACK_VERSION_NUMBER(6,4,0)
# endif
# if !defined (MSGPACK_ARCH_PPC)
# define MSGPACK_ARCH_PPC MSGPACK_VERSION_NUMBER_AVAILABLE
# endif
#endif
#if MSGPACK_ARCH_PPC
# define MSGPACK_ARCH_PPC_AVAILABLE
#endif
#define MSGPACK_ARCH_PPC_NAME "PowerPC"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_ARCH_PPC,MSGPACK_ARCH_PPC_NAME)

View File

@@ -1,44 +0,0 @@
/*
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)

View File

@@ -1,42 +0,0 @@
/*
Copyright Rene Rivera 2011-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_ARCHITECTURE_PYRAMID_H
#define MSGPACK_PREDEF_ARCHITECTURE_PYRAMID_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_ARCH_PYRAMID`]
Pyramid 9810 architecture.
[table
[[__predef_symbol__] [__predef_version__]]
[[`pyr`] [__predef_detection__]]
]
*/
#define MSGPACK_ARCH_PYRAMID MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(pyr)
# undef MSGPACK_ARCH_PYRAMID
# define MSGPACK_ARCH_PYRAMID MSGPACK_VERSION_NUMBER_AVAILABLE
#endif
#if MSGPACK_ARCH_PYRAMID
# define MSGPACK_ARCH_PYRAMID_AVAILABLE
#endif
#define MSGPACK_ARCH_PYRAMID_NAME "Pyramid 9810"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_ARCH_PYRAMID,MSGPACK_ARCH_PYRAMID_NAME)

View File

@@ -1,56 +0,0 @@
/*
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_ARCHITECTURE_RS6K_H
#define MSGPACK_PREDEF_ARCHITECTURE_RS6K_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_ARCH_RS6000`]
[@http://en.wikipedia.org/wiki/RS/6000 RS/6000] architecture.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__THW_RS6000`] [__predef_detection__]]
[[`_IBMR2`] [__predef_detection__]]
[[`_POWER`] [__predef_detection__]]
[[`_ARCH_PWR`] [__predef_detection__]]
[[`_ARCH_PWR2`] [__predef_detection__]]
]
*/
#define MSGPACK_ARCH_RS6000 MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__THW_RS6000) || defined(_IBMR2) || \
defined(_POWER) || defined(_ARCH_PWR) || \
defined(_ARCH_PWR2)
# undef MSGPACK_ARCH_RS6000
# define MSGPACK_ARCH_RS6000 MSGPACK_VERSION_NUMBER_AVAILABLE
#endif
#if MSGPACK_ARCH_RS6000
# define MSGPACK_ARCH_RS6000_AVAILABLE
#endif
#define MSGPACK_ARCH_RS6000_NAME "RS/6000"
#define MSGPACK_ARCH_PWR MSGPACK_ARCH_RS6000
#if MSGPACK_ARCH_PWR
# define MSGPACK_ARCH_PWR_AVAILABLE
#endif
#define MSGPACK_ARCH_PWR_NAME MSGPACK_ARCH_RS6000_NAME
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_ARCH_RS6000,MSGPACK_ARCH_RS6000_NAME)

View File

@@ -1,54 +0,0 @@
/*
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_ARCHITECTURE_SPARC_H
#define MSGPACK_PREDEF_ARCHITECTURE_SPARC_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_ARCH_SPARC`]
[@http://en.wikipedia.org/wiki/SPARC SPARC] architecture.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__sparc__`] [__predef_detection__]]
[[`__sparc`] [__predef_detection__]]
[[`__sparcv9`] [9.0.0]]
[[`__sparcv8`] [8.0.0]]
]
*/
#define MSGPACK_ARCH_SPARC MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__sparc__) || defined(__sparc)
# undef MSGPACK_ARCH_SPARC
# if !defined(MSGPACK_ARCH_SPARC) && defined(__sparcv9)
# define MSGPACK_ARCH_SPARC MSGPACK_VERSION_NUMBER(9,0,0)
# endif
# if !defined(MSGPACK_ARCH_SPARC) && defined(__sparcv8)
# define MSGPACK_ARCH_SPARC MSGPACK_VERSION_NUMBER(8,0,0)
# endif
# if !defined(MSGPACK_ARCH_SPARC)
# define MSGPACK_ARCH_SPARC MSGPACK_VERSION_NUMBER_AVAILABLE
# endif
#endif
#if MSGPACK_ARCH_SPARC
# define MSGPACK_ARCH_SPARC_AVAILABLE
#endif
#define MSGPACK_ARCH_SPARC_NAME "SPARC"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_ARCH_SPARC,MSGPACK_ARCH_SPARC_NAME)

View File

@@ -1,67 +0,0 @@
/*
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_ARCHITECTURE_SUPERH_H
#define MSGPACK_PREDEF_ARCHITECTURE_SUPERH_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_ARCH_SH`]
[@http://en.wikipedia.org/wiki/SuperH SuperH] architecture:
If available versions \[1-5\] are specifically detected.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__sh__`] [__predef_detection__]]
[[`__SH5__`] [5.0.0]]
[[`__SH4__`] [4.0.0]]
[[`__sh3__`] [3.0.0]]
[[`__SH3__`] [3.0.0]]
[[`__sh2__`] [2.0.0]]
[[`__sh1__`] [1.0.0]]
]
*/
#define MSGPACK_ARCH_SH MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__sh__)
# undef MSGPACK_ARCH_SH
# if !defined(MSGPACK_ARCH_SH) && (defined(__SH5__))
# define MSGPACK_ARCH_SH MSGPACK_VERSION_NUMBER(5,0,0)
# endif
# if !defined(MSGPACK_ARCH_SH) && (defined(__SH4__))
# define MSGPACK_ARCH_SH MSGPACK_VERSION_NUMBER(4,0,0)
# endif
# if !defined(MSGPACK_ARCH_SH) && (defined(__sh3__) || defined(__SH3__))
# define MSGPACK_ARCH_SH MSGPACK_VERSION_NUMBER(3,0,0)
# endif
# if !defined(MSGPACK_ARCH_SH) && (defined(__sh2__))
# define MSGPACK_ARCH_SH MSGPACK_VERSION_NUMBER(2,0,0)
# endif
# if !defined(MSGPACK_ARCH_SH) && (defined(__sh1__))
# define MSGPACK_ARCH_SH MSGPACK_VERSION_NUMBER(1,0,0)
# endif
# if !defined(MSGPACK_ARCH_SH)
# define MSGPACK_ARCH_SH MSGPACK_VERSION_NUMBER_AVAILABLE
# endif
#endif
#if MSGPACK_ARCH_SH
# define MSGPACK_ARCH_SH_AVAILABLE
#endif
#define MSGPACK_ARCH_SH_NAME "SuperH"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_ARCH_SH,MSGPACK_ARCH_SH_NAME)

View File

@@ -1,43 +0,0 @@
/*
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_ARCHITECTURE_SYS370_H
#define MSGPACK_PREDEF_ARCHITECTURE_SYS370_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_ARCH_SYS370`]
[@http://en.wikipedia.org/wiki/System/370 System/370] architecture.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__370__`] [__predef_detection__]]
[[`__THW_370__`] [__predef_detection__]]
]
*/
#define MSGPACK_ARCH_SYS370 MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__370__) || defined(__THW_370__)
# undef MSGPACK_ARCH_SYS370
# define MSGPACK_ARCH_SYS370 MSGPACK_VERSION_NUMBER_AVAILABLE
#endif
#if MSGPACK_ARCH_SYS370
# define MSGPACK_ARCH_SYS370_AVAILABLE
#endif
#define MSGPACK_ARCH_SYS370_NAME "System/370"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_ARCH_SYS370,MSGPACK_ARCH_SYS370_NAME)

View File

@@ -1,43 +0,0 @@
/*
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_ARCHITECTURE_SYS390_H
#define MSGPACK_PREDEF_ARCHITECTURE_SYS390_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_ARCH_SYS390`]
[@http://en.wikipedia.org/wiki/System/390 System/390] architecture.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__s390__`] [__predef_detection__]]
[[`__s390x__`] [__predef_detection__]]
]
*/
#define MSGPACK_ARCH_SYS390 MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__s390__) || defined(__s390x__)
# undef MSGPACK_ARCH_SYS390
# define MSGPACK_ARCH_SYS390 MSGPACK_VERSION_NUMBER_AVAILABLE
#endif
#if MSGPACK_ARCH_SYS390
# define MSGPACK_ARCH_SYS390_AVAILABLE
#endif
#define MSGPACK_ARCH_SYS390_NAME "System/390"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_ARCH_SYS390,MSGPACK_ARCH_SYS390_NAME)

View File

@@ -1,38 +0,0 @@
/*
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)
*/
#include <msgpack/predef/architecture/x86/32.h>
#include <msgpack/predef/architecture/x86/64.h>
#ifndef MSGPACK_PREDEF_ARCHITECTURE_X86_H
#define MSGPACK_PREDEF_ARCHITECTURE_X86_H
/*`
[heading `MSGPACK_ARCH_X86`]
[@http://en.wikipedia.org/wiki/X86 Intel x86] architecture. This is
a category to indicate that either `MSGPACK_ARCH_X86_32` or
`MSGPACK_ARCH_X86_64` is detected.
*/
#define MSGPACK_ARCH_X86 MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if MSGPACK_ARCH_X86_32 || MSGPACK_ARCH_X86_64
# undef MSGPACK_ARCH_X86
# define MSGPACK_ARCH_X86 MSGPACK_VERSION_NUMBER_AVAILABLE
#endif
#if MSGPACK_ARCH_X86
# define MSGPACK_ARCH_X86_AVAILABLE
#endif
#define MSGPACK_ARCH_X86_NAME "Intel x86"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_ARCH_X86,MSGPACK_ARCH_X86_NAME)

View File

@@ -1,87 +0,0 @@
/*
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_ARCHITECTURE_X86_32_H
#define MSGPACK_PREDEF_ARCHITECTURE_X86_32_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_ARCH_X86_32`]
[@http://en.wikipedia.org/wiki/X86 Intel x86] architecture:
If available versions \[3-6\] are specifically detected.
[table
[[__predef_symbol__] [__predef_version__]]
[[`i386`] [__predef_detection__]]
[[`__i386__`] [__predef_detection__]]
[[`__i486__`] [__predef_detection__]]
[[`__i586__`] [__predef_detection__]]
[[`__i686__`] [__predef_detection__]]
[[`__i386`] [__predef_detection__]]
[[`_M_IX86`] [__predef_detection__]]
[[`_X86_`] [__predef_detection__]]
[[`__THW_INTEL__`] [__predef_detection__]]
[[`__I86__`] [__predef_detection__]]
[[`__INTEL__`] [__predef_detection__]]
[[`__I86__`] [V.0.0]]
[[`_M_IX86`] [V.0.0]]
[[`__i686__`] [6.0.0]]
[[`__i586__`] [5.0.0]]
[[`__i486__`] [4.0.0]]
[[`__i386__`] [3.0.0]]
]
*/
#define MSGPACK_ARCH_X86_32 MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(i386) || defined(__i386__) || \
defined(__i486__) || defined(__i586__) || \
defined(__i686__) || defined(__i386) || \
defined(_M_IX86) || defined(_X86_) || \
defined(__THW_INTEL__) || defined(__I86__) || \
defined(__INTEL__)
# undef MSGPACK_ARCH_X86_32
# if !defined(MSGPACK_ARCH_X86_32) && defined(__I86__)
# define MSGPACK_ARCH_X86_32 MSGPACK_VERSION_NUMBER(__I86__,0,0)
# endif
# if !defined(MSGPACK_ARCH_X86_32) && defined(_M_IX86)
# define MSGPACK_ARCH_X86_32 MSGPACK_PREDEF_MAKE_10_VV00(_M_IX86)
# endif
# if !defined(MSGPACK_ARCH_X86_32) && defined(__i686__)
# define MSGPACK_ARCH_X86_32 MSGPACK_VERSION_NUMBER(6,0,0)
# endif
# if !defined(MSGPACK_ARCH_X86_32) && defined(__i586__)
# define MSGPACK_ARCH_X86_32 MSGPACK_VERSION_NUMBER(5,0,0)
# endif
# if !defined(MSGPACK_ARCH_X86_32) && defined(__i486__)
# define MSGPACK_ARCH_X86_32 MSGPACK_VERSION_NUMBER(4,0,0)
# endif
# if !defined(MSGPACK_ARCH_X86_32) && defined(__i386__)
# define MSGPACK_ARCH_X86_32 MSGPACK_VERSION_NUMBER(3,0,0)
# endif
# if !defined(MSGPACK_ARCH_X86_32)
# define MSGPACK_ARCH_X86_32 MSGPACK_VERSION_NUMBER_AVAILABLE
# endif
#endif
#if MSGPACK_ARCH_X86_32
# define MSGPACK_ARCH_X86_32_AVAILABLE
#endif
#define MSGPACK_ARCH_X86_32_NAME "Intel x86-32"
#include <msgpack/predef/architecture/x86.h>
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_ARCH_X86_32,MSGPACK_ARCH_X86_32_NAME)

View File

@@ -1,50 +0,0 @@
/*
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_ARCHITECTURE_X86_64_H
#define MSGPACK_PREDEF_ARCHITECTURE_X86_64_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_ARCH_X86_64`]
[@http://en.wikipedia.org/wiki/Ia64 Intel IA-64] architecture.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__x86_64`] [__predef_detection__]]
[[`__x86_64__`] [__predef_detection__]]
[[`__amd64__`] [__predef_detection__]]
[[`__amd64`] [__predef_detection__]]
[[`_M_X64`] [__predef_detection__]]
]
*/
#define MSGPACK_ARCH_X86_64 MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__x86_64) || defined(__x86_64__) || \
defined(__amd64__) || defined(__amd64) || \
defined(_M_X64)
# undef MSGPACK_ARCH_X86_64
# define MSGPACK_ARCH_X86_64 MSGPACK_VERSION_NUMBER_AVAILABLE
#endif
#if MSGPACK_ARCH_X86_64
# define MSGPACK_ARCH_X86_64_AVAILABLE
#endif
#define MSGPACK_ARCH_X86_64_NAME "Intel x86-64"
#include <msgpack/predef/architecture/x86.h>
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_ARCH_X86_64,MSGPACK_ARCH_X86_64_NAME)

View File

@@ -1,42 +0,0 @@
/*
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_ARCHITECTURE_Z_H
#define MSGPACK_PREDEF_ARCHITECTURE_Z_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_ARCH_Z`]
[@http://en.wikipedia.org/wiki/Z/Architecture z/Architecture] architecture.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__SYSC_ZARCH__`] [__predef_detection__]]
]
*/
#define MSGPACK_ARCH_Z MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__SYSC_ZARCH__)
# undef MSGPACK_ARCH_Z
# define MSGPACK_ARCH_Z MSGPACK_VERSION_NUMBER_AVAILABLE
#endif
#if MSGPACK_ARCH_Z
# define MSGPACK_ARCH_Z_AVAILABLE
#endif
#define MSGPACK_ARCH_Z_NAME "z/Architecture"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_ARCH_Z,MSGPACK_ARCH_Z_NAME)

View File

@@ -1,44 +0,0 @@
/*
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)
*/
#if !defined(MSGPACK_PREDEF_COMPILER_H) || defined(MSGPACK_PREDEF_INTERNAL_GENERATE_TESTS)
#ifndef MSGPACK_PREDEF_COMPILER_H
#define MSGPACK_PREDEF_COMPILER_H
#endif
#include <msgpack/predef/compiler/borland.h>
#include <msgpack/predef/compiler/clang.h>
#include <msgpack/predef/compiler/comeau.h>
#include <msgpack/predef/compiler/compaq.h>
#include <msgpack/predef/compiler/diab.h>
#include <msgpack/predef/compiler/digitalmars.h>
#include <msgpack/predef/compiler/dignus.h>
#include <msgpack/predef/compiler/edg.h>
#include <msgpack/predef/compiler/ekopath.h>
#include <msgpack/predef/compiler/gcc_xml.h>
#include <msgpack/predef/compiler/gcc.h>
#include <msgpack/predef/compiler/greenhills.h>
#include <msgpack/predef/compiler/hp_acc.h>
#include <msgpack/predef/compiler/iar.h>
#include <msgpack/predef/compiler/ibm.h>
#include <msgpack/predef/compiler/intel.h>
#include <msgpack/predef/compiler/kai.h>
#include <msgpack/predef/compiler/llvm.h>
#include <msgpack/predef/compiler/metaware.h>
#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>
#include <msgpack/predef/compiler/sunpro.h>
#include <msgpack/predef/compiler/tendra.h>
#include <msgpack/predef/compiler/visualc.h>
#include <msgpack/predef/compiler/watcom.h>
#endif

View File

@@ -1,63 +0,0 @@
/*
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_COMPILER_BORLAND_H
#define MSGPACK_PREDEF_COMPILER_BORLAND_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_COMP_BORLAND`]
[@http://en.wikipedia.org/wiki/C_plus_plus_builder Borland C++] compiler.
Version number available as major, minor, and patch.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__BORLANDC__`] [__predef_detection__]]
[[`__CODEGEARC__`] [__predef_detection__]]
[[`__BORLANDC__`] [V.R.P]]
[[`__CODEGEARC__`] [V.R.P]]
]
*/
#define MSGPACK_COMP_BORLAND MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__BORLANDC__) || defined(__CODEGEARC__)
# if !defined(MSGPACK_COMP_BORLAND_DETECTION) && (defined(__CODEGEARC__))
# define MSGPACK_COMP_BORLAND_DETECTION MSGPACK_PREDEF_MAKE_0X_VVRP(__CODEGEARC__)
# endif
# if !defined(MSGPACK_COMP_BORLAND_DETECTION)
# define MSGPACK_COMP_BORLAND_DETECTION MSGPACK_PREDEF_MAKE_0X_VVRP(__BORLANDC__)
# endif
#endif
#ifdef MSGPACK_COMP_BORLAND_DETECTION
# define MSGPACK_COMP_BORLAND_AVAILABLE
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_BORLAND_EMULATED MSGPACK_COMP_BORLAND_DETECTION
# else
# undef MSGPACK_COMP_BORLAND
# define MSGPACK_COMP_BORLAND MSGPACK_COMP_BORLAND_DETECTION
# endif
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_BORLAND_NAME "Borland C++"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_BORLAND,MSGPACK_COMP_BORLAND_NAME)
#ifdef MSGPACK_COMP_BORLAND_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_BORLAND_EMULATED,MSGPACK_COMP_BORLAND_NAME)
#endif

View File

@@ -1,56 +0,0 @@
/*
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_COMPILER_CLANG_H
#define MSGPACK_PREDEF_COMPILER_CLANG_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_COMP_CLANG`]
[@http://en.wikipedia.org/wiki/Clang Clang] compiler.
Version number available as major, minor, and patch.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__clang__`] [__predef_detection__]]
[[`__clang_major__`, `__clang_minor__`, `__clang_patchlevel__`] [V.R.P]]
]
*/
#define MSGPACK_COMP_CLANG MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__clang__)
# define MSGPACK_COMP_CLANG_DETECTION MSGPACK_VERSION_NUMBER(__clang_major__,__clang_minor__,__clang_patchlevel__)
#endif
#ifdef MSGPACK_COMP_CLANG_DETECTION
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_CLANG_EMULATED MSGPACK_COMP_CLANG_DETECTION
# else
# undef MSGPACK_COMP_CLANG
# define MSGPACK_COMP_CLANG MSGPACK_COMP_CLANG_DETECTION
# endif
# define MSGPACK_COMP_CLANG_AVAILABLE
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_CLANG_NAME "Clang"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_CLANG,MSGPACK_COMP_CLANG_NAME)
#ifdef MSGPACK_COMP_CLANG_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_CLANG_EMULATED,MSGPACK_COMP_CLANG_NAME)
#endif

View File

@@ -1,61 +0,0 @@
/*
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_COMPILER_COMEAU_H
#define MSGPACK_PREDEF_COMPILER_COMEAU_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
#define MSGPACK_COMP_COMO MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
/*`
[heading `MSGPACK_COMP_COMO`]
[@http://en.wikipedia.org/wiki/Comeau_C/C%2B%2B Comeau C++] compiler.
Version number available as major, minor, and patch.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__COMO__`] [__predef_detection__]]
[[`__COMO_VERSION__`] [V.R.P]]
]
*/
#if defined(__COMO__)
# if !defined(MSGPACK_COMP_COMO_DETECTION) && defined(__COMO_VERSION__)
# define MSGPACK_COMP_COMO_DETECTION MSGPACK_PREDEF_MAKE_0X_VRP(__COMO_VERSION__)
# endif
# if !defined(MSGPACK_COMP_COMO_DETECTION)
# define MSGPACK_COMP_COMO_DETECTION MSGPACK_VERSION_NUMBER_AVAILABLE
# endif
#endif
#ifdef MSGPACK_COMP_COMO_DETECTION
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_COMO_EMULATED MSGPACK_COMP_COMO_DETECTION
# else
# undef MSGPACK_COMP_COMO
# define MSGPACK_COMP_COMO MSGPACK_COMP_COMO_DETECTION
# endif
# define MSGPACK_COMP_COMO_AVAILABLE
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_COMO_NAME "Comeau C++"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_COMO,MSGPACK_COMP_COMO_NAME)
#ifdef MSGPACK_COMP_COMO_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_COMO_EMULATED,MSGPACK_COMP_COMO_NAME)
#endif

View File

@@ -1,66 +0,0 @@
/*
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_COMPILER_COMPAQ_H
#define MSGPACK_PREDEF_COMPILER_COMPAQ_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_COMP_DEC`]
[@http://www.openvms.compaq.com/openvms/brochures/deccplus/ Compaq C/C++] compiler.
Version number available as major, minor, and patch.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__DECCXX`] [__predef_detection__]]
[[`__DECC`] [__predef_detection__]]
[[`__DECCXX_VER`] [V.R.P]]
[[`__DECC_VER`] [V.R.P]]
]
*/
#define MSGPACK_COMP_DEC MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__DECC) || defined(__DECCXX)
# if !defined(MSGPACK_COMP_DEC_DETECTION) && defined(__DECCXX_VER)
# define MSGPACK_COMP_DEC_DETECTION MSGPACK_PREDEF_MAKE_10_VVRR0PP00(__DECCXX_VER)
# endif
# if !defined(MSGPACK_COMP_DEC_DETECTION) && defined(__DECC_VER)
# define MSGPACK_COMP_DEC_DETECTION MSGPACK_PREDEF_MAKE_10_VVRR0PP00(__DECC_VER)
# endif
# if !defined(MSGPACK_COMP_DEC_DETECTION)
# define MSGPACK_COM_DEC_DETECTION MSGPACK_VERSION_NUMBER_AVAILABLE
# endif
#endif
#ifdef MSGPACK_COMP_DEC_DETECTION
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_DEC_EMULATED MSGPACK_COMP_DEC_DETECTION
# else
# undef MSGPACK_COMP_DEC
# define MSGPACK_COMP_DEC MSGPACK_COMP_DEC_DETECTION
# endif
# define MSGPACK_COMP_DEC_AVAILABLE
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_DEC_NAME "Compaq C/C++"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_DEC,MSGPACK_COMP_DEC_NAME)
#ifdef MSGPACK_COMP_DEC_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_DEC_EMULATED,MSGPACK_COMP_DEC_NAME)
#endif

View File

@@ -1,56 +0,0 @@
/*
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_COMPILER_DIAB_H
#define MSGPACK_PREDEF_COMPILER_DIAB_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_COMP_DIAB`]
[@http://www.windriver.com/products/development_suite/wind_river_compiler/ Diab C/C++] compiler.
Version number available as major, minor, and patch.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__DCC__`] [__predef_detection__]]
[[`__VERSION_NUMBER__`] [V.R.P]]
]
*/
#define MSGPACK_COMP_DIAB MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__DCC__)
# define MSGPACK_COMP_DIAB_DETECTION MSGPACK_PREDEF_MAKE_10_VRPP(__VERSION_NUMBER__)
#endif
#ifdef MSGPACK_COMP_DIAB_DETECTION
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_DIAB_EMULATED MSGPACK_COMP_DIAB_DETECTION
# else
# undef MSGPACK_COMP_DIAB
# define MSGPACK_COMP_DIAB MSGPACK_COMP_DIAB_DETECTION
# endif
# define MSGPACK_COMP_DIAB_AVAILABLE
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_DIAB_NAME "Diab C/C++"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_DIAB,MSGPACK_COMP_DIAB_NAME)
#ifdef MSGPACK_COMP_DIAB_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_DIAB_EMULATED,MSGPACK_COMP_DIAB_NAME)
#endif

View File

@@ -1,56 +0,0 @@
/*
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_COMPILER_DIGITALMARS_H
#define MSGPACK_PREDEF_COMPILER_DIGITALMARS_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_COMP_DMC`]
[@http://en.wikipedia.org/wiki/Digital_Mars Digital Mars] compiler.
Version number available as major, minor, and patch.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__DMC__`] [__predef_detection__]]
[[`__DMC__`] [V.R.P]]
]
*/
#define MSGPACK_COMP_DMC MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__DMC__)
# define MSGPACK_COMP_DMC_DETECTION MSGPACK_PREDEF_MAKE_0X_VRP(__DMC__)
#endif
#ifdef MSGPACK_COMP_DMC_DETECTION
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_DMC_EMULATED MSGPACK_COMP_DMC_DETECTION
# else
# undef MSGPACK_COMP_DMC
# define MSGPACK_COMP_DMC MSGPACK_COMP_DMC_DETECTION
# endif
# define MSGPACK_COMP_DMC_AVAILABLE
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_DMC_NAME "Digital Mars"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_DMC,MSGPACK_COMP_DMC_NAME)
#ifdef MSGPACK_COMP_DMC_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_DMC_EMULATED,MSGPACK_COMP_DMC_NAME)
#endif

View File

@@ -1,56 +0,0 @@
/*
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_COMPILER_DIGNUS_H
#define MSGPACK_PREDEF_COMPILER_DIGNUS_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_COMP_SYSC`]
[@http://www.dignus.com/dcxx/ Dignus Systems/C++] compiler.
Version number available as major, minor, and patch.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__SYSC__`] [__predef_detection__]]
[[`__SYSC_VER__`] [V.R.P]]
]
*/
#define MSGPACK_COMP_SYSC MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__SYSC__)
# define MSGPACK_COMP_SYSC_DETECTION MSGPACK_PREDEF_MAKE_10_VRRPP(__SYSC_VER__)
#endif
#ifdef MSGPACK_COMP_SYSC_DETECTION
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_SYSC_EMULATED MSGPACK_COMP_SYSC_DETECTION
# else
# undef MSGPACK_COMP_SYSC
# define MSGPACK_COMP_SYSC MSGPACK_COMP_SYSC_DETECTION
# endif
# define MSGPACK_COMP_SYSC_AVAILABLE
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_SYSC_NAME "Dignus Systems/C++"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_SYSC,MSGPACK_COMP_SYSC_NAME)
#ifdef MSGPACK_COMP_SYSC_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_SYSC_EMULATED,MSGPACK_COMP_SYSC_NAME)
#endif

View File

@@ -1,56 +0,0 @@
/*
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_COMPILER_EDG_H
#define MSGPACK_PREDEF_COMPILER_EDG_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_COMP_EDG`]
[@http://en.wikipedia.org/wiki/Edison_Design_Group EDG C++ Frontend] compiler.
Version number available as major, minor, and patch.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__EDG__`] [__predef_detection__]]
[[`__EDG_VERSION__`] [V.R.0]]
]
*/
#define MSGPACK_COMP_EDG MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__EDG__)
# define MSGPACK_COMP_EDG_DETECTION MSGPACK_PREDEF_MAKE_10_VRR(__EDG_VERSION__)
#endif
#ifdef MSGPACK_COMP_EDG_DETECTION
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_EDG_EMULATED MSGPACK_COMP_EDG_DETECTION
# else
# undef MSGPACK_COMP_EDG
# define MSGPACK_COMP_EDG MSGPACK_COMP_EDG_DETECTION
# endif
# define MSGPACK_COMP_EDG_AVAILABLE
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_EDG_NAME "EDG C++ Frontend"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_EDG,MSGPACK_COMP_EDG_NAME)
#ifdef MSGPACK_COMP_EDG_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_EDG_EMULATED,MSGPACK_COMP_EDG_NAME)
#endif

View File

@@ -1,57 +0,0 @@
/*
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_COMPILER_EKOPATH_H
#define MSGPACK_PREDEF_COMPILER_EKOPATH_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_COMP_PATH`]
[@http://en.wikipedia.org/wiki/PathScale EKOpath] compiler.
Version number available as major, minor, and patch.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__PATHCC__`] [__predef_detection__]]
[[`__PATHCC__`, `__PATHCC_MINOR__`, `__PATHCC_PATCHLEVEL__`] [V.R.P]]
]
*/
#define MSGPACK_COMP_PATH MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__PATHCC__)
# define MSGPACK_COMP_PATH_DETECTION \
MSGPACK_VERSION_NUMBER(__PATHCC__,__PATHCC_MINOR__,__PATHCC_PATCHLEVEL__)
#endif
#ifdef MSGPACK_COMP_PATH_DETECTION
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_PATH_EMULATED MSGPACK_COMP_PATH_DETECTION
# else
# undef MSGPACK_COMP_PATH
# define MSGPACK_COMP_PATH MSGPACK_COMP_PATH_DETECTION
# endif
# define MSGPACK_COMP_PATH_AVAILABLE
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_PATH_NAME "EKOpath"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_PATH,MSGPACK_COMP_PATH_NAME)
#ifdef MSGPACK_COMP_PATH_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_PATH_EMULATED,MSGPACK_COMP_PATH_NAME)
#endif

View File

@@ -1,68 +0,0 @@
/*
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_COMPILER_GCC_H
#define MSGPACK_PREDEF_COMPILER_GCC_H
/* Other compilers that emulate this one need to be detected first. */
#include <msgpack/predef/compiler/clang.h>
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_COMP_GNUC`]
[@http://en.wikipedia.org/wiki/GNU_Compiler_Collection Gnu GCC C/C++] compiler.
Version number available as major, minor, and patch (if available).
[table
[[__predef_symbol__] [__predef_version__]]
[[`__GNUC__`] [__predef_detection__]]
[[`__GNUC__`, `__GNUC_MINOR__`, `__GNUC_PATCHLEVEL__`] [V.R.P]]
[[`__GNUC__`, `__GNUC_MINOR__`] [V.R.0]]
]
*/
#define MSGPACK_COMP_GNUC MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__GNUC__)
# if !defined(MSGPACK_COMP_GNUC_DETECTION) && defined(__GNUC_PATCHLEVEL__)
# define MSGPACK_COMP_GNUC_DETECTION \
MSGPACK_VERSION_NUMBER(__GNUC__,__GNUC_MINOR__,__GNUC_PATCHLEVEL__)
# endif
# if !defined(MSGPACK_COMP_GNUC_DETECTION)
# define MSGPACK_COMP_GNUC_DETECTION \
MSGPACK_VERSION_NUMBER(__GNUC__,__GNUC_MINOR__,0)
# endif
#endif
#ifdef MSGPACK_COMP_GNUC_DETECTION
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_GNUC_EMULATED MSGPACK_COMP_GNUC_DETECTION
# else
# undef MSGPACK_COMP_GNUC
# define MSGPACK_COMP_GNUC MSGPACK_COMP_GNUC_DETECTION
# endif
# define MSGPACK_COMP_GNUC_AVAILABLE
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_GNUC_NAME "Gnu GCC C/C++"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_GNUC,MSGPACK_COMP_GNUC_NAME)
#ifdef MSGPACK_COMP_GNUC_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_GNUC_EMULATED,MSGPACK_COMP_GNUC_NAME)
#endif

View File

@@ -1,53 +0,0 @@
/*
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_COMPILER_GCC_XML_H
#define MSGPACK_PREDEF_COMPILER_GCC_XML_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_COMP_GCCXML`]
[@http://www.gccxml.org/ GCC XML] compiler.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__GCCXML__`] [__predef_detection__]]
]
*/
#define MSGPACK_COMP_GCCXML MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__GCCXML__)
# define MSGPACK_COMP_GCCXML_DETECTION MSGPACK_VERSION_NUMBER_AVAILABLE
#endif
#ifdef MSGPACK_COMP_GCCXML_DETECTION
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_GCCXML_EMULATED MSGPACK_COMP_GCCXML_DETECTION
# else
# undef MSGPACK_COMP_GCCXML
# define MSGPACK_COMP_GCCXML MSGPACK_COMP_GCCXML_DETECTION
# endif
# define MSGPACK_COMP_GCCXML_AVAILABLE
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_GCCXML_NAME "GCC XML"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_GCCXML,MSGPACK_COMP_GCCXML_NAME)
#ifdef MSGPACK_COMP_GCCXML_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_GCCXML_EMULATED,MSGPACK_COMP_GCCXML_NAME)
#endif

View File

@@ -1,66 +0,0 @@
/*
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_COMPILER_GREENHILLS_H
#define MSGPACK_PREDEF_COMPILER_GREENHILLS_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_COMP_GHS`]
[@http://en.wikipedia.org/wiki/Green_Hills_Software Green Hills C/C++] compiler.
Version number available as major, minor, and patch.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__ghs`] [__predef_detection__]]
[[`__ghs__`] [__predef_detection__]]
[[`__GHS_VERSION_NUMBER__`] [V.R.P]]
[[`__ghs`] [V.R.P]]
]
*/
#define MSGPACK_COMP_GHS MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__ghs) || defined(__ghs__)
# if !defined(MSGPACK_COMP_GHS_DETECTION) && defined(__GHS_VERSION_NUMBER__)
# define MSGPACK_COMP_GHS_DETECTION MSGPACK_PREDEF_MAKE_10_VRP(__GHS_VERSION_NUMBER__)
# endif
# if !defined(MSGPACK_COMP_GHS_DETECTION) && defined(__ghs)
# define MSGPACK_COMP_GHS_DETECTION MSGPACK_PREDEF_MAKE_10_VRP(__ghs)
# endif
# if !defined(MSGPACK_COMP_GHS_DETECTION)
# define MSGPACK_COMP_GHS_DETECTION MSGPACK_VERSION_NUMBER_AVAILABLE
# endif
#endif
#ifdef MSGPACK_COMP_GHS_DETECTION
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_GHS_EMULATED MSGPACK_COMP_GHS_DETECTION
# else
# undef MSGPACK_COMP_GHS
# define MSGPACK_COMP_GHS MSGPACK_COMP_GHS_DETECTION
# endif
# define MSGPACK_COMP_GHS_AVAILABLE
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_GHS_NAME "Green Hills C/C++"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_GHS,MSGPACK_COMP_GHS_NAME)
#ifdef MSGPACK_COMP_GHS_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_GHS_EMULATED,MSGPACK_COMP_GHS_NAME)
#endif

View File

@@ -1,61 +0,0 @@
/*
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_COMPILER_HP_ACC_H
#define MSGPACK_PREDEF_COMPILER_HP_ACC_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_COMP_HPACC`]
HP aC++ compiler.
Version number available as major, minor, and patch.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__HP_aCC`] [__predef_detection__]]
[[`__HP_aCC`] [V.R.P]]
]
*/
#define MSGPACK_COMP_HPACC MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__HP_aCC)
# if !defined(MSGPACK_COMP_HPACC_DETECTION) && (__HP_aCC > 1)
# define MSGPACK_COMP_HPACC_DETECTION MSGPACK_PREDEF_MAKE_10_VVRRPP(__HP_aCC)
# endif
# if !defined(MSGPACK_COMP_HPACC_DETECTION)
# define MSGPACK_COMP_HPACC_DETECTION MSGPACK_VERSION_NUMBER_AVAILABLE
# endif
#endif
#ifdef MSGPACK_COMP_HPACC_DETECTION
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_HPACC_EMULATED MSGPACK_COMP_HPACC_DETECTION
# else
# undef MSGPACK_COMP_HPACC
# define MSGPACK_COMP_HPACC MSGPACK_COMP_HPACC_DETECTION
# endif
# define MSGPACK_COMP_HPACC_AVAILABLE
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_HPACC_NAME "HP aC++"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_HPACC,MSGPACK_COMP_HPACC_NAME)
#ifdef MSGPACK_COMP_HPACC_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_HPACC_EMULATED,MSGPACK_COMP_HPACC_NAME)
#endif

View File

@@ -1,56 +0,0 @@
/*
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_COMPILER_IAR_H
#define MSGPACK_PREDEF_COMPILER_IAR_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_COMP_IAR`]
IAR C/C++ compiler.
Version number available as major, minor, and patch.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__IAR_SYSTEMS_ICC__`] [__predef_detection__]]
[[`__VER__`] [V.R.P]]
]
*/
#define MSGPACK_COMP_IAR MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__IAR_SYSTEMS_ICC__)
# define MSGPACK_COMP_IAR_DETECTION MSGPACK_PREDEF_MAKE_10_VVRR(__VER__)
#endif
#ifdef MSGPACK_COMP_IAR_DETECTION
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_IAR_EMULATED MSGPACK_COMP_IAR_DETECTION
# else
# undef MSGPACK_COMP_IAR
# define MSGPACK_COMP_IAR MSGPACK_COMP_IAR_DETECTION
# endif
# define MSGPACK_COMP_IAR_AVAILABLE
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_IAR_NAME "IAR C/C++"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_IAR,MSGPACK_COMP_IAR_NAME)
#ifdef MSGPACK_COMP_IAR_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_IAR_EMULATED,MSGPACK_COMP_IAR_NAME)
#endif

View File

@@ -1,72 +0,0 @@
/*
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_COMPILER_IBM_H
#define MSGPACK_PREDEF_COMPILER_IBM_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_COMP_IBM`]
[@http://en.wikipedia.org/wiki/VisualAge IBM XL C/C++] compiler.
Version number available as major, minor, and patch.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__IBMCPP__`] [__predef_detection__]]
[[`__xlC__`] [__predef_detection__]]
[[`__xlc__`] [__predef_detection__]]
[[`__COMPILER_VER__`] [V.R.P]]
[[`__xlC__`] [V.R.P]]
[[`__xlc__`] [V.R.P]]
[[`__IBMCPP__`] [V.R.P]]
]
*/
#define MSGPACK_COMP_IBM MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__IBMCPP__) || defined(__xlC__) || defined(__xlc__)
# if !defined(MSGPACK_COMP_IBM_DETECTION) && defined(__COMPILER_VER__)
# define MSGPACK_COMP_IBM_DETECTION MSGPACK_PREDEF_MAKE_0X_VRRPPPP(__COMPILER_VER__)
# endif
# if !defined(MSGPACK_COMP_IBM_DETECTION) && defined(__xlC__)
# define MSGPACK_COMP_IBM_DETECTION MSGPACK_PREDEF_MAKE_0X_VVRR(__xlC__)
# endif
# if !defined(MSGPACK_COMP_IBM_DETECTION) && defined(__xlc__)
# define MSGPACK_COMP_IBM_DETECTION MSGPACK_PREDEF_MAKE_0X_VVRR(__xlc__)
# endif
# if !defined(MSGPACK_COMP_IBM_DETECTION)
# define MSGPACK_COMP_IBM_DETECTION MSGPACK_PREDEF_MAKE_10_VRP(__IBMCPP__)
# endif
#endif
#ifdef MSGPACK_COMP_IBM_DETECTION
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_IBM_EMULATED MSGPACK_COMP_IBM_DETECTION
# else
# undef MSGPACK_COMP_IBM
# define MSGPACK_COMP_IBM MSGPACK_COMP_IBM_DETECTION
# endif
# define MSGPACK_COMP_IBM_AVAILABLE
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_IBM_NAME "IBM XL C/C++"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_IBM,MSGPACK_COMP_IBM_NAME)
#ifdef MSGPACK_COMP_IBM_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_IBM_EMULATED,MSGPACK_COMP_IBM_NAME)
#endif

View File

@@ -1,79 +0,0 @@
/*
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)
*/
#ifndef MSGPACK_PREDEF_COMPILER_INTEL_H
#define MSGPACK_PREDEF_COMPILER_INTEL_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_COMP_INTEL`]
[@http://en.wikipedia.org/wiki/Intel_C%2B%2B Intel C/C++] compiler.
Version number available as major, minor, and patch.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__INTEL_COMPILER`] [__predef_detection__]]
[[`__ICL`] [__predef_detection__]]
[[`__ICC`] [__predef_detection__]]
[[`__ECC`] [__predef_detection__]]
[[`__INTEL_COMPILER`] [V.R]]
[[`__INTEL_COMPILER` and `__INTEL_COMPILER_UPDATE`] [V.R.P]]
]
*/
#define MSGPACK_COMP_INTEL MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#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_VVRR(__INTEL_COMPILER)
# endif
# if !defined(MSGPACK_COMP_INTEL_DETECTION)
# define MSGPACK_COMP_INTEL_DETECTION MSGPACK_VERSION_NUMBER_AVAILABLE
# endif
#endif
#ifdef MSGPACK_COMP_INTEL_DETECTION
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_INTEL_EMULATED MSGPACK_COMP_INTEL_DETECTION
# else
# undef MSGPACK_COMP_INTEL
# define MSGPACK_COMP_INTEL MSGPACK_COMP_INTEL_DETECTION
# endif
# define MSGPACK_COMP_INTEL_AVAILABLE
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_INTEL_NAME "Intel C/C++"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_INTEL,MSGPACK_COMP_INTEL_NAME)
#ifdef MSGPACK_COMP_INTEL_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_INTEL_EMULATED,MSGPACK_COMP_INTEL_NAME)
#endif

View File

@@ -1,56 +0,0 @@
/*
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_COMPILER_KAI_H
#define MSGPACK_PREDEF_COMPILER_KAI_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_COMP_KCC`]
Kai C++ compiler.
Version number available as major, minor, and patch.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__KCC`] [__predef_detection__]]
[[`__KCC_VERSION`] [V.R.P]]
]
*/
#define MSGPACK_COMP_KCC MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__KCC)
# define MSGPACK_COMP_KCC_DETECTION MSGPACK_PREDEF_MAKE_0X_VRPP(__KCC_VERSION)
#endif
#ifdef MSGPACK_COMP_KCC_DETECTION
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_KCC_EMULATED MSGPACK_COMP_KCC_DETECTION
# else
# undef MSGPACK_COMP_KCC
# define MSGPACK_COMP_KCC MSGPACK_COMP_KCC_DETECTION
# endif
# define MSGPACK_COMP_KCC_AVAILABLE
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_KCC_NAME "Kai C++"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_KCC,MSGPACK_COMP_KCC_NAME)
#ifdef MSGPACK_COMP_KCC_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_KCC_EMULATED,MSGPACK_COMP_KCC_NAME)
#endif

View File

@@ -1,57 +0,0 @@
/*
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_COMPILER_LLVM_H
#define MSGPACK_PREDEF_COMPILER_LLVM_H
/* Other compilers that emulate this one need to be detected first. */
#include <msgpack/predef/compiler/clang.h>
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_COMP_LLVM`]
[@http://en.wikipedia.org/wiki/LLVM LLVM] compiler.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__llvm__`] [__predef_detection__]]
]
*/
#define MSGPACK_COMP_LLVM MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__llvm__)
# define MSGPACK_COMP_LLVM_DETECTION MSGPACK_VERSION_NUMBER_AVAILABLE
#endif
#ifdef MSGPACK_COMP_LLVM_DETECTION
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_LLVM_EMULATED MSGPACK_COMP_LLVM_DETECTION
# else
# undef MSGPACK_COMP_LLVM
# define MSGPACK_COMP_LLVM MSGPACK_COMP_LLVM_DETECTION
# endif
# define MSGPACK_COMP_LLVM_AVAILABLE
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_LLVM_NAME "LLVM"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_LLVM,MSGPACK_COMP_LLVM_NAME)
#ifdef MSGPACK_COMP_LLVM_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_LLVM_EMULATED,MSGPACK_COMP_LLVM_NAME)
#endif

View File

@@ -1,53 +0,0 @@
/*
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_COMPILER_METAWARE_H
#define MSGPACK_PREDEF_COMPILER_METAWARE_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_COMP_HIGHC`]
MetaWare High C/C++ compiler.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__HIGHC__`] [__predef_detection__]]
]
*/
#define MSGPACK_COMP_HIGHC MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__HIGHC__)
# define MSGPACK_COMP_HIGHC_DETECTION MSGPACK_VERSION_NUMBER_AVAILABLE
#endif
#ifdef MSGPACK_COMP_HIGHC_DETECTION
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_HIGHC_EMULATED MSGPACK_COMP_HIGHC_DETECTION
# else
# undef MSGPACK_COMP_HIGHC
# define MSGPACK_COMP_HIGHC MSGPACK_COMP_HIGHC_DETECTION
# endif
# define MSGPACK_COMP_HIGHC_AVAILABLE
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_HIGHC_NAME "MetaWare High C/C++"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_HIGHC,MSGPACK_COMP_HIGHC_NAME)
#ifdef MSGPACK_COMP_HIGHC_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_HIGHC_EMULATED,MSGPACK_COMP_HIGHC_NAME)
#endif

View File

@@ -1,77 +0,0 @@
/*
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_COMPILER_METROWERKS_H
#define MSGPACK_PREDEF_COMPILER_METROWERKS_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_COMP_MWERKS`]
[@http://en.wikipedia.org/wiki/CodeWarrior Metrowerks CodeWarrior] compiler.
Version number available as major, minor, and patch.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__MWERKS__`] [__predef_detection__]]
[[`__CWCC__`] [__predef_detection__]]
[[`__CWCC__`] [V.R.P]]
[[`__MWERKS__`] [V.R.P >= 4.2.0]]
[[`__MWERKS__`] [9.R.0]]
[[`__MWERKS__`] [8.R.0]]
]
*/
#define MSGPACK_COMP_MWERKS MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__MWERKS__) || defined(__CWCC__)
# if !defined(MSGPACK_COMP_MWERKS_DETECTION) && defined(__CWCC__)
# define MSGPACK_COMP_MWERKS_DETECTION MSGPACK_PREDEF_MAKE_0X_VRPP(__CWCC__)
# endif
# if !defined(MSGPACK_COMP_MWERKS_DETECTION) && (__MWERKS__ >= 0x4200)
# define MSGPACK_COMP_MWERKS_DETECTION MSGPACK_PREDEF_MAKE_0X_VRPP(__MWERKS__)
# endif
# if !defined(MSGPACK_COMP_MWERKS_DETECTION) && (__MWERKS__ >= 0x3204) // note the "skip": 04->9.3
# define MSGPACK_COMP_MWERKS_DETECTION MSGPACK_VERSION_NUMBER(9,(__MWERKS__)%100-1,0)
# endif
# if !defined(MSGPACK_COMP_MWERKS_DETECTION) && (__MWERKS__ >= 0x3200)
# define MSGPACK_COMP_MWERKS_DETECTION MSGPACK_VERSION_NUMBER(9,(__MWERKS__)%100,0)
# endif
# if !defined(MSGPACK_COMP_MWERKS_DETECTION) && (__MWERKS__ >= 0x3000)
# define MSGPACK_COMP_MWERKS_DETECTION MSGPACK_VERSION_NUMBER(8,(__MWERKS__)%100,0)
# endif
# if !defined(MSGPACK_COMP_MWERKS_DETECTION)
# define MSGPACK_COMP_MWERKS_DETECTION MSGPACK_VERSION_NUMBER_AVAILABLE
# endif
#endif
#ifdef MSGPACK_COMP_MWERKS_DETECTION
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_MWERKS_EMULATED MSGPACK_COMP_MWERKS_DETECTION
# else
# undef MSGPACK_COMP_MWERKS
# define MSGPACK_COMP_MWERKS MSGPACK_COMP_MWERKS_DETECTION
# endif
# define MSGPACK_COMP_MWERKS_AVAILABLE
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_MWERKS_NAME "Metrowerks CodeWarrior"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_MWERKS,MSGPACK_COMP_MWERKS_NAME)
#ifdef MSGPACK_COMP_MWERKS_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_MWERKS_EMULATED,MSGPACK_COMP_MWERKS_NAME)
#endif

View File

@@ -1,53 +0,0 @@
/*
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_COMPILER_MICROTEC_H
#define MSGPACK_PREDEF_COMPILER_MICROTEC_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_COMP_MRI`]
[@http://www.mentor.com/microtec/ Microtec C/C++] compiler.
[table
[[__predef_symbol__] [__predef_version__]]
[[`_MRI`] [__predef_detection__]]
]
*/
#define MSGPACK_COMP_MRI MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(_MRI)
# define MSGPACK_COMP_MRI_DETECTION MSGPACK_VERSION_NUMBER_AVAILABLE
#endif
#ifdef MSGPACK_COMP_MRI_DETECTION
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_MRI_EMULATED MSGPACK_COMP_MRI_DETECTION
# else
# undef MSGPACK_COMP_MRI
# define MSGPACK_COMP_MRI MSGPACK_COMP_MRI_DETECTION
# endif
# define MSGPACK_COMP_MRI_AVAILABLE
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_MRI_NAME "Microtec C/C++"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_MRI,MSGPACK_COMP_MRI_NAME)
#ifdef MSGPACK_COMP_MRI_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_MRI_EMULATED,MSGPACK_COMP_MRI_NAME)
#endif

View File

@@ -1,63 +0,0 @@
/*
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_COMPILER_MPW_H
#define MSGPACK_PREDEF_COMPILER_MPW_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_COMP_MPW`]
[@http://en.wikipedia.org/wiki/Macintosh_Programmer%27s_Workshop MPW C++] compiler.
Version number available as major, and minor.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__MRC__`] [__predef_detection__]]
[[`MPW_C`] [__predef_detection__]]
[[`MPW_CPLUS`] [__predef_detection__]]
[[`__MRC__`] [V.R.0]]
]
*/
#define MSGPACK_COMP_MPW MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__MRC__) || defined(MPW_C) || defined(MPW_CPLUS)
# if !defined(MSGPACK_COMP_MPW_DETECTION) && defined(__MRC__)
# define MSGPACK_COMP_MPW_DETECTION MSGPACK_PREDEF_MAKE_0X_VVRR(__MRC__)
# endif
# if !defined(MSGPACK_COMP_MPW_DETECTION)
# define MSGPACK_COMP_MPW_DETECTION MSGPACK_VERSION_NUMBER_AVAILABLE
# endif
#endif
#ifdef MSGPACK_COMP_MPW_DETECTION
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_MPW_EMULATED MSGPACK_COMP_MPW_DETECTION
# else
# undef MSGPACK_COMP_MPW
# define MSGPACK_COMP_MPW MSGPACK_COMP_MPW_DETECTION
# endif
# define MSGPACK_COMP_MPW_AVAILABLE
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_MPW_NAME "MPW C++"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_MPW,MSGPACK_COMP_MPW_NAME)
#ifdef MSGPACK_COMP_MPW_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_MPW_EMULATED,MSGPACK_COMP_MPW_NAME)
#endif

View File

@@ -1,60 +0,0 @@
/*
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

View File

@@ -1,56 +0,0 @@
/*
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_COMPILER_PALM_H
#define MSGPACK_PREDEF_COMPILER_PALM_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_COMP_PALM`]
Palm C/C++ compiler.
Version number available as major, minor, and patch.
[table
[[__predef_symbol__] [__predef_version__]]
[[`_PACC_VER`] [__predef_detection__]]
[[`_PACC_VER`] [V.R.P]]
]
*/
#define MSGPACK_COMP_PALM MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(_PACC_VER)
# define MSGPACK_COMP_PALM_DETECTION MSGPACK_PREDEF_MAKE_0X_VRRPP000(_PACC_VER)
#endif
#ifdef MSGPACK_COMP_PALM_DETECTION
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_PALM_EMULATED MSGPACK_COMP_PALM_DETECTION
# else
# undef MSGPACK_COMP_PALM
# define MSGPACK_COMP_PALM MSGPACK_COMP_PALM_DETECTION
# endif
# define MSGPACK_COMP_PALM_AVAILABLE
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_PALM_NAME "Palm C/C++"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_PALM,MSGPACK_COMP_PALM_NAME)
#ifdef MSGPACK_COMP_PALM_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_PALM_EMULATED,MSGPACK_COMP_PALM_NAME)
#endif

View File

@@ -1,60 +0,0 @@
/*
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_COMPILER_PGI_H
#define MSGPACK_PREDEF_COMPILER_PGI_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_COMP_PGI`]
[@http://en.wikipedia.org/wiki/The_Portland_Group Portland Group C/C++] compiler.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__PGI`] [__predef_detection__]]
[[`__PGIC__`, `__PGIC_MINOR__`, `__PGIC_PATCHLEVEL__`] [V.R.P]]
]
*/
#define MSGPACK_COMP_PGI MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__PGI)
# if !defined(MSGPACK_COMP_PGI_DETECTION) && (defined(__PGIC__) && defined(__PGIC_MINOR__) && defined(__PGIC_PATCHLEVEL__))
# define MSGPACK_COMP_PGI_DETECTION MSGPACK_VERSION_NUMBER(__PGIC__,__PGIC_MINOR__,__PGIC_PATCHLEVEL__)
# endif
# if !defined(MSGPACK_COMP_PGI_DETECTION)
# define MSGPACK_COMP_PGI_DETECTION MSGPACK_VERSION_NUMBER_AVAILABLE
# endif
#endif
#ifdef MSGPACK_COMP_PGI_DETECTION
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_PGI_EMULATED MSGPACK_COMP_PGI_DETECTION
# else
# undef MSGPACK_COMP_PGI
# define MSGPACK_COMP_PGI MSGPACK_COMP_PGI_DETECTION
# endif
# define MSGPACK_COMP_PGI_AVAILABLE
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_PGI_NAME "Portland Group C/C++"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_PGI,MSGPACK_COMP_PGI_NAME)
#ifdef MSGPACK_COMP_PGI_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_PGI_EMULATED,MSGPACK_COMP_PGI_NAME)
#endif

View File

@@ -1,66 +0,0 @@
/*
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_COMPILER_SGI_MIPSPRO_H
#define MSGPACK_PREDEF_COMPILER_SGI_MIPSPRO_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_COMP_SGI`]
[@http://en.wikipedia.org/wiki/MIPSpro SGI MIPSpro] compiler.
Version number available as major, minor, and patch.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__sgi`] [__predef_detection__]]
[[`sgi`] [__predef_detection__]]
[[`_SGI_COMPILER_VERSION`] [V.R.P]]
[[`_COMPILER_VERSION`] [V.R.P]]
]
*/
#define MSGPACK_COMP_SGI MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__sgi) || defined(sgi)
# if !defined(MSGPACK_COMP_SGI_DETECTION) && defined(_SGI_COMPILER_VERSION)
# define MSGPACK_COMP_SGI_DETECTION MSGPACK_PREDEF_MAKE_10_VRP(_SGI_COMPILER_VERSION)
# endif
# if !defined(MSGPACK_COMP_SGI_DETECTION) && defined(_COMPILER_VERSION)
# define MSGPACK_COMP_SGI_DETECTION MSGPACK_PREDEF_MAKE_10_VRP(_COMPILER_VERSION)
# endif
# if !defined(MSGPACK_COMP_SGI_DETECTION)
# define MSGPACK_COMP_SGI_DETECTION MSGPACK_VERSION_NUMBER_AVAILABLE
# endif
#endif
#ifdef MSGPACK_COMP_SGI_DETECTION
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_SGI_EMULATED MSGPACK_COMP_SGI_DETECTION
# else
# undef MSGPACK_COMP_SGI
# define MSGPACK_COMP_SGI MSGPACK_COMP_SGI_DETECTION
# endif
# define MSGPACK_COMP_SGI_AVAILABLE
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_SGI_NAME "SGI MIPSpro"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_SGI,MSGPACK_COMP_SGI_NAME)
#ifdef MSGPACK_COMP_SGI_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_SGI_EMULATED,MSGPACK_COMP_SGI_NAME)
#endif

View File

@@ -1,76 +0,0 @@
/*
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_COMPILER_SUNPRO_H
#define MSGPACK_PREDEF_COMPILER_SUNPRO_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_COMP_SUNPRO`]
[@http://en.wikipedia.org/wiki/Oracle_Solaris_Studio Oracle Solaris Studio] compiler.
Version number available as major, minor, and patch.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__SUNPRO_CC`] [__predef_detection__]]
[[`__SUNPRO_C`] [__predef_detection__]]
[[`__SUNPRO_CC`] [V.R.P]]
[[`__SUNPRO_C`] [V.R.P]]
[[`__SUNPRO_CC`] [VV.RR.P]]
[[`__SUNPRO_C`] [VV.RR.P]]
]
*/
#define MSGPACK_COMP_SUNPRO MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__SUNPRO_CC) || defined(__SUNPRO_C)
# if !defined(MSGPACK_COMP_SUNPRO_DETECTION) && defined(__SUNPRO_CC)
# if (__SUNPRO_CC < 0x5100)
# define MSGPACK_COMP_SUNPRO_DETECTION MSGPACK_PREDEF_MAKE_0X_VRP(__SUNPRO_CC)
# else
# define MSGPACK_COMP_SUNPRO_DETECTION MSGPACK_PREDEF_MAKE_0X_VVRRP(__SUNPRO_CC)
# endif
# endif
# if !defined(MSGPACK_COMP_SUNPRO_DETECTION) && defined(__SUNPRO_C)
# if (__SUNPRO_C < 0x5100)
# define MSGPACK_COMP_SUNPRO_DETECTION MSGPACK_PREDEF_MAKE_0X_VRP(__SUNPRO_C)
# else
# define MSGPACK_COMP_SUNPRO_DETECTION MSGPACK_PREDEF_MAKE_0X_VVRRP(__SUNPRO_C)
# endif
# endif
# if !defined(MSGPACK_COMP_SUNPRO_DETECTION)
# define MSGPACK_COMP_SUNPRO_DETECTION MSGPACK_VERSION_NUMBER_AVAILABLE
# endif
#endif
#ifdef MSGPACK_COMP_SUNPRO_DETECTION
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_SUNPRO_EMULATED MSGPACK_COMP_SUNPRO_DETECTION
# else
# undef MSGPACK_COMP_SUNPRO
# define MSGPACK_COMP_SUNPRO MSGPACK_COMP_SUNPRO_DETECTION
# endif
# define MSGPACK_COMP_SUNPRO_AVAILABLE
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_SUNPRO_NAME "Oracle Solaris Studio"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_SUNPRO,MSGPACK_COMP_SUNPRO_NAME)
#ifdef MSGPACK_COMP_SUNPRO_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_SUNPRO_EMULATED,MSGPACK_COMP_SUNPRO_NAME)
#endif

View File

@@ -1,53 +0,0 @@
/*
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_COMPILER_TENDRA_H
#define MSGPACK_PREDEF_COMPILER_TENDRA_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_COMP_TENDRA`]
[@http://en.wikipedia.org/wiki/TenDRA_Compiler TenDRA C/C++] compiler.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__TenDRA__`] [__predef_detection__]]
]
*/
#define MSGPACK_COMP_TENDRA MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__TenDRA__)
# define MSGPACK_COMP_TENDRA_DETECTION MSGPACK_VERSION_NUMBER_AVAILABLE
#endif
#ifdef MSGPACK_COMP_TENDRA_DETECTION
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_TENDRA_EMULATED MSGPACK_COMP_TENDRA_DETECTION
# else
# undef MSGPACK_COMP_TENDRA
# define MSGPACK_COMP_TENDRA MSGPACK_COMP_TENDRA_DETECTION
# endif
# define MSGPACK_COMP_TENDRA_AVAILABLE
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_TENDRA_NAME "TenDRA C/C++"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_TENDRA,MSGPACK_COMP_TENDRA_NAME)
#ifdef MSGPACK_COMP_TENDRA_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_TENDRA_EMULATED,MSGPACK_COMP_TENDRA_NAME)
#endif

View File

@@ -1,105 +0,0 @@
/*
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_COMPILER_VISUALC_H
#define MSGPACK_PREDEF_COMPILER_VISUALC_H
/* Other compilers that emulate this one need to be detected first. */
#include <msgpack/predef/compiler/clang.h>
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_COMP_MSVC`]
[@http://en.wikipedia.org/wiki/Visual_studio Microsoft Visual C/C++] compiler.
Version number available as major, minor, and patch.
[table
[[__predef_symbol__] [__predef_version__]]
[[`_MSC_VER`] [__predef_detection__]]
[[`_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
#if defined(_MSC_VER)
# if !defined (_MSC_FULL_VER)
# define MSGPACK_COMP_MSVC_BUILD 0
# else
/* how many digits does the build number have? */
# if _MSC_FULL_VER / 10000 == _MSC_VER
/* four digits */
# define MSGPACK_COMP_MSVC_BUILD (_MSC_FULL_VER % 10000)
# elif _MSC_FULL_VER / 100000 == _MSC_VER
/* five digits */
# define MSGPACK_COMP_MSVC_BUILD (_MSC_FULL_VER % 100000)
# else
# error "Cannot determine build number from _MSC_FULL_VER"
# endif
# endif
/*
VS2014 was skipped in the release sequence for MS. Which
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)
# 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,\
MSGPACK_COMP_MSVC_BUILD)
# else
# define MSGPACK_COMP_MSVC_DETECTION MSGPACK_VERSION_NUMBER(\
_MSC_VER/100-6,\
_MSC_VER%100,\
MSGPACK_COMP_MSVC_BUILD)
# endif
#endif
#ifdef MSGPACK_COMP_MSVC_DETECTION
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_MSVC_EMULATED MSGPACK_COMP_MSVC_DETECTION
# else
# undef MSGPACK_COMP_MSVC
# define MSGPACK_COMP_MSVC MSGPACK_COMP_MSVC_DETECTION
# endif
# define MSGPACK_COMP_MSVC_AVAILABLE
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_MSVC_NAME "Microsoft Visual C/C++"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_MSVC,MSGPACK_COMP_MSVC_NAME)
#ifdef MSGPACK_COMP_MSVC_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_MSVC_EMULATED,MSGPACK_COMP_MSVC_NAME)
#endif

View File

@@ -1,56 +0,0 @@
/*
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_COMPILER_WATCOM_H
#define MSGPACK_PREDEF_COMPILER_WATCOM_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_COMP_WATCOM`]
[@http://en.wikipedia.org/wiki/Watcom Watcom C++] compiler.
Version number available as major, and minor.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__WATCOMC__`] [__predef_detection__]]
[[`__WATCOMC__`] [V.R.P]]
]
*/
#define MSGPACK_COMP_WATCOM MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__WATCOMC__)
# define MSGPACK_COMP_WATCOM_DETECTION MSGPACK_PREDEF_MAKE_10_VVRR(__WATCOMC__)
#endif
#ifdef MSGPACK_COMP_WATCOM_DETECTION
# if defined(MSGPACK_PREDEF_DETAIL_COMP_DETECTED)
# define MSGPACK_COMP_WATCOM_EMULATED MSGPACK_COMP_WATCOM_DETECTION
# else
# undef MSGPACK_COMP_WATCOM
# define MSGPACK_COMP_WATCOM MSGPACK_COMP_WATCOM_DETECTION
# endif
# define MSGPACK_COMP_WATCOM_AVAILABLE
# include <msgpack/predef/detail/comp_detected.h>
#endif
#define MSGPACK_COMP_WATCOM_NAME "Watcom C++"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_WATCOM,MSGPACK_COMP_WATCOM_NAME)
#ifdef MSGPACK_COMP_WATCOM_EMULATED
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_COMP_WATCOM_EMULATED,MSGPACK_COMP_WATCOM_NAME)
#endif

View File

@@ -1,17 +0,0 @@
/*
Copyright Rene Rivera 2011-2012
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_DETAIL__CASSERT_H
#define MSGPACK_PREDEF_DETAIL__CASSERT_H
#if defined(__cplusplus)
#include <cassert>
#else
#include <assert.h>
#endif
#endif

View File

@@ -1,15 +0,0 @@
/*
Copyright Rene Rivera 2011-2012
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_DETAIL__EXCEPTION_H
#define MSGPACK_PREDEF_DETAIL__EXCEPTION_H
#if defined(__cplusplus)
#include <exception>
#endif
#endif

View File

@@ -1,10 +0,0 @@
/*
Copyright Rene Rivera 2014
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_DETAIL_COMP_DETECTED
#define MSGPACK_PREDEF_DETAIL_COMP_DETECTED 1
#endif

View File

@@ -1,26 +0,0 @@
/*
Copyright Rene Rivera 2013
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_DETAIL_ENDIAN_COMPAT_H
#define MSGPACK_PREDEF_DETAIL_ENDIAN_COMPAT_H
#include <msgpack/predef/other/endian.h>
#if MSGPACK_ENDIAN_BIG_BYTE
# define MSGPACK_BIG_ENDIAN
# define MSGPACK_BYTE_ORDER 4321
#endif
#if MSGPACK_ENDIAN_LITTLE_BYTE
# define MSGPACK_LITTLE_ENDIAN
# define MSGPACK_BYTE_ORDER 1234
#endif
#if MSGPACK_ENDIAN_LITTLE_WORD
# define MSGPACK_PDP_ENDIAN
# define MSGPACK_BYTE_ORDER 2134
#endif
#endif

View File

@@ -1,10 +0,0 @@
/*
Copyright Rene Rivera 2013
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_DETAIL_OS_DETECTED
#define MSGPACK_PREDEF_DETAIL_OS_DETECTED 1
#endif

View File

@@ -1,10 +0,0 @@
/*
Copyright Rene Rivera 2014
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_DETAIL_PLAT_DETECTED
#define MSGPACK_PREDEF_DETAIL_PLAT_DETECTED 1
#endif

View File

@@ -1,17 +0,0 @@
/*
Copyright Rene Rivera 2011-2012
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_DETAIL_TEST_H
#define MSGPACK_PREDEF_DETAIL_TEST_H
#if !defined(MSGPACK_PREDEF_INTERNAL_GENERATE_TESTS)
#define MSGPACK_PREDEF_DECLARE_TEST(x,s)
#endif
#endif

View File

@@ -1,71 +0,0 @@
/*
Copyright Rene Rivera 2011-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)
*/
#include <msgpack/predef.h>
#define MSGPACK_PREDEF_INTERNAL_GENERATE_TESTS
void * add_predef_entry(const char * name, const char * description, unsigned value)
#undef MSGPACK_PREDEF_DECLARE_TEST
#define MSGPACK_PREDEF_DECLARE_TEST(x,s) void predef_entry_##x() { add_predef_entry(#x, s, x) }
#include <msgpack/predef.h>
#undef MSGPACK_PREDEF_DECLARE_TEST
#define MSGPACK_PREDEF_DECLARE_TEST(x,s) predef_entry_##x()
void create_predef_entries()
{
#include <msgpack/predef.h>
}
#ifdef __cplusplus
#include <cstring>
#include <cstdio>
#include <cstdlib>
using namespace std
#else
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#endif
typedef struct predef_info
{
const char * name
const char * description
unsigned value
} predef_info
#ifdef __cplusplus
using namespace std
#endif
unsigned generated_predef_info_count = 0
predef_info* generated_predef_info = 0
void * add_predef_entry(const char * name, const char * description, unsigned value)
{
if (0 == generated_predef_info_count)
{
generated_predef_info_count = 1
generated_predef_info = (predef_info*)malloc(sizeof(predef_info))
}
else
{
generated_predef_info_count += 1
generated_predef_info = (predef_info*)realloc(generated_predef_info,
generated_predef_info_count*sizeof(predef_info))
}
generated_predef_info[generated_predef_info_count-1].name = name
generated_predef_info[generated_predef_info_count-1].description = description
generated_predef_info[generated_predef_info_count-1].value = value
return 0
}
int predef_info_compare(const void * a, const void * b)
{
const predef_info * i = (const predef_info *)a
const predef_info * j = (const predef_info *)b
return strcmp(i->name,j->name)
}

View File

@@ -1,16 +0,0 @@
/*
Copyright Charly Chevalier 2015
Copyright Joel Falcou 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)
*/
#if !defined(MSGPACK_PREDEF_HARDWARE_H) || defined(MSGPACK_PREDEF_INTERNAL_GENERATE_TESTS)
#ifndef MSGPACK_PREDEF_HARDWARE_H
#define MSGPACK_PREDEF_HARDWARE_H
#endif
#include <msgpack/predef/hardware/simd.h>
#endif

View File

@@ -1,119 +0,0 @@
/*
Copyright Charly Chevalier 2015
Copyright Joel Falcou 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)
*/
#include <msgpack/predef/hardware/simd/x86.h>
#include <msgpack/predef/hardware/simd/x86_amd.h>
#include <msgpack/predef/hardware/simd/arm.h>
#include <msgpack/predef/hardware/simd/ppc.h>
#ifndef MSGPACK_PREDEF_HARDWARE_SIMD_H
#define MSGPACK_PREDEF_HARDWARE_SIMD_H
#include <msgpack/predef/version_number.h>
/*`
[section Using the `MSGPACK_HW_SIMD_*` predefs]
[include ../doc/hardware_simd.qbk]
[endsect]
[/ --------------------------- ]
[section `MSGPACK_HW_SIMD_*`]
[heading `MSGPACK_HW_SIMD`]
The SIMD extension detected for a specific architectures.
Version number depends on the detected extension.
[table
[[__predef_symbol__] [__predef_version__]]
[[`MSGPACK_HW_SIMD_X86_AVAILABLE`] [__predef_detection__]]
[[`MSGPACK_HW_SIMD_X86_AMD_AVAILABLE`] [__predef_detection__]]
[[`MSGPACK_HW_SIMD_ARM_AVAILABLE`] [__predef_detection__]]
[[`MSGPACK_HW_SIMD_PPC_AVAILABLE`] [__predef_detection__]]
]
[include ../include/msgpack/predef/hardware/simd/x86.h]
[include ../include/msgpack/predef/hardware/simd/x86_amd.h]
[include ../include/msgpack/predef/hardware/simd/arm.h]
[include ../include/msgpack/predef/hardware/simd/ppc.h]
[endsect]
[/ --------------------------- ]
[section `MSGPACK_HW_SIMD_X86_*_VERSION`]
[include ../include/msgpack/predef/hardware/simd/x86/versions.h]
[endsect]
[section `MSGPACK_HW_SIMD_X86_AMD_*_VERSION`]
[include ../include/msgpack/predef/hardware/simd/x86_amd/versions.h]
[endsect]
[section `MSGPACK_HW_SIMD_ARM_*_VERSION`]
[include ../include/msgpack/predef/hardware/simd/arm/versions.h]
[endsect]
[section `MSGPACK_HW_SIMD_PPC_*_VERSION`]
[include ../include/msgpack/predef/hardware/simd/ppc/versions.h]
[endsect]
*/
// We check if SIMD extension of multiples architectures have been detected,
// if yes, then this is an error!
//
// NOTE: _X86_AMD implies _X86, so there is no need to check for it here!
//
#if defined(MSGPACK_HW_SIMD_ARM_AVAILABLE) && defined(MSGPACK_HW_SIMD_PPC_AVAILABLE) ||\
defined(MSGPACK_HW_SIMD_ARM_AVAILABLE) && defined(MSGPACK_HW_SIMD_X86_AVAILABLE) ||\
defined(MSGPACK_HW_SIMD_PPC_AVAILABLE) && defined(MSGPACK_HW_SIMD_X86_AVAILABLE)
# error "Multiple SIMD architectures detected, this cannot happen!"
#endif
#if defined(MSGPACK_HW_SIMD_X86_AVAILABLE) && defined(MSGPACK_HW_SIMD_X86_AMD_AVAILABLE)
// If both standard _X86 and _X86_AMD are available,
// then take the biggest version of the two!
# if MSGPACK_HW_SIMD_X86 >= MSGPACK_HW_SIMD_X86_AMD
# define MSGPACK_HW_SIMD MSGPACK_HW_SIMD_X86
# else
# define MSGPACK_HW_SIMD MSGPACK_HW_SIMD_X86_AMD
# endif
#endif
#if !defined(MSGPACK_HW_SIMD)
// At this point, only one of these two is defined
# if defined(MSGPACK_HW_SIMD_X86_AVAILABLE)
# define MSGPACK_HW_SIMD MSGPACK_HW_SIMD_X86
# endif
# if defined(MSGPACK_HW_SIMD_X86_AMD_AVAILABLE)
# define MSGPACK_HW_SIMD MSGPACK_HW_SIMD_X86_AMD
# endif
#endif
#if defined(MSGPACK_HW_SIMD_ARM_AVAILABLE)
# define MSGPACK_HW_SIMD MSGPACK_HW_SIMD_ARM
#endif
#if defined(MSGPACK_HW_SIMD_PPC_AVAILABLE)
# define MSGPACK_HW_SIMD MSGPACK_HW_SIMD_PPC
#endif
#if defined(MSGPACK_HW_SIMD)
# define MSGPACK_HW_SIMD_AVAILABLE
#else
# define MSGPACK_HW_SIMD MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#endif
#define MSGPACK_HW_SIMD_NAME "Hardware SIMD"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_HW_SIMD, MSGPACK_HW_SIMD_NAME)

View File

@@ -1,59 +0,0 @@
/*
Copyright Charly Chevalier 2015
Copyright Joel Falcou 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_HARDWARE_SIMD_ARM_H
#define MSGPACK_PREDEF_HARDWARE_SIMD_ARM_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/hardware/simd/arm/versions.h>
/*`
[heading `MSGPACK_HW_SIMD_ARM`]
The SIMD extension for ARM (*if detected*).
Version number depends on the most recent detected extension.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__ARM_NEON__`] [__predef_detection__]]
[[`__aarch64__`] [__predef_detection__]]
[[`_M_ARM`] [__predef_detection__]]
[[`_M_ARM64`] [__predef_detection__]]
]
[table
[[__predef_symbol__] [__predef_version__]]
[[`__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]]
]
*/
#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) || defined (_M_ARM64))
# define MSGPACK_HW_SIMD_ARM MSGPACK_HW_SIMD_ARM_NEON_VERSION
#endif
#if !defined(MSGPACK_HW_SIMD_ARM)
# define MSGPACK_HW_SIMD_ARM MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#else
# define MSGPACK_HW_SIMD_ARM_AVAILABLE
#endif
#define MSGPACK_HW_SIMD_ARM_NAME "ARM SIMD"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_HW_SIMD_ARM, MSGPACK_HW_SIMD_ARM_NAME)

View File

@@ -1,32 +0,0 @@
/*
Copyright Charly Chevalier 2015
Copyright Joel Falcou 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_HARDWARE_SIMD_ARM_VERSIONS_H
#define MSGPACK_PREDEF_HARDWARE_SIMD_ARM_VERSIONS_H
#include <msgpack/predef/version_number.h>
/*`
Those defines represent ARM SIMD extensions versions.
[note You *MUST* compare them with the predef `MSGPACK_HW_SIMD_ARM`.]
*/
// ---------------------------------
/*`
[heading `MSGPACK_HW_SIMD_ARM_NEON_VERSION`]
The [@https://en.wikipedia.org/wiki/ARM_architecture#Advanced_SIMD_.28NEON.29 NEON]
ARM extension version number.
Version number is: *1.0.0*.
*/
#define MSGPACK_HW_SIMD_ARM_NEON_VERSION MSGPACK_VERSION_NUMBER(1, 0, 0)
#endif

View File

@@ -1,69 +0,0 @@
/*
Copyright Charly Chevalier 2015
Copyright Joel Falcou 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_HARDWARE_SIMD_PPC_H
#define MSGPACK_PREDEF_HARDWARE_SIMD_PPC_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/hardware/simd/ppc/versions.h>
/*`
[heading `MSGPACK_HW_SIMD_PPC`]
The SIMD extension for PowerPC (*if detected*).
Version number depends on the most recent detected extension.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__VECTOR4DOUBLE__`] [__predef_detection__]]
[[`__ALTIVEC__`] [__predef_detection__]]
[[`__VEC__`] [__predef_detection__]]
[[`__VSX__`] [__predef_detection__]]
]
[table
[[__predef_symbol__] [__predef_version__]]
[[`__VECTOR4DOUBLE__`] [MSGPACK_HW_SIMD_PPC_QPX_VERSION]]
[[`__ALTIVEC__`] [MSGPACK_HW_SIMD_PPC_VMX_VERSION]]
[[`__VEC__`] [MSGPACK_HW_SIMD_PPC_VMX_VERSION]]
[[`__VSX__`] [MSGPACK_HW_SIMD_PPC_VSX_VERSION]]
]
*/
#define MSGPACK_HW_SIMD_PPC MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#undef MSGPACK_HW_SIMD_PPC
#if !defined(MSGPACK_HW_SIMD_PPC) && defined(__VECTOR4DOUBLE__)
# define MSGPACK_HW_SIMD_PPC MSGPACK_HW_SIMD_PPC_QPX_VERSION
#endif
#if !defined(MSGPACK_HW_SIMD_PPC) && defined(__VSX__)
# define MSGPACK_HW_SIMD_PPC MSGPACK_HW_SIMD_PPC_VSX_VERSION
#endif
#if !defined(MSGPACK_HW_SIMD_PPC) && (defined(__ALTIVEC__) || defined(__VEC__))
# define MSGPACK_HW_SIMD_PPC MSGPACK_HW_SIMD_PPC_VMX_VERSION
#endif
#if !defined(MSGPACK_HW_SIMD_PPC)
# define MSGPACK_HW_SIMD_PPC MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#else
# define MSGPACK_HW_SIMD_PPC_AVAILABLE
#endif
#define MSGPACK_HW_SIMD_PPC_NAME "PPC SIMD"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_HW_SIMD_PPC, MSGPACK_HW_SIMD_PPC_NAME)

View File

@@ -1,51 +0,0 @@
/*
Copyright Charly Chevalier 2015
Copyright Joel Falcou 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_HARDWARE_SIMD_PPC_VERSIONS_H
#define MSGPACK_PREDEF_HARDWARE_SIMD_PPC_VERSIONS_H
#include <msgpack/predef/version_number.h>
/*`
Those defines represent Power PC SIMD extensions versions.
[note You *MUST* compare them with the predef `MSGPACK_HW_SIMD_PPC`.]
*/
// ---------------------------------
/*`
[heading `MSGPACK_HW_SIMD_PPC_VMX_VERSION`]
The [@https://en.wikipedia.org/wiki/AltiVec#VMX128 VMX] powerpc extension
version number.
Version number is: *1.0.0*.
*/
#define MSGPACK_HW_SIMD_PPC_VMX_VERSION MSGPACK_VERSION_NUMBER(1, 0, 0)
/*`
[heading `MSGPACK_HW_SIMD_PPC_VSX_VERSION`]
The [@https://en.wikipedia.org/wiki/AltiVec#VSX VSX] powerpc extension version
number.
Version number is: *1.1.0*.
*/
#define MSGPACK_HW_SIMD_PPC_VSX_VERSION MSGPACK_VERSION_NUMBER(1, 1, 0)
/*`
[heading `MSGPACK_HW_SIMD_PPC_QPX_VERSION`]
The QPX powerpc extension version number.
Version number is: *2.0.0*.
*/
#define MSGPACK_HW_SIMD_PPC_QPX_VERSION MSGPACK_VERSION_NUMBER(2, 0, 0)
#endif

View File

@@ -1,123 +0,0 @@
/*
Copyright Charly Chevalier 2015
Copyright Joel Falcou 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_HARDWARE_SIMD_X86_H
#define MSGPACK_PREDEF_HARDWARE_SIMD_X86_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/hardware/simd/x86/versions.h>
/*`
[heading `MSGPACK_HW_SIMD_X86`]
The SIMD extension for x86 (*if detected*).
Version number depends on the most recent detected extension.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__SSE__`] [__predef_detection__]]
[[`_M_X64`] [__predef_detection__]]
[[`_M_IX86_FP >= 1`] [__predef_detection__]]
[[`__SSE2__`] [__predef_detection__]]
[[`_M_X64`] [__predef_detection__]]
[[`_M_IX86_FP >= 2`] [__predef_detection__]]
[[`__SSE3__`] [__predef_detection__]]
[[`__SSSE3__`] [__predef_detection__]]
[[`__SSE4_1__`] [__predef_detection__]]
[[`__SSE4_2__`] [__predef_detection__]]
[[`__AVX__`] [__predef_detection__]]
[[`__FMA__`] [__predef_detection__]]
[[`__AVX2__`] [__predef_detection__]]
]
[table
[[__predef_symbol__] [__predef_version__]]
[[`__SSE__`] [MSGPACK_HW_SIMD_X86_SSE_VERSION]]
[[`_M_X64`] [MSGPACK_HW_SIMD_X86_SSE_VERSION]]
[[`_M_IX86_FP >= 1`] [MSGPACK_HW_SIMD_X86_SSE_VERSION]]
[[`__SSE2__`] [MSGPACK_HW_SIMD_X86_SSE2_VERSION]]
[[`_M_X64`] [MSGPACK_HW_SIMD_X86_SSE2_VERSION]]
[[`_M_IX86_FP >= 2`] [MSGPACK_HW_SIMD_X86_SSE2_VERSION]]
[[`__SSE3__`] [MSGPACK_HW_SIMD_X86_SSE3_VERSION]]
[[`__SSSE3__`] [MSGPACK_HW_SIMD_X86_SSSE3_VERSION]]
[[`__SSE4_1__`] [MSGPACK_HW_SIMD_X86_SSE4_1_VERSION]]
[[`__SSE4_2__`] [MSGPACK_HW_SIMD_X86_SSE4_2_VERSION]]
[[`__AVX__`] [MSGPACK_HW_SIMD_X86_AVX_VERSION]]
[[`__FMA__`] [MSGPACK_HW_SIMD_X86_FMA3_VERSION]]
[[`__AVX2__`] [MSGPACK_HW_SIMD_X86_AVX2_VERSION]]
]
*/
#define MSGPACK_HW_SIMD_X86 MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#undef MSGPACK_HW_SIMD_X86
#if !defined(MSGPACK_HW_SIMD_X86) && defined(__MIC__)
# define MSGPACK_HW_SIMD_X86 MSGPACK_HW_SIMD_X86_MIC_VERSION
#endif
#if !defined(MSGPACK_HW_SIMD_X86) && defined(__AVX2__)
# define MSGPACK_HW_SIMD_X86 MSGPACK_HW_SIMD_X86_AVX2_VERSION
#endif
#if !defined(MSGPACK_HW_SIMD_X86) && defined(__AVX__)
# define MSGPACK_HW_SIMD_X86 MSGPACK_HW_SIMD_X86_AVX_VERSION
#endif
#if !defined(MSGPACK_HW_SIMD_X86) && defined(__FMA__)
# define MSGPACK_HW_SIMD_X86 MSGPACK_HW_SIMD_X86_FMA_VERSION
#endif
#if !defined(MSGPACK_HW_SIMD_X86) && defined(__SSE4_2__)
# define MSGPACK_HW_SIMD_X86 MSGPACK_HW_SIMD_X86_SSE4_2_VERSION
#endif
#if !defined(MSGPACK_HW_SIMD_X86) && defined(__SSE4_1__)
# define MSGPACK_HW_SIMD_X86 MSGPACK_HW_SIMD_X86_SSE4_1_VERSION
#endif
#if !defined(MSGPACK_HW_SIMD_X86) && defined(__SSSE3__)
# define MSGPACK_HW_SIMD_X86 MSGPACK_HW_SIMD_X86_SSSE3_VERSION
#endif
#if !defined(MSGPACK_HW_SIMD_X86) && defined(__SSE3__)
# define MSGPACK_HW_SIMD_X86 MSGPACK_HW_SIMD_X86_SSE3_VERSION
#endif
#if !defined(MSGPACK_HW_SIMD_X86) && (defined(__SSE2__) || defined(_M_X64) || (defined(_M_IX86_FP) && _M_IX86_FP >= 2))
# define MSGPACK_HW_SIMD_X86 MSGPACK_HW_SIMD_X86_SSE2_VERSION
#endif
#if !defined(MSGPACK_HW_SIMD_X86) && (defined(__SSE__) || defined(_M_X64) || (defined(_M_IX86_FP) && _M_IX86_FP >= 1))
# define MSGPACK_HW_SIMD_X86 MSGPACK_HW_SIMD_X86_SSE_VERSION
#endif
#if !defined(MSGPACK_HW_SIMD_X86) && defined(__MMX__)
# define MSGPACK_HW_SIMD_X86 MSGPACK_HW_SIMD_X86_MMX_VERSION
#endif
#if !defined(MSGPACK_HW_SIMD_X86)
# define MSGPACK_HW_SIMD_X86 MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#else
# define MSGPACK_HW_SIMD_X86_AVAILABLE
#endif
#define MSGPACK_HW_SIMD_X86_NAME "x86 SIMD"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_HW_SIMD_X86, MSGPACK_HW_SIMD_X86_NAME)

View File

@@ -1,129 +0,0 @@
/*
Copyright Charly Chevalier 2015
Copyright Joel Falcou 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_HARDWARE_SIMD_X86_VERSIONS_H
#define MSGPACK_PREDEF_HARDWARE_SIMD_X86_VERSIONS_H
#include <msgpack/predef/version_number.h>
/*`
Those defines represent x86 SIMD extensions versions.
[note You *MUST* compare them with the predef `MSGPACK_HW_SIMD_X86`.]
*/
// ---------------------------------
/*`
[heading `MSGPACK_HW_SIMD_X86_MMX_VERSION`]
The [@https://en.wikipedia.org/wiki/MMX_(instruction_set) MMX] x86 extension
version number.
Version number is: *0.99.0*.
*/
#define MSGPACK_HW_SIMD_X86_MMX_VERSION MSGPACK_VERSION_NUMBER(0, 99, 0)
/*`
[heading `MSGPACK_HW_SIMD_X86_SSE_VERSION`]
The [@https://en.wikipedia.org/wiki/Streaming_SIMD_Extensions SSE] x86 extension
version number.
Version number is: *1.0.0*.
*/
#define MSGPACK_HW_SIMD_X86_SSE_VERSION MSGPACK_VERSION_NUMBER(1, 0, 0)
/*`
[heading `MSGPACK_HW_SIMD_X86_SSE2_VERSION`]
The [@https://en.wikipedia.org/wiki/SSE2 SSE2] x86 extension version number.
Version number is: *2.0.0*.
*/
#define MSGPACK_HW_SIMD_X86_SSE2_VERSION MSGPACK_VERSION_NUMBER(2, 0, 0)
/*`
[heading `MSGPACK_HW_SIMD_X86_SSE3_VERSION`]
The [@https://en.wikipedia.org/wiki/SSE3 SSE3] x86 extension version number.
Version number is: *3.0.0*.
*/
#define MSGPACK_HW_SIMD_X86_SSE3_VERSION MSGPACK_VERSION_NUMBER(3, 0, 0)
/*`
[heading `MSGPACK_HW_SIMD_X86_SSSE3_VERSION`]
The [@https://en.wikipedia.org/wiki/SSSE3 SSSE3] x86 extension version number.
Version number is: *3.1.0*.
*/
#define MSGPACK_HW_SIMD_X86_SSSE3_VERSION MSGPACK_VERSION_NUMBER(3, 1, 0)
/*`
[heading `MSGPACK_HW_SIMD_X86_SSE4_1_VERSION`]
The [@https://en.wikipedia.org/wiki/SSE4#SSE4.1 SSE4_1] x86 extension version
number.
Version number is: *4.1.0*.
*/
#define MSGPACK_HW_SIMD_X86_SSE4_1_VERSION MSGPACK_VERSION_NUMBER(4, 1, 0)
/*`
[heading `MSGPACK_HW_SIMD_X86_SSE4_2_VERSION`]
The [@https://en.wikipedia.org/wiki/SSE4##SSE4.2 SSE4_2] x86 extension version
number.
Version number is: *4.2.0*.
*/
#define MSGPACK_HW_SIMD_X86_SSE4_2_VERSION MSGPACK_VERSION_NUMBER(4, 2, 0)
/*`
[heading `MSGPACK_HW_SIMD_X86_AVX_VERSION`]
The [@https://en.wikipedia.org/wiki/Advanced_Vector_Extensions AVX] x86
extension version number.
Version number is: *5.0.0*.
*/
#define MSGPACK_HW_SIMD_X86_AVX_VERSION MSGPACK_VERSION_NUMBER(5, 0, 0)
/*`
[heading `MSGPACK_HW_SIMD_X86_FMA3_VERSION`]
The [@https://en.wikipedia.org/wiki/FMA_instruction_set FMA3] x86 extension
version number.
Version number is: *5.2.0*.
*/
#define MSGPACK_HW_SIMD_X86_FMA3_VERSION MSGPACK_VERSION_NUMBER(5, 2, 0)
/*`
[heading `MSGPACK_HW_SIMD_X86_AVX2_VERSION`]
The [@https://en.wikipedia.org/wiki/Advanced_Vector_Extensions#Advanced_Vector_Extensions_2 AVX2]
x86 extension version number.
Version number is: *5.3.0*.
*/
#define MSGPACK_HW_SIMD_X86_AVX2_VERSION MSGPACK_VERSION_NUMBER(5, 3, 0)
/*`
[heading `MSGPACK_HW_SIMD_X86_MIC_VERSION`]
The [@https://en.wikipedia.org/wiki/Xeon_Phi MIC] (Xeon Phi) x86 extension
version number.
Version number is: *9.0.0*.
*/
#define MSGPACK_HW_SIMD_X86_MIC_VERSION MSGPACK_VERSION_NUMBER(9, 0, 0)
#endif

View File

@@ -1,87 +0,0 @@
/*
Copyright Charly Chevalier 2015
Copyright Joel Falcou 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_HARDWARE_SIMD_X86_AMD_H
#define MSGPACK_PREDEF_HARDWARE_SIMD_X86_AMD_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/hardware/simd/x86_amd/versions.h>
/*`
[heading `MSGPACK_HW_SIMD_X86_AMD`]
The SIMD extension for x86 (AMD) (*if detected*).
Version number depends on the most recent detected extension.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__SSE4A__`] [__predef_detection__]]
[[`__FMA4__`] [__predef_detection__]]
[[`__XOP__`] [__predef_detection__]]
[[`MSGPACK_HW_SIMD_X86`] [__predef_detection__]]
]
[table
[[__predef_symbol__] [__predef_version__]]
[[`__SSE4A__`] [MSGPACK_HW_SIMD_X86_SSE4A_VERSION]]
[[`__FMA4__`] [MSGPACK_HW_SIMD_X86_FMA4_VERSION]]
[[`__XOP__`] [MSGPACK_HW_SIMD_X86_XOP_VERSION]]
[[`MSGPACK_HW_SIMD_X86`] [MSGPACK_HW_SIMD_X86]]
]
[note This predef includes every other x86 SIMD extensions and also has other
more specific extensions (FMA4, XOP, SSE4a). You should use this predef
instead of `MSGPACK_HW_SIMD_X86` to test if those specific extensions have
been detected.]
*/
#define MSGPACK_HW_SIMD_X86_AMD MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
// AMD CPUs also use x86 architecture. We first try to detect if any AMD
// specific extension are detected, if yes, then try to detect more recent x86
// common extensions.
#undef MSGPACK_HW_SIMD_X86_AMD
#if !defined(MSGPACK_HW_SIMD_X86_AMD) && defined(__XOP__)
# define MSGPACK_HW_SIMD_X86_AMD MSGPACK_HW_SIMD_X86_AMD_XOP_VERSION
#endif
#if !defined(MSGPACK_HW_SIMD_X86_AMD) && defined(__FMA4__)
# define MSGPACK_HW_SIMD_X86_AMD MSGPACK_HW_SIMD_X86_AMD_FMA4_VERSION
#endif
#if !defined(MSGPACK_HW_SIMD_X86_AMD) && defined(__SSE4A__)
# define MSGPACK_HW_SIMD_X86_AMD MSGPACK_HW_SIMD_X86_AMD_SSE4A_VERSION
#endif
#if !defined(MSGPACK_HW_SIMD_X86_AMD)
# define MSGPACK_HW_SIMD_X86_AMD MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#else
// At this point, we know that we have an AMD CPU, we do need to check for
// other x86 extensions to determine the final version number.
# include <msgpack/predef/hardware/simd/x86.h>
# if MSGPACK_HW_SIMD_X86 > MSGPACK_HW_SIMD_X86_AMD
# undef MSGPACK_HW_SIMD_X86_AMD
# define MSGPACK_HW_SIMD_X86_AMD MSGPACK_HW_SIMD_X86
# endif
# define MSGPACK_HW_SIMD_X86_AMD_AVAILABLE
#endif
#define MSGPACK_HW_SIMD_X86_AMD_NAME "x86 (AMD) SIMD"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_HW_SIMD_X86_AMD, MSGPACK_HW_SIMD_X86_AMD_NAME)

View File

@@ -1,51 +0,0 @@
/*
Copyright Charly Chevalier 2015
Copyright Joel Falcou 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_HARDWARE_SIMD_X86_AMD_VERSIONS_H
#define MSGPACK_PREDEF_HARDWARE_SIMD_X86_AMD_VERSIONS_H
#include <msgpack/predef/version_number.h>
/*`
Those defines represent x86 (AMD specific) SIMD extensions versions.
[note You *MUST* compare them with the predef `MSGPACK_HW_SIMD_X86_AMD`.]
*/
// ---------------------------------
/*`
[heading `MSGPACK_HW_SIMD_X86_AMD_SSE4A_VERSION`]
[@https://en.wikipedia.org/wiki/SSE4##SSE4A SSE4A] x86 extension (AMD specific).
Version number is: *4.0.0*.
*/
#define MSGPACK_HW_SIMD_X86_AMD_SSE4A_VERSION MSGPACK_VERSION_NUMBER(4, 0, 0)
/*`
[heading `MSGPACK_HW_SIMD_X86_AMD_FMA4_VERSION`]
[@https://en.wikipedia.org/wiki/FMA_instruction_set#FMA4_instruction_set FMA4] x86 extension (AMD specific).
Version number is: *5.1.0*.
*/
#define MSGPACK_HW_SIMD_X86_AMD_FMA4_VERSION MSGPACK_VERSION_NUMBER(5, 1, 0)
/*`
[heading `MSGPACK_HW_SIMD_X86_AMD_XOP_VERSION`]
[@https://en.wikipedia.org/wiki/XOP_instruction_set XOP] x86 extension (AMD specific).
Version number is: *5.1.1*.
*/
#define MSGPACK_HW_SIMD_X86_AMD_XOP_VERSION MSGPACK_VERSION_NUMBER(5, 1, 1)
#endif

View File

@@ -1,18 +0,0 @@
/*
Copyright Rene Rivera 2011-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)
*/
#if !defined(MSGPACK_PREDEF_LANGUAGE_H) || defined(MSGPACK_PREDEF_INTERNAL_GENERATE_TESTS)
#ifndef MSGPACK_PREDEF_LANGUAGE_H
#define MSGPACK_PREDEF_LANGUAGE_H
#endif
#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

View File

@@ -1,52 +0,0 @@
/*
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)

View File

@@ -1,42 +0,0 @@
/*
Copyright Rene Rivera 2011-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_LANGUAGE_OBJC_H
#define MSGPACK_PREDEF_LANGUAGE_OBJC_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_LANG_OBJC`]
[@http://en.wikipedia.org/wiki/Objective-C Objective-C] language.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__OBJC__`] [__predef_detection__]]
]
*/
#define MSGPACK_LANG_OBJC MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__OBJC__)
# undef MSGPACK_LANG_OBJC
# define MSGPACK_LANG_OBJC MSGPACK_VERSION_NUMBER_AVAILABLE
#endif
#if MSGPACK_LANG_OBJC
# define MSGPACK_LANG_OBJC_AVAILABLE
#endif
#define MSGPACK_LANG_OBJC_NAME "Objective-C"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_LANG_OBJC,MSGPACK_LANG_OBJC_NAME)

View File

@@ -1,53 +0,0 @@
/*
Copyright Rene Rivera 2011-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_LANGUAGE_STDC_H
#define MSGPACK_PREDEF_LANGUAGE_STDC_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_LANG_STDC`]
[@http://en.wikipedia.org/wiki/C_(programming_language) Standard C] language.
If available, the year of the standard is detected as YYYY.MM.1 from the Epoc date.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__STDC__`] [__predef_detection__]]
[[`__STDC_VERSION__`] [V.R.P]]
]
*/
#define MSGPACK_LANG_STDC MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__STDC__)
# undef MSGPACK_LANG_STDC
# if defined(__STDC_VERSION__)
# if (__STDC_VERSION__ > 100)
# define MSGPACK_LANG_STDC MSGPACK_PREDEF_MAKE_YYYYMM(__STDC_VERSION__)
# else
# define MSGPACK_LANG_STDC MSGPACK_VERSION_NUMBER_AVAILABLE
# endif
# else
# define MSGPACK_LANG_STDC MSGPACK_VERSION_NUMBER_AVAILABLE
# endif
#endif
#if MSGPACK_LANG_STDC
# define MSGPACK_LANG_STDC_AVAILABLE
#endif
#define MSGPACK_LANG_STDC_NAME "Standard C"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_LANG_STDC,MSGPACK_LANG_STDC_NAME)

View File

@@ -1,121 +0,0 @@
/*
Copyright Rene Rivera 2011-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_LANGUAGE_STDCPP_H
#define MSGPACK_PREDEF_LANGUAGE_STDCPP_H
#include <msgpack/predef/version_number.h>
#include <msgpack/predef/make.h>
/*`
[heading `MSGPACK_LANG_STDCPP`]
[@http://en.wikipedia.org/wiki/C%2B%2B Standard C++] language.
If available, the year of the standard is detected as YYYY.MM.1 from the Epoc date.
Because of the way the C++ standardization process works the
defined version year will not be the commonly known year of the standard.
Specifically the defined versions are:
[table Detected Version Number vs. C++ Standard Year
[[Detected Version Number] [Standard Year] [C++ Standard]]
[[27.11.1] [1998] [ISO/IEC 14882:1998]]
[[41.12.1] [2011] [ISO/IEC 14882:2011]]
]
[table
[[__predef_symbol__] [__predef_version__]]
[[`__cplusplus`] [__predef_detection__]]
[[`__cplusplus`] [YYYY.MM.1]]
]
*/
#define MSGPACK_LANG_STDCPP MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__cplusplus)
# undef MSGPACK_LANG_STDCPP
# if (__cplusplus > 100)
# define MSGPACK_LANG_STDCPP MSGPACK_PREDEF_MAKE_YYYYMM(__cplusplus)
# else
# define MSGPACK_LANG_STDCPP MSGPACK_VERSION_NUMBER_AVAILABLE
# endif
#endif
#if MSGPACK_LANG_STDCPP
# define MSGPACK_LANG_STDCPP_AVAILABLE
#endif
#define MSGPACK_LANG_STDCPP_NAME "Standard C++"
/*`
[heading `MSGPACK_LANG_STDCPPCLI`]
[@http://en.wikipedia.org/wiki/C%2B%2B/CLI Standard C++/CLI] language.
If available, the year of the standard is detected as YYYY.MM.1 from the Epoc date.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__cplusplus_cli`] [__predef_detection__]]
[[`__cplusplus_cli`] [YYYY.MM.1]]
]
*/
#define MSGPACK_LANG_STDCPPCLI MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__cplusplus_cli)
# undef MSGPACK_LANG_STDCPPCLI
# if (__cplusplus_cli > 100)
# define MSGPACK_LANG_STDCPPCLI MSGPACK_PREDEF_MAKE_YYYYMM(__cplusplus_cli)
# else
# define MSGPACK_LANG_STDCPPCLI MSGPACK_VERSION_NUMBER_AVAILABLE
# endif
#endif
#if MSGPACK_LANG_STDCPPCLI
# define MSGPACK_LANG_STDCPPCLI_AVAILABLE
#endif
#define MSGPACK_LANG_STDCPPCLI_NAME "Standard C++/CLI"
/*`
[heading `MSGPACK_LANG_STDECPP`]
[@http://en.wikipedia.org/wiki/Embedded_C%2B%2B Standard Embedded C++] language.
[table
[[__predef_symbol__] [__predef_version__]]
[[`__embedded_cplusplus`] [__predef_detection__]]
]
*/
#define MSGPACK_LANG_STDECPP MSGPACK_VERSION_NUMBER_NOT_AVAILABLE
#if defined(__embedded_cplusplus)
# undef MSGPACK_LANG_STDECPP
# define MSGPACK_LANG_STDECPP MSGPACK_VERSION_NUMBER_AVAILABLE
#endif
#if MSGPACK_LANG_STDECPP
# define MSGPACK_LANG_STDECPP_AVAILABLE
#endif
#define MSGPACK_LANG_STDECPP_NAME "Standard Embedded C++"
#endif
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_LANG_STDCPP,MSGPACK_LANG_STDCPP_NAME)
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_LANG_STDCPPCLI,MSGPACK_LANG_STDCPPCLI_NAME)
#include <msgpack/predef/detail/test.h>
MSGPACK_PREDEF_DECLARE_TEST(MSGPACK_LANG_STDECPP,MSGPACK_LANG_STDECPP_NAME)

View File

@@ -1,16 +0,0 @@
/*
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)
*/
#if !defined(MSGPACK_PREDEF_LIBRARY_H) || defined(MSGPACK_PREDEF_INTERNAL_GENERATE_TESTS)
#ifndef MSGPACK_PREDEF_LIBRARY_H
#define MSGPACK_PREDEF_LIBRARY_H
#endif
#include <msgpack/predef/library/c.h>
#include <msgpack/predef/library/std.h>
#endif

View File

@@ -1,21 +0,0 @@
/*
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)
*/
#if !defined(MSGPACK_PREDEF_LIBRARY_C_H) || defined(MSGPACK_PREDEF_INTERNAL_GENERATE_TESTS)
#ifndef MSGPACK_PREDEF_LIBRARY_C_H
#define MSGPACK_PREDEF_LIBRARY_C_H
#endif
#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>
#include <msgpack/predef/library/c/zos.h>
#endif

View File

@@ -1,13 +0,0 @@
/*
Copyright Rene Rivera 2008-2013
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__PREFIX_H
#define MSGPACK_PREDEF_LIBRARY_C__PREFIX_H
#include <msgpack/predef/detail/_cassert.h>
#endif

Some files were not shown because too many files have changed in this diff Show More