diff --git a/SConstruct b/SConstruct index 505315841d..b63f94d168 100644 --- a/SConstruct +++ b/SConstruct @@ -49,6 +49,8 @@ else: # Use openssl env.ParseConfig('pkg-config --cflags --libs openssl') +# Use protobuf +env.ParseConfig('pkg-config --cflags --libs protobuf') # The required version of boost is documented in the README file. # @@ -143,15 +145,9 @@ if not FreeBSD: ] ) -# Apparently, pkg-config --libs protobuf on bsd fails to provide this necessary include dir. -if FreeBSD: - env.Append(LINKFLAGS = ['-I/usr/local/include']) - env.Append(CXXFLAGS = ['-DOS_FREEBSD']) - env.Append( LIBS = [ 'rt', # for clock_nanosleep in beast - 'protobuf', 'z' ] ) @@ -183,7 +179,7 @@ TAG_SRCS = copy.copy(COMPILED_FILES) # Derive the object files from the source files. OBJECT_FILES = [] -OBJECT_FILES += PROTO_SRCS +OBJECT_FILES.append(PROTO_SRCS[0]) for file in COMPILED_FILES: OBJECT_FILES.append('build/obj/' + file) diff --git a/Subtrees/beast/modules/beast_basics/beast_basics.h b/Subtrees/beast/modules/beast_basics/beast_basics.h index 29049bed4a..3d509cdcd4 100644 --- a/Subtrees/beast/modules/beast_basics/beast_basics.h +++ b/Subtrees/beast/modules/beast_basics/beast_basics.h @@ -280,11 +280,11 @@ # include # endif -#elif BEAST_LINUX +#elif BEAST_LINUX || BEAST_BSD # include #else -# error Unnkown platform! +# error Unknown platform! #endif diff --git a/Subtrees/beast/modules/beast_basics/functor/beast_Bind.h b/Subtrees/beast/modules/beast_basics/functor/beast_Bind.h index ed29b3d47c..91b4aca6c6 100644 --- a/Subtrees/beast/modules/beast_basics/functor/beast_Bind.h +++ b/Subtrees/beast/modules/beast_basics/functor/beast_Bind.h @@ -71,7 +71,7 @@ using std::tr1::placeholders::_1; using std::tr1::placeholders::_2; #endif -#elif BEAST_LINUX +#elif BEAST_LINUX || BEAST_BSD using std::tr1::bind; using std::tr1::placeholders::_1; using std::tr1::placeholders::_2; diff --git a/Subtrees/websocket/src/rng/boost_rng.hpp b/Subtrees/websocket/src/rng/boost_rng.hpp index 8069937080..c87c20e54d 100644 --- a/Subtrees/websocket/src/rng/boost_rng.hpp +++ b/Subtrees/websocket/src/rng/boost_rng.hpp @@ -30,7 +30,9 @@ #ifndef BOOST_RNG_HPP #define BOOST_RNG_HPP -#define __STDC_LIMIT_MACROS 1 +#ifndef __STDC_LIMIT_MACROS + #define __STDC_LIMIT_MACROS +#endif #include #include diff --git a/modules/ripple_leveldb/ripple_leveldb.cpp b/modules/ripple_leveldb/ripple_leveldb.cpp index fcf011da74..ed230e1945 100644 --- a/modules/ripple_leveldb/ripple_leveldb.cpp +++ b/modules/ripple_leveldb/ripple_leveldb.cpp @@ -15,16 +15,18 @@ #if BEAST_WIN32 #define LEVELDB_PLATFORM_WINDOWS -#elif BEAST_MAC || BEAST_IOS - #define OS_MACOSX - -// VFALCO TODO Distinguish between BEAST_BSD and BEAST_FREEBSD -#elif BEAST_BSD - #define OS_FREEBSD - #else #define LEVELDB_PLATFORM_POSIX + #if BEAST_MAC || BEAST_IOS + #define OS_MACOSX + + // VFALCO TODO Distinguish between BEAST_BSD and BEAST_FREEBSD + #elif BEAST_BSD + #define OS_FREEBSD + + #endif + #endif #if BEAST_MSVC diff --git a/modules/ripple_websocket/ripple_websocket.h b/modules/ripple_websocket/ripple_websocket.h index 0e3b7fb1b1..4eeb8c78ce 100644 --- a/modules/ripple_websocket/ripple_websocket.h +++ b/modules/ripple_websocket/ripple_websocket.h @@ -21,6 +21,10 @@ @deprecated */ +// needed before inclusion of stdint.h for INT32_MIN/INT32_MAX macros +#ifndef __STDC_LIMIT_MACROS + #define __STDC_LIMIT_MACROS +#endif // VFALCO NOTE Log dependencies have wormed their way into websocketpp, // which needs the ripple_basic module to compile. @@ -38,11 +42,6 @@ //------------------------------------------------------------------------------ -// VFALCO TODO This include is just to prevent a warning about -// redefinition of __STDC_LIMIT_MACROS. Fix it right. -// -#include "websocket/src/rng/boost_rng.hpp" - #include "websocket/src/common.hpp" #include "websocket/src/sockets/socket_base.hpp"