mirror of
https://github.com/msgpack/msgpack-c.git
synced 2025-10-22 08:02:08 +02:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
dba7f480ed | ||
![]() |
3a39accb0b | ||
![]() |
387eca6fbf | ||
![]() |
b2381d0513 |
@@ -1,5 +1,4 @@
|
|||||||
if ENABLE_CXX
|
if ENABLE_CXX
|
||||||
export ERB
|
|
||||||
SUBDIRS = c cpp
|
SUBDIRS = c cpp
|
||||||
else
|
else
|
||||||
SUBDIRS = c
|
SUBDIRS = c
|
||||||
|
4
README
4
README
@@ -8,9 +8,7 @@ Binary-based efficient data interchange format.
|
|||||||
MessagePack is only tested on Linux and Mac OS X, but it may run on other
|
MessagePack is only tested on Linux and Mac OS X, but it may run on other
|
||||||
UNIX-like platforms.
|
UNIX-like platforms.
|
||||||
|
|
||||||
Following programs are required to build:
|
gcc >= 4.1 is required to build.
|
||||||
- gcc >= 4.1 with C++ support
|
|
||||||
- ruby >= 1.8 (ruby is used as a preprocessor)
|
|
||||||
|
|
||||||
|
|
||||||
*Installation
|
*Installation
|
||||||
|
@@ -31,11 +31,8 @@ if test x"$1" = x"--help"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
#if [ -z "$NO_NEST" ];then
|
|
||||||
# cd c && ./bootstrap $@; cd ..
|
|
||||||
# cd cpp && ./bootstrap $@; cd ..
|
|
||||||
#fi
|
|
||||||
mkdir -p ac
|
mkdir -p ac
|
||||||
|
(cd cpp && ./preprocess.sh $@; cd ..)
|
||||||
|
|
||||||
|
|
||||||
ACLOCAL="aclocal"
|
ACLOCAL="aclocal"
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
AC_INIT(msgpack/unpack_template.h)
|
AC_INIT(msgpack/unpack_template.h)
|
||||||
AC_CONFIG_AUX_DIR(ac)
|
AC_CONFIG_AUX_DIR(ac)
|
||||||
AM_INIT_AUTOMAKE(msgpack, 0.3.6)
|
AM_INIT_AUTOMAKE(msgpack, 0.3.7)
|
||||||
AC_CONFIG_HEADER(config.h)
|
AC_CONFIG_HEADER(config.h)
|
||||||
|
|
||||||
AC_SUBST(CFLAGS)
|
AC_SUBST(CFLAGS)
|
||||||
@@ -23,11 +23,6 @@ if test "$enable_cxx" != "no"; then
|
|||||||
if test "" = "$CXXFLAGS"; then
|
if test "" = "$CXXFLAGS"; then
|
||||||
CXXFLAGS="-g -O4"
|
CXXFLAGS="-g -O4"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_CHECK_PROG(ERB, erb, erb)
|
|
||||||
if test "x$ERB" = x; then
|
|
||||||
AC_MSG_ERROR([cannot find erb. Ruby is needed to build.])
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# FIXME
|
# FIXME
|
||||||
|
@@ -27,31 +27,6 @@ nobase_include_HEADERS = \
|
|||||||
msgpack/type/tuple.hpp \
|
msgpack/type/tuple.hpp \
|
||||||
msgpack/type/define.hpp
|
msgpack/type/define.hpp
|
||||||
|
|
||||||
# FIXME
|
|
||||||
object.lo: msgpack/type/tuple.hpp msgpack/type/define.hpp msgpack/zone.hpp
|
|
||||||
|
|
||||||
msgpack/type/tuple.hpp: msgpack/type/tuple.hpp.erb
|
|
||||||
$(ERB) $< > $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
|
|
||||||
msgpack/type/define.hpp: msgpack/type/define.hpp.erb
|
|
||||||
$(ERB) $< > $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
|
|
||||||
msgpack/zone.hpp: msgpack/zone.hpp.erb
|
|
||||||
$(ERB) $< > $@.tmp
|
|
||||||
mv $@.tmp $@
|
|
||||||
|
|
||||||
MOSTLYCLEANFILES = \
|
|
||||||
msgpack/type/tuple.hpp \
|
|
||||||
msgpack/type/define.hpp \
|
|
||||||
msgpack/zone.hpp
|
|
||||||
|
|
||||||
EXTRA_DIST = \
|
|
||||||
msgpack/type/tuple.hpp.erb \
|
|
||||||
msgpack/type/define.hpp.erb \
|
|
||||||
msgpack/zone.hpp.erb
|
|
||||||
|
|
||||||
libmsgpack_la_LIBADD = -L../c -lmsgpackc
|
libmsgpack_la_LIBADD = -L../c -lmsgpackc
|
||||||
|
|
||||||
# -version-info CURRENT:REVISION:AGE
|
# -version-info CURRENT:REVISION:AGE
|
||||||
|
@@ -16,7 +16,6 @@
|
|||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
//
|
//
|
||||||
#include "msgpack/object.hpp"
|
#include "msgpack/object.hpp"
|
||||||
|
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
namespace msgpack {
|
namespace msgpack {
|
||||||
|
11
cpp/preprocess.sh
Executable file
11
cpp/preprocess.sh
Executable file
@@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
function preprocess() {
|
||||||
|
erb $1.erb > $1.tmp
|
||||||
|
mv $1.tmp $1
|
||||||
|
}
|
||||||
|
|
||||||
|
preprocess msgpack/type/tuple.hpp
|
||||||
|
preprocess msgpack/type/define.hpp
|
||||||
|
preprocess msgpack/zone.hpp
|
||||||
|
|
@@ -37,7 +37,7 @@ namespace detail {
|
|||||||
{ throw type_error(); }
|
{ throw type_error(); }
|
||||||
return o.via.u64;
|
return o.via.u64;
|
||||||
} else if(o.type == type::NEGATIVE_INTEGER) {
|
} else if(o.type == type::NEGATIVE_INTEGER) {
|
||||||
if(o.via.i64 < (int64_t)-std::numeric_limits<T>::max())
|
if(o.via.i64 < (int64_t)std::numeric_limits<T>::min())
|
||||||
{ throw type_error(); }
|
{ throw type_error(); }
|
||||||
return o.via.i64;
|
return o.via.i64;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user