mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-30 07:55:51 +00:00
Merge ripple_json to ripple_basics
This commit is contained in:
@@ -14,9 +14,11 @@
|
||||
|
||||
#include "ripple_basics.h"
|
||||
|
||||
// VFALCO TODO Rewrite Sustain to use beast::Process
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// For Sustain Linux variants
|
||||
//
|
||||
// These are for Sustain Linux variants
|
||||
// VFALCO TODO Rewrite Sustain to use beast::Process
|
||||
#ifdef __linux__
|
||||
#include <sys/types.h>
|
||||
#include <sys/prctl.h>
|
||||
@@ -27,28 +29,56 @@
|
||||
#include <sys/wait.h>
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// For json/
|
||||
//
|
||||
#ifdef JSON_USE_CPPTL
|
||||
# include <cpptl/conststring.h>
|
||||
#endif
|
||||
#ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
|
||||
#include "json/json_batchallocator.h"
|
||||
#endif
|
||||
|
||||
#define JSON_ASSERT_UNREACHABLE assert( false )
|
||||
#define JSON_ASSERT( condition ) assert( condition ); // @todo <= change this into an exception throw
|
||||
#define JSON_ASSERT_MESSAGE( condition, message ) if (!( condition )) throw std::runtime_error( message );
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// For random numbers
|
||||
//
|
||||
// VFALCO TODO Replace OpenSSL randomness with a dependency-free implementation
|
||||
// Perhaps Schneier's Fortuna or a variant. Abstract the collection of
|
||||
// entropy and provide OS-specific implementation. We can re-use the
|
||||
// BearShare source code for this.
|
||||
//
|
||||
// Add Random number generation to the new VFLib
|
||||
// Add Random number generation to beast
|
||||
//
|
||||
#include <openssl/rand.h> // Because of ripple_RandomNumbers.cpp
|
||||
|
||||
#ifdef BEAST_WIN32
|
||||
#include <windows.h> // for ripple_RandomNumbers.cpp
|
||||
#include <wincrypt.h> // for ripple_RandomNumbers.cpp
|
||||
// Winsock #defines 'max' and does other stupid things so put it last
|
||||
#include <Winsock2.h> // for ripple_ByteOrder.cpp
|
||||
# include <windows.h> // for ripple_RandomNumbers.cpp
|
||||
# include <wincrypt.h> // for ripple_RandomNumbers.cpp
|
||||
# include <Winsock2.h> // for ripple_ByteOrder.cpp
|
||||
// <Winsock2.h> defines 'max' and does other stupid things
|
||||
# ifdef max
|
||||
# undef max
|
||||
# endif
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace ripple
|
||||
{
|
||||
|
||||
#include "containers/ripple_RangeSet.cpp"
|
||||
#include "containers/ripple_TaggedCache.cpp"
|
||||
|
||||
#include "json/json_reader.cpp"
|
||||
#include "json/json_value.cpp"
|
||||
#include "json/json_writer.cpp"
|
||||
|
||||
#include "utility/ripple_Log.cpp"
|
||||
#include "utility/ripple_LogFile.cpp"
|
||||
|
||||
|
||||
@@ -22,7 +22,24 @@
|
||||
|
||||
#include "system/ripple_StandardIncludes.h"
|
||||
|
||||
// This must come before Boost, to fix the boost placeholders problem
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// For json/
|
||||
//
|
||||
// VFALCO TODO Clean up these one-offs
|
||||
#include "json/json_config.h" // Needed before these cpptl includes
|
||||
#ifndef JSON_USE_CPPTL_SMALLMAP
|
||||
# include <map>
|
||||
#else
|
||||
# include <cpptl/smallmap.h>
|
||||
#endif
|
||||
#ifdef JSON_USE_CPPTL
|
||||
# include <cpptl/forwards.h>
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// Must come before <boost/bind.hpp>
|
||||
#include "beast/modules/beast_core/beast_core.h"
|
||||
|
||||
#include "system/ripple_BoostIncludes.h"
|
||||
@@ -72,8 +89,6 @@ namespace boost
|
||||
|
||||
#include "beast/modules/beast_core/beast_core.h"
|
||||
|
||||
#include "../ripple_json/ripple_json.h"
|
||||
|
||||
namespace ripple
|
||||
{
|
||||
|
||||
@@ -106,6 +121,12 @@ using namespace beast;
|
||||
#include "containers/ripple_SecureAllocator.h"
|
||||
#include "containers/ripple_TaggedCache.h"
|
||||
|
||||
#include "json/json_forwards.h"
|
||||
#include "json/json_features.h"
|
||||
#include "json/json_value.h"
|
||||
#include "json/json_reader.h"
|
||||
#include "json/json_writer.h"
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <deque>
|
||||
#include <fstream>
|
||||
#include <functional>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <limits>
|
||||
#include <list>
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (c) 2011-2013, OpenCoin, Inc.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
/** Add this to get the @ref ripple_json module.
|
||||
|
||||
@file ripple_json.cpp
|
||||
@ingroup ripple_json
|
||||
*/
|
||||
|
||||
#include "BeastConfig.h"
|
||||
|
||||
#include "ripple_json.h"
|
||||
|
||||
#include <stdexcept>
|
||||
#include <iomanip>
|
||||
|
||||
#ifdef JSON_USE_CPPTL
|
||||
# include <cpptl/conststring.h>
|
||||
#endif
|
||||
|
||||
#ifndef JSON_USE_SIMPLE_INTERNAL_ALLOCATOR
|
||||
#include "json/json_batchallocator.h"
|
||||
#endif
|
||||
|
||||
#define JSON_ASSERT_UNREACHABLE assert( false )
|
||||
#define JSON_ASSERT( condition ) assert( condition ); // @todo <= change this into an exception throw
|
||||
#define JSON_ASSERT_MESSAGE( condition, message ) if (!( condition )) throw std::runtime_error( message );
|
||||
|
||||
namespace ripple
|
||||
{
|
||||
|
||||
#include "json/json_reader.cpp"
|
||||
#include "json/json_value.cpp"
|
||||
#include "json/json_writer.cpp"
|
||||
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
Copyright (c) 2011-2013, OpenCoin, Inc.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
/** Include this to get the @ref ripple_json module.
|
||||
|
||||
@file ripple_json.h
|
||||
@ingroup ripple_json
|
||||
*/
|
||||
|
||||
/** JSON parsiing and output support.
|
||||
|
||||
A simple set of JSON manipulation classes.
|
||||
|
||||
@defgroup ripple_json
|
||||
*/
|
||||
|
||||
#ifndef RIPPLE_JSON_RIPPLEHEADER
|
||||
#define RIPPLE_JSON_RIPPLEHEADER
|
||||
|
||||
#include "../modules/ripple_basics/ripple_basics.h"
|
||||
|
||||
#include "json/json_config.h" // Needed before these cpptl includes
|
||||
|
||||
#ifndef JSON_USE_CPPTL_SMALLMAP
|
||||
# include <map>
|
||||
#else
|
||||
# include <cpptl/smallmap.h>
|
||||
#endif
|
||||
|
||||
#ifdef JSON_USE_CPPTL
|
||||
# include <cpptl/forwards.h>
|
||||
#endif
|
||||
|
||||
namespace ripple
|
||||
{
|
||||
|
||||
#include "json/json_forwards.h"
|
||||
#include "json/json_features.h"
|
||||
#include "json/json_value.h"
|
||||
#include "json/json_reader.h"
|
||||
#include "json/json_writer.h"
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user