mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-20 19:15:54 +00:00
Add BeforeBoost.h and tidy up beast system headers
This commit is contained in:
163
BeastConfig.h
163
BeastConfig.h
@@ -1,79 +1,97 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
Copyright (c) 2011-2013, OpenCoin, Inc.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_BEASTCONFIG_H_INCLUDED
|
||||
#define BEAST_BEASTCONFIG_H_INCLUDED
|
||||
|
||||
/** Configuration file for Beast.
|
||||
|
||||
/** Configuration file for Beast
|
||||
This sets various configurable options for Beast. In order to compile you
|
||||
must place a copy of this file in a location where your build environment
|
||||
can find it, and then customize its contents to suit your needs.
|
||||
|
||||
@file BeastConfig.h
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
// Diagnostics
|
||||
//
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Config: BEAST_FORCE_DEBUG
|
||||
|
||||
Normally, BEAST_DEBUG is set to 1 or 0 based on compiler and project
|
||||
settings, but if you define this value, you can override this to force it
|
||||
to be true or false.
|
||||
*/
|
||||
#ifndef BEAST_FORCE_DEBUG
|
||||
//#define BEAST_FORCE_DEBUG 0
|
||||
//#define BEAST_FORCE_DEBUG 1
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Config: BEAST_LOG_ASSERTIONS
|
||||
|
||||
If this flag is enabled, the the bassert and bassertfalse macros will always
|
||||
use Logger::writeToLog() to write a message when an assertion happens.
|
||||
|
||||
Enabling it will also leave this turned on in release builds. When it's
|
||||
disabled, however, the bassert and bassertfalse macros will not be compiled
|
||||
in a release build.
|
||||
|
||||
@see bassert, bassertfalse, Logger
|
||||
*/
|
||||
#ifndef BEAST_LOG_ASSERTIONS
|
||||
//#define BEAST_LOG_ASSERTIONS 0
|
||||
//#define BEAST_LOG_ASSERTIONS 1
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** Config: BEAST_CATCH_UNHANDLED_EXCEPTIONS
|
||||
This will wrap certain operating system calls with exception catching
|
||||
code that converts the system exception into a regular error.
|
||||
*/
|
||||
#ifndef BEAST_CATCH_UNHANDLED_EXCEPTIONS
|
||||
//#define BEAST_CATCH_UNHANDLED_EXCEPTIONS 0
|
||||
#endif
|
||||
|
||||
/** Config: BEAST_CHECK_MEMORY_LEAKS
|
||||
|
||||
Enables a memory-leak check for certain objects when the app terminates.
|
||||
See the LeakChecked class for more details about enabling leak checking for
|
||||
specific classes.
|
||||
*/
|
||||
#ifndef BEAST_CHECK_MEMORY_LEAKS
|
||||
//#define BEAST_CHECK_MEMORY_LEAKS 1
|
||||
//#define BEAST_CHECK_MEMORY_LEAKS 0
|
||||
#endif
|
||||
|
||||
/** Config: BEAST_DISABLE_CONTRACT_CHECKS
|
||||
Set this to 1 to prevent check_contract macros from evaluating their
|
||||
conditions, which might be expensive. meet_contract macros will still
|
||||
evaluate their conditions since their return values are checked.
|
||||
*/
|
||||
#ifndef BEAST_DISABLE_CONTRACT_CHECKS
|
||||
//#define BEAST_DISABLE_CONTRACT_CHECKS 1
|
||||
#endif
|
||||
|
||||
/** Config: BEAST_COMPILER_CHECKS_SOCKET_OVERRIDES
|
||||
Setting this option makes Socket-derived classes generate compile errors
|
||||
if they forget any of the virtual overrides As some Socket-derived classes
|
||||
intentionally omit member functions that are not applicable, this macro
|
||||
should only be enabled temporarily when writing your own Socket-derived
|
||||
class, to make sure that the function signatures match as expected.
|
||||
*/
|
||||
#ifndef BEAST_COMPILER_CHECKS_SOCKET_OVERRIDES
|
||||
//#define BEAST_COMPILER_CHECKS_SOCKET_OVERRIDES 1
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
// Libraries
|
||||
//
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Config: BEAST_DISABLE_BEAST_VERSION_PRINTING
|
||||
Turns off the debugging display of the beast version number
|
||||
*/
|
||||
#ifndef BEAST_DISABLE_BEAST_VERSION_PRINTING
|
||||
//#define BEAST_DISABLE_BEAST_VERSION_PRINTING 1
|
||||
#endif
|
||||
|
||||
/** Config: BEAST_DONT_AUTOLINK_TO_WIN32_LIBRARIES
|
||||
|
||||
In a Visual C++ build, this can be used to stop the required system libs
|
||||
being automatically added to the link stage.
|
||||
*/
|
||||
@@ -81,88 +99,47 @@
|
||||
//#define BEAST_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Config: BEAST_INCLUDE_ZLIB_CODE
|
||||
|
||||
This can be used to disable Beast's embedded 3rd-party zlib code.
|
||||
You might need to tweak this if you're linking to an external zlib library in your app,
|
||||
but for normal apps, this option should be left alone.
|
||||
You might need to tweak this if you're linking to an external zlib library
|
||||
in your app, but for normal apps, this option should be left alone.
|
||||
|
||||
If you disable this, you might also want to set a value for BEAST_ZLIB_INCLUDE_PATH, to
|
||||
specify the path where your zlib headers live.
|
||||
If you disable this, you might also want to set a value for
|
||||
BEAST_ZLIB_INCLUDE_PATH, to specify the path where your zlib headers live.
|
||||
*/
|
||||
#ifndef BEAST_INCLUDE_ZLIB_CODE
|
||||
//#define BEAST_INCLUDE_ZLIB_CODE 0
|
||||
//#define BEAST_INCLUDE_ZLIB_CODE 1
|
||||
#endif
|
||||
|
||||
/** Config: BEAST_ZLIB_INCLUDE_PATH
|
||||
This is included when BEAST_INCLUDE_ZLIB_CODE is set to zero.
|
||||
*/
|
||||
#ifndef BEAST_ZLIB_INCLUDE_PATH
|
||||
#define BEAST_ZLIB_INCLUDE_PATH <zlib.h>
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
// Boost
|
||||
//
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Config: BEAST_BOOST_IS_AVAILABLE
|
||||
|
||||
This activates boost specific features and improvements.
|
||||
/** Config: BEAST_USE_BOOST_FEATURES
|
||||
This activates boost specific features and improvements. If this is
|
||||
turned on, the include paths for your build environment must be set
|
||||
correctly to find the boost headers.
|
||||
*/
|
||||
#ifndef BEAST_BOOST_IS_AVAILABLE
|
||||
#define BEAST_BOOST_IS_AVAILABLE 1
|
||||
#ifndef BEAST_USE_BOOST_FEATURES
|
||||
#define BEAST_USE_BOOST_FEATURES 1
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Config: BEAST_DISABLE_BEAST_VERSION_PRINTING
|
||||
Turns off the debugging display of the beast version number
|
||||
*/
|
||||
#ifndef BEAST_DISABLE_BEAST_VERSION_PRINTING
|
||||
#define BEAST_DISABLE_BEAST_VERSION_PRINTING 1
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Bind source configuration.
|
||||
|
||||
Set one of these to manually force a particular implementation of bind().
|
||||
If nothing is chosen then beast will use whatever is appropriate for your
|
||||
environment based on what is available.
|
||||
*/
|
||||
//#define BEAST_BIND_USES_STD 1
|
||||
//#define BEAST_BIND_USES_TR1 1
|
||||
//#define BEAST_BIND_USES_BOOST 1
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Config: BEAST_DISABLE_CONTRACT_CHECKS
|
||||
|
||||
Set this to 1 to prevent check_contract macros from evaluating their
|
||||
conditions, which might be expensive. meet_contract macros will still
|
||||
evaluate their conditions since their return values are checked.
|
||||
*/
|
||||
#ifndef BEAST_DISABLE_CONTRACT_CHECKS
|
||||
#define BEAST_DISABLE_CONTRACT_CHECKS 0
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Config: BEAST_COMPILER_CHECKS_SOCKET_OVERRIDES
|
||||
|
||||
Setting this option makes Socket-derived classes generate compile errors if
|
||||
they forget any of the virtual overrides As some Socket-derived classes
|
||||
intentionally omit member functions that are not applicable, this macro
|
||||
should only be enabled temporarily when writing your own Socket-derived class,
|
||||
to make sure that the function signatures match as expected.
|
||||
*/
|
||||
#define BEAST_COMPILER_CHECKS_SOCKET_OVERRIDES 0
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
// Ripple compilation settings
|
||||
// Ripple
|
||||
//
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Config: RIPPLE_VERIFY_NODEOBJECT_KEYS
|
||||
|
||||
This verifies that the hash of node objects matches the payload.
|
||||
It is quite expensive so normally this is turned off!
|
||||
*/
|
||||
@@ -170,21 +147,23 @@
|
||||
//#define RIPPLE_VERIFY_NODEOBJECT_KEYS 1
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Config: RIPPLE_TRACK_MUTEXES
|
||||
|
||||
Turns on a feature that enables tracking and diagnostics for mutex
|
||||
and recursive mutex objects. This affects the type of lock used
|
||||
by RippleMutex and RippleRecursiveMutex
|
||||
@note This can slow down performance considerably.
|
||||
*/
|
||||
#ifndef RIPPLE_TRACK_MUTEXES
|
||||
#define RIPPLE_TRACK_MUTEXES 0
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// This is only here temporarily. Use it to turn off MultiSocket
|
||||
// in Peer code if you suspect you're having problems because of it.
|
||||
//
|
||||
#ifndef RIPPLE_PEER_USES_BEAST_MULTISOCKET
|
||||
#define RIPPLE_PEER_USES_BEAST_MULTISOCKET 0
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -21,94 +21,80 @@
|
||||
#define BEAST_BEASTCONFIG_H_INCLUDED
|
||||
|
||||
/** Configuration file for Beast.
|
||||
|
||||
This sets various configurable options for Beast. In order to compile you
|
||||
must place a copy of this file in a location where your build environment
|
||||
can find it, and then customize its contents to suit your needs.
|
||||
|
||||
@file BeastConfig.h
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
// Diagnostics
|
||||
//
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Config: BEAST_FORCE_DEBUG
|
||||
|
||||
Normally, BEAST_DEBUG is set to 1 or 0 based on compiler and project
|
||||
settings, but if you define this value, you can override this to force it
|
||||
to be true or false.
|
||||
*/
|
||||
#ifndef BEAST_FORCE_DEBUG
|
||||
//#define BEAST_FORCE_DEBUG 0
|
||||
//#define BEAST_FORCE_DEBUG 1
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Config: BEAST_LOG_ASSERTIONS
|
||||
|
||||
If this flag is enabled, the the bassert and bassertfalse macros will always
|
||||
use Logger::writeToLog() to write a message when an assertion happens.
|
||||
|
||||
Enabling it will also leave this turned on in release builds. When it's
|
||||
disabled, however, the bassert and bassertfalse macros will not be compiled
|
||||
in a release build.
|
||||
|
||||
@see bassert, bassertfalse, Logger
|
||||
*/
|
||||
#ifndef BEAST_LOG_ASSERTIONS
|
||||
//#define BEAST_LOG_ASSERTIONS 0
|
||||
//#define BEAST_LOG_ASSERTIONS 1
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** Config: BEAST_CATCH_UNHANDLED_EXCEPTIONS
|
||||
This will wrap certain operating system calls with exception catching
|
||||
code that converts the system exception into a regular error.
|
||||
*/
|
||||
#ifndef BEAST_CATCH_UNHANDLED_EXCEPTIONS
|
||||
//#define BEAST_CATCH_UNHANDLED_EXCEPTIONS 0
|
||||
#endif
|
||||
|
||||
/** Config: BEAST_CHECK_MEMORY_LEAKS
|
||||
|
||||
Enables a memory-leak check for certain objects when the app terminates.
|
||||
See the LeakChecked class for more details about enabling leak checking for
|
||||
specific classes.
|
||||
*/
|
||||
#ifndef BEAST_CHECK_MEMORY_LEAKS
|
||||
//#define BEAST_CHECK_MEMORY_LEAKS 1
|
||||
//#define BEAST_CHECK_MEMORY_LEAKS 0
|
||||
#endif
|
||||
|
||||
/** Config: BEAST_DISABLE_CONTRACT_CHECKS
|
||||
Set this to 1 to prevent check_contract macros from evaluating their
|
||||
conditions, which might be expensive. meet_contract macros will still
|
||||
evaluate their conditions since their return values are checked.
|
||||
*/
|
||||
#ifndef BEAST_DISABLE_CONTRACT_CHECKS
|
||||
//#define BEAST_DISABLE_CONTRACT_CHECKS 1
|
||||
#endif
|
||||
|
||||
/** Config: BEAST_COMPILER_CHECKS_SOCKET_OVERRIDES
|
||||
Setting this option makes Socket-derived classes generate compile errors
|
||||
if they forget any of the virtual overrides As some Socket-derived classes
|
||||
intentionally omit member functions that are not applicable, this macro
|
||||
should only be enabled temporarily when writing your own Socket-derived
|
||||
class, to make sure that the function signatures match as expected.
|
||||
*/
|
||||
#ifndef BEAST_COMPILER_CHECKS_SOCKET_OVERRIDES
|
||||
//#define BEAST_COMPILER_CHECKS_SOCKET_OVERRIDES 1
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Config: BEAST_DONT_AUTOLINK_TO_WIN32_LIBRARIES
|
||||
|
||||
In a Visual C++ build, this can be used to stop the required system libs
|
||||
being automatically added to the link stage.
|
||||
*/
|
||||
#ifndef BEAST_DONT_AUTOLINK_TO_WIN32_LIBRARIES
|
||||
//#define BEAST_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Config: BEAST_INCLUDE_ZLIB_CODE
|
||||
|
||||
This can be used to disable Beast's embedded 3rd-party zlib code.
|
||||
You might need to tweak this if you're linking to an external zlib library in your app,
|
||||
but for normal apps, this option should be left alone.
|
||||
|
||||
If you disable this, you might also want to set a value for BEAST_ZLIB_INCLUDE_PATH, to
|
||||
specify the path where your zlib headers live.
|
||||
*/
|
||||
#ifndef BEAST_INCLUDE_ZLIB_CODE
|
||||
//#define BEAST_INCLUDE_ZLIB_CODE 0
|
||||
#endif
|
||||
|
||||
#ifndef BEAST_ZLIB_INCLUDE_PATH
|
||||
#define BEAST_ZLIB_INCLUDE_PATH <zlib.h>
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Config: BEAST_BOOST_IS_AVAILABLE
|
||||
This activates boost specific features and improvements.
|
||||
*/
|
||||
#ifndef BEAST_BOOST_IS_AVAILABLE
|
||||
#define BEAST_BOOST_IS_AVAILABLE 0
|
||||
#endif
|
||||
|
||||
//
|
||||
// Libraries
|
||||
//
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Config: BEAST_DISABLE_BEAST_VERSION_PRINTING
|
||||
@@ -118,40 +104,65 @@
|
||||
//#define BEAST_DISABLE_BEAST_VERSION_PRINTING 1
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
/** Config: BEAST_DONT_AUTOLINK_TO_WIN32_LIBRARIES
|
||||
In a Visual C++ build, this can be used to stop the required system libs
|
||||
being automatically added to the link stage.
|
||||
*/
|
||||
#ifndef BEAST_DONT_AUTOLINK_TO_WIN32_LIBRARIES
|
||||
//#define BEAST_DONT_AUTOLINK_TO_WIN32_LIBRARIES 1
|
||||
#endif
|
||||
|
||||
/** Bind source configuration.
|
||||
/** Config: BEAST_INCLUDE_ZLIB_CODE
|
||||
This can be used to disable Beast's embedded 3rd-party zlib code.
|
||||
You might need to tweak this if you're linking to an external zlib library
|
||||
in your app, but for normal apps, this option should be left alone.
|
||||
|
||||
If you disable this, you might also want to set a value for
|
||||
BEAST_ZLIB_INCLUDE_PATH, to specify the path where your zlib headers live.
|
||||
*/
|
||||
#ifndef BEAST_INCLUDE_ZLIB_CODE
|
||||
//#define BEAST_INCLUDE_ZLIB_CODE 1
|
||||
#endif
|
||||
|
||||
/** Config: BEAST_ZLIB_INCLUDE_PATH
|
||||
This is included when BEAST_INCLUDE_ZLIB_CODE is set to zero.
|
||||
*/
|
||||
#ifndef BEAST_ZLIB_INCLUDE_PATH
|
||||
#define BEAST_ZLIB_INCLUDE_PATH <zlib.h>
|
||||
#endif
|
||||
|
||||
/** Config: BEAST_FUNCTIONAL_USES_###
|
||||
<functional> source configuration.
|
||||
Set one of these to manually force a particular implementation of bind().
|
||||
If nothing is chosen then beast will use whatever is appropriate for your
|
||||
environment based on what is available.
|
||||
If you override these, set ONE to 1 and the rest to 0
|
||||
*/
|
||||
//#define BEAST_BIND_USES_STD 1
|
||||
//#define BEAST_BIND_USES_TR1 1
|
||||
//#define BEAST_BIND_USES_BOOST 1
|
||||
#ifndef BEAST_FUNCTIONAL_USES_STD
|
||||
//#define BEAST_FUNCTIONAL_USES_STD 0
|
||||
#endif
|
||||
#ifndef BEAST_FUNCTIONAL_USES_TR1
|
||||
//#define BEAST_FUNCTIONAL_USES_TR1 0
|
||||
#endif
|
||||
#ifndef BEAST_FUNCTIONAL_USES_BOOST
|
||||
//#define BEAST_FUNCTIONAL_USES_BOOST 0
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
//
|
||||
// Boost
|
||||
//
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Config: BEAST_DISABLE_CONTRACT_CHECKS
|
||||
|
||||
Set this to 1 to prevent check_contract macros from evaluating their
|
||||
conditions, which might be expensive. meet_contract macros will still
|
||||
evaluate their conditions since their return values are checked.
|
||||
/** Config: BEAST_USE_BOOST_FEATURES
|
||||
This activates boost specific features and improvements. If this is
|
||||
turned on, the include paths for your build environment must be set
|
||||
correctly to find the boost headers.
|
||||
*/
|
||||
#ifndef BEAST_DISABLE_CONTRACT_CHECKS
|
||||
#define BEAST_DISABLE_CONTRACT_CHECKS 0
|
||||
#ifndef BEAST_USE_BOOST_FEATURES
|
||||
//#define BEAST_USE_BOOST_FEATURES 1
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Config: BEAST_COMPILER_CHECKS_SOCKET_OVERRIDES
|
||||
|
||||
Setting this option makes Socket-derived classes generate compile errors if
|
||||
they forget any of the virtual overrides As some Socket-derived classes
|
||||
intentionally omit member functions that are not applicable, this macro
|
||||
should only be enabled temporarily when writing your own Socket-derived class,
|
||||
to make sure that the function signatures match as expected.
|
||||
*/
|
||||
#define BEAST_COMPILER_CHECKS_SOCKET_OVERRIDES 0
|
||||
|
||||
#endif
|
||||
|
||||
@@ -208,13 +208,16 @@
|
||||
<ClInclude Include="..\..\modules\beast_core\streams\beast_MemoryOutputStream.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\streams\beast_OutputStream.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\streams\beast_SubregionStream.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\system\beast_Functional.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\system\beast_PlatformDefs.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\system\beast_StandardHeader.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\system\beast_SystemStats.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\system\beast_TargetPlatform.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\system\BindIncludes.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\system\BeastConfigCheck.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\system\Functional.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\system\PlatformDefs.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\system\StandardHeader.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\system\SystemStats.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\system\TargetPlatform.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\system\BeforeBoost.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\system\BoostIncludes.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\system\BoostPlaceholdersFix.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\system\FunctionalIncludes.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\text\beast_CharacterFunctions.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\text\beast_CharPointer_ASCII.h" />
|
||||
<ClInclude Include="..\..\modules\beast_core\text\beast_CharPointer_UTF16.h" />
|
||||
@@ -829,12 +832,18 @@
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\system\beast_SystemStats.cpp">
|
||||
<ClCompile Include="..\..\modules\beast_core\system\SystemStats.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\system\BoostPlaceholdersFix.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\text\beast_CharacterFunctions.cpp">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
|
||||
|
||||
@@ -340,18 +340,6 @@
|
||||
<ClInclude Include="..\..\modules\beast_core\streams\beast_SubregionStream.h">
|
||||
<Filter>beast_core\streams</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\system\beast_PlatformDefs.h">
|
||||
<Filter>beast_core\system</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\system\beast_StandardHeader.h">
|
||||
<Filter>beast_core\system</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\system\beast_SystemStats.h">
|
||||
<Filter>beast_core\system</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\system\beast_TargetPlatform.h">
|
||||
<Filter>beast_core\system</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\text\beast_CharacterFunctions.h">
|
||||
<Filter>beast_core\text</Filter>
|
||||
</ClInclude>
|
||||
@@ -560,9 +548,6 @@
|
||||
<ClInclude Include="..\..\modules\beast_core\memory\beast_SharedSingleton.h">
|
||||
<Filter>beast_core\memory</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\system\beast_Functional.h">
|
||||
<Filter>beast_core\system</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\maths\beast_Interval.h">
|
||||
<Filter>beast_core\maths</Filter>
|
||||
</ClInclude>
|
||||
@@ -818,12 +803,6 @@
|
||||
<ClInclude Include="..\..\modules\beast_core\thread\impl\UntrackedMutexType.h">
|
||||
<Filter>beast_core\thread\impl</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\system\BoostIncludes.h">
|
||||
<Filter>beast_core\system</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\system\BindIncludes.h">
|
||||
<Filter>beast_core\system</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\thread\beast_DeadlineTimer.h">
|
||||
<Filter>beast_core\thread</Filter>
|
||||
</ClInclude>
|
||||
@@ -911,6 +890,36 @@
|
||||
<ClInclude Include="..\..\modules\beast_extras\beast_extras.h">
|
||||
<Filter>beast_extras</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\system\BeforeBoost.h">
|
||||
<Filter>beast_core\system</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\system\BoostPlaceholdersFix.h">
|
||||
<Filter>beast_core\system</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\system\BoostIncludes.h">
|
||||
<Filter>beast_core\system</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\system\BeastConfigCheck.h">
|
||||
<Filter>beast_core\system</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\system\FunctionalIncludes.h">
|
||||
<Filter>beast_core\system</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\system\StandardHeader.h">
|
||||
<Filter>beast_core\system</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\system\PlatformDefs.h">
|
||||
<Filter>beast_core\system</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\system\Functional.h">
|
||||
<Filter>beast_core\system</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\system\SystemStats.h">
|
||||
<Filter>beast_core\system</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\modules\beast_core\system\TargetPlatform.h">
|
||||
<Filter>beast_core\system</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="..\..\modules\beast_core\beast_core.cpp">
|
||||
@@ -1057,9 +1066,6 @@
|
||||
<ClCompile Include="..\..\modules\beast_core\streams\beast_SubregionStream.cpp">
|
||||
<Filter>beast_core\streams</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\system\beast_SystemStats.cpp">
|
||||
<Filter>beast_core\system</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\text\beast_CharacterFunctions.cpp">
|
||||
<Filter>beast_core\text</Filter>
|
||||
</ClCompile>
|
||||
@@ -1387,6 +1393,12 @@
|
||||
<ClCompile Include="..\..\modules\beast_extras\beast_extras.cpp">
|
||||
<Filter>beast_extras</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\system\BoostPlaceholdersFix.cpp">
|
||||
<Filter>beast_core\system</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\modules\beast_core\system\SystemStats.cpp">
|
||||
<Filter>beast_core\system</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Text Include="..\..\TODO.txt" />
|
||||
|
||||
@@ -196,7 +196,7 @@ namespace beast
|
||||
#include "streams/beast_OutputStream.cpp"
|
||||
#include "streams/beast_SubregionStream.cpp"
|
||||
|
||||
#include "system/beast_SystemStats.cpp"
|
||||
#include "system/SystemStats.cpp"
|
||||
|
||||
#include "text/beast_CharacterFunctions.cpp"
|
||||
#include "text/beast_LexicalCast.cpp"
|
||||
@@ -318,18 +318,5 @@ namespace beast
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#if BEAST_BOOST_IS_AVAILABLE
|
||||
namespace boost {
|
||||
namespace placeholders {
|
||||
boost::arg<1> _1;
|
||||
boost::arg<2> _2;
|
||||
boost::arg<3> _3;
|
||||
boost::arg<4> _4;
|
||||
boost::arg<5> _5;
|
||||
boost::arg<6> _6;
|
||||
boost::arg<7> _7;
|
||||
boost::arg<8> _8;
|
||||
boost::arg<9> _9;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
// Must be outside the namespace
|
||||
#include "system/BoostPlaceholdersFix.cpp"
|
||||
|
||||
@@ -172,101 +172,11 @@ Some files contain portions of these external projects, licensed separately:
|
||||
@copyright Provided under the [ISC LIcense][11]
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Implementation classes.
|
||||
|
||||
Thase classes are used internally.
|
||||
|
||||
@defgroup internal internal
|
||||
@internal
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** External modules.
|
||||
|
||||
These modules bring in functionality from third party or system libraries.
|
||||
|
||||
@defgroup external external
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/** Core classes.
|
||||
|
||||
This module provides core required functionality, and classes useful for
|
||||
general development. All other modules require this module.
|
||||
|
||||
@todo Discuss the treatment of exceptions versus Error objects in the
|
||||
library.
|
||||
|
||||
@todo Discuss the additions to BeastConfig.h
|
||||
|
||||
@defgroup beast_core beast_core
|
||||
*/
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
/* If you fail to make sure that all your compile units are building Beast with
|
||||
the same set of option flags, then there's a risk that different compile
|
||||
units will treat the classes as having different memory layouts, leading to
|
||||
very nasty memory corruption errors when they all get linked together.
|
||||
That's why it's best to always include the BeastConfig.h file before any
|
||||
beast headers.
|
||||
*/
|
||||
#ifndef BEAST_BEASTCONFIG_H_INCLUDED
|
||||
# ifdef _MSC_VER
|
||||
# pragma message ("Have you included your BeastConfig.h file before including the Beast headers?")
|
||||
# else
|
||||
# warning "Have you included your BeastConfig.h file before including the Beast headers?"
|
||||
# endif
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#include "system/beast_TargetPlatform.h"
|
||||
|
||||
//
|
||||
// Apply sensible defaults for the configuration settings
|
||||
//
|
||||
|
||||
#ifndef BEAST_LOG_ASSERTIONS
|
||||
# if BEAST_ANDROID
|
||||
# define BEAST_LOG_ASSERTIONS 1
|
||||
# else
|
||||
# define BEAST_LOG_ASSERTIONS 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if BEAST_DEBUG && ! defined (BEAST_CHECK_MEMORY_LEAKS)
|
||||
#define BEAST_CHECK_MEMORY_LEAKS 1
|
||||
#endif
|
||||
|
||||
#ifndef BEAST_INCLUDE_ZLIB_CODE
|
||||
#define BEAST_INCLUDE_ZLIB_CODE 1
|
||||
#endif
|
||||
|
||||
#ifndef BEAST_ZLIB_INCLUDE_PATH
|
||||
#define BEAST_ZLIB_INCLUDE_PATH <zlib.h>
|
||||
#endif
|
||||
|
||||
/* Config: BEAST_CATCH_UNHANDLED_EXCEPTIONS
|
||||
If enabled, this will add some exception-catching code to forward unhandled exceptions
|
||||
to your BEASTApplication::unhandledException() callback.
|
||||
*/
|
||||
#ifndef BEAST_CATCH_UNHANDLED_EXCEPTIONS
|
||||
//#define BEAST_CATCH_UNHANDLED_EXCEPTIONS 1
|
||||
#endif
|
||||
|
||||
#ifndef BEAST_STRING_UTF_TYPE
|
||||
# define BEAST_STRING_UTF_TYPE 8
|
||||
#endif
|
||||
|
||||
# include "system/BeforeBoost.h"
|
||||
# include "system/BoostIncludes.h"
|
||||
#include "system/BindIncludes.h"
|
||||
#include "system/FunctionalIncludes.h"
|
||||
|
||||
#include "system/beast_StandardHeader.h"
|
||||
#include "system/StandardHeader.h"
|
||||
|
||||
#if BEAST_MSVC
|
||||
# pragma warning (disable: 4251) // (DLL build warning, must be disabled before pushing the warning state)
|
||||
@@ -346,10 +256,10 @@ extern BEAST_API void BEAST_CALLTYPE logAssertion (char const* file, int line) n
|
||||
# pragma warning (pop)
|
||||
#endif
|
||||
|
||||
#include "system/beast_PlatformDefs.h"
|
||||
#include "system/beast_TargetPlatform.h"
|
||||
#include "system/PlatformDefs.h"
|
||||
#include "system/TargetPlatform.h"
|
||||
#include "diagnostic/beast_Throw.h"
|
||||
#include "system/beast_Functional.h"
|
||||
#include "system/Functional.h"
|
||||
#include "memory/beast_AtomicCounter.h"
|
||||
#include "memory/beast_AtomicFlag.h"
|
||||
#include "memory/beast_AtomicPointer.h"
|
||||
@@ -449,7 +359,7 @@ extern BEAST_API void BEAST_CALLTYPE logAssertion (char const* file, int line) n
|
||||
#include "streams/beast_OutputStream.h"
|
||||
#include "streams/beast_SubregionStream.h"
|
||||
|
||||
#include "system/beast_SystemStats.h"
|
||||
#include "system/SystemStats.h"
|
||||
#include "text/beast_Identifier.h"
|
||||
#include "text/beast_LocalisedStrings.h"
|
||||
#include "text/beast_NewLine.h"
|
||||
|
||||
@@ -72,7 +72,7 @@ public:
|
||||
/** Writes a message to the standard error stream.
|
||||
|
||||
This can be called directly, or by using the DBG() macro in
|
||||
beast_PlatformDefs.h (which will avoid calling the method in non-debug builds).
|
||||
PlatformDefs.h (which will avoid calling the method in non-debug builds).
|
||||
*/
|
||||
static void BEAST_CALLTYPE outputDebugString (const String& text);
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
// implementation has a leak. Although the other
|
||||
// one also seems to have a leak.
|
||||
//
|
||||
//#if BEAST_BOOST_IS_AVAILABLE
|
||||
//#if BEAST_USE_BOOST_FEATURES
|
||||
#if 0
|
||||
typedef FifoFreeStoreWithTLS FifoFreeStoreType;
|
||||
#else
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
// affecting performance.
|
||||
//
|
||||
|
||||
#if BEAST_BOOST_IS_AVAILABLE
|
||||
#if BEAST_USE_BOOST_FEATURES
|
||||
|
||||
// This precedes every allocation
|
||||
//
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#ifndef BEAST_FIFOFREESTOREWITHTLS_H_INCLUDED
|
||||
#define BEAST_FIFOFREESTOREWITHTLS_H_INCLUDED
|
||||
|
||||
#if BEAST_BOOST_IS_AVAILABLE
|
||||
#if BEAST_USE_BOOST_FEATURES
|
||||
|
||||
/*============================================================================*/
|
||||
/**
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
#ifndef BEAST_BASICNATIVEHEADERS_H_INCLUDED
|
||||
#define BEAST_BASICNATIVEHEADERS_H_INCLUDED
|
||||
|
||||
#include "../system/beast_TargetPlatform.h"
|
||||
#include "../system/TargetPlatform.h"
|
||||
#undef T
|
||||
|
||||
//==============================================================================
|
||||
|
||||
102
Subtrees/beast/modules/beast_core/system/BeastConfigCheck.h
Normal file
102
Subtrees/beast/modules/beast_core/system/BeastConfigCheck.h
Normal file
@@ -0,0 +1,102 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_CORE_SYSTEM_BEASTCONFIGCHECK_H_INCLUDED
|
||||
#define BEAST_CORE_SYSTEM_BEASTCONFIGCHECK_H_INCLUDED
|
||||
|
||||
// This file makes sure that BeastConfig.h was included.
|
||||
// It also sets defaults for all config options.
|
||||
|
||||
/* If you fail to make sure that all your compile units are building Beast with
|
||||
the same set of option flags, then there's a risk that different compile
|
||||
units will treat the classes as having different memory layouts, leading to
|
||||
very nasty memory corruption errors when they all get linked together.
|
||||
That's why it's best to always include the BeastConfig.h file before any
|
||||
beast headers.
|
||||
*/
|
||||
#ifndef BEAST_BEASTCONFIG_H_INCLUDED
|
||||
# ifdef _MSC_VER
|
||||
# pragma message ("Have you included your BeastConfig.h file before including the Beast headers?")
|
||||
# else
|
||||
# warning "Have you included your BeastConfig.h file before including the Beast headers?"
|
||||
# endif
|
||||
# error "BeastConfig.h must be included before any Beast headers!"
|
||||
#endif
|
||||
|
||||
//
|
||||
// Apply sensible defaults for the configuration settings
|
||||
//
|
||||
|
||||
#ifndef BEAST_FORCE_DEBUG
|
||||
#define BEAST_FORCE_DEBUG 0
|
||||
#endif
|
||||
|
||||
#ifndef BEAST_LOG_ASSERTIONS
|
||||
# if BEAST_ANDROID
|
||||
# define BEAST_LOG_ASSERTIONS 1
|
||||
# else
|
||||
# define BEAST_LOG_ASSERTIONS 0
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#ifndef BEAST_CATCH_UNHANDLED_EXCEPTIONS
|
||||
#define BEAST_CATCH_UNHANDLED_EXCEPTIONS 1
|
||||
#endif
|
||||
|
||||
#if BEAST_DEBUG && ! defined (BEAST_CHECK_MEMORY_LEAKS)
|
||||
#define BEAST_CHECK_MEMORY_LEAKS 1
|
||||
#endif
|
||||
|
||||
#ifndef BEAST_DISABLE_CONTRACT_CHECKS
|
||||
#define BEAST_DISABLE_CONTRACT_CHECKS 0
|
||||
#endif
|
||||
|
||||
#ifndef BEAST_COMPILER_CHECKS_SOCKET_OVERRIDES
|
||||
#define BEAST_COMPILER_CHECKS_SOCKET_OVERRIDES 0
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#ifndef BEAST_DISABLE_BEAST_VERSION_PRINTING
|
||||
#define BEAST_DISABLE_BEAST_VERSION_PRINTING 0
|
||||
#endif
|
||||
|
||||
#ifndef BEAST_DONT_AUTOLINK_TO_WIN32_LIBRARIES
|
||||
#define BEAST_DONT_AUTOLINK_TO_WIN32_LIBRARIES 0
|
||||
#endif
|
||||
|
||||
#ifndef BEAST_INCLUDE_ZLIB_CODE
|
||||
#define BEAST_INCLUDE_ZLIB_CODE 1
|
||||
#endif
|
||||
|
||||
#ifndef BEAST_ZLIB_INCLUDE_PATH
|
||||
#define BEAST_ZLIB_INCLUDE_PATH <zlib.h>
|
||||
#endif
|
||||
|
||||
#ifndef BEAST_STRING_UTF_TYPE
|
||||
#define BEAST_STRING_UTF_TYPE 8
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#ifndef BEAST_USE_BOOST_FEATURES
|
||||
#define BEAST_USE_BOOST_FEATURES 0
|
||||
#endif
|
||||
|
||||
#endif
|
||||
82
Subtrees/beast/modules/beast_core/system/BeforeBoost.h
Normal file
82
Subtrees/beast/modules/beast_core/system/BeforeBoost.h
Normal file
@@ -0,0 +1,82 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_CORE_SYSTEM_BEFOREBOOST_H_INCLUDED
|
||||
#define BEAST_CORE_SYSTEM_BEFOREBOOST_H_INCLUDED
|
||||
|
||||
// This file should be included before including any boost headers.
|
||||
// If you don't include this file, and you include boost headers,
|
||||
// Beast will generate a compile error with an explanation of why.
|
||||
|
||||
#include "TargetPlatform.h"
|
||||
|
||||
#include "BeastConfigCheck.h"
|
||||
|
||||
#if BEAST_USE_BOOST_FEATURES
|
||||
|
||||
// Prevent <boost/bind/placeholders.hpp> from being included
|
||||
#ifdef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED
|
||||
# error "boost/bind.hpp must not be included before this file"
|
||||
#else
|
||||
# define BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED
|
||||
#endif
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/bind/arg.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/function.hpp>
|
||||
#include <boost/thread/tss.hpp> // for FifoFreeStoreWithTLS
|
||||
#include <boost/version.hpp>
|
||||
|
||||
#if BOOST_VERSION > 105499
|
||||
# error "This hasnt been tested with boost versions above 1.54"
|
||||
#endif
|
||||
|
||||
// This is a hack to fix boost's goofy placeholders going into the global
|
||||
// namespace. First we prevent the user from including boost/bind.hpp
|
||||
// before us. Then we define the include guard macro and include
|
||||
// boost/bind.hpp ourselves to get the declarations. Finally we repeat
|
||||
// the missing placeholder declarations but put them in a proper namespace.
|
||||
//
|
||||
// We put the placeholders in boost::placeholders so they can be accessed
|
||||
// explicitly to handle the common case of a "using namespace oost" directive
|
||||
// being in effect.
|
||||
//
|
||||
// Declarations based on boost/bind/placeholders.cpp
|
||||
//
|
||||
namespace boost {
|
||||
namespace placeholders {
|
||||
extern boost::arg<1> _1;
|
||||
extern boost::arg<2> _2;
|
||||
extern boost::arg<3> _3;
|
||||
extern boost::arg<4> _4;
|
||||
extern boost::arg<5> _5;
|
||||
extern boost::arg<6> _6;
|
||||
extern boost::arg<7> _7;
|
||||
extern boost::arg<8> _8;
|
||||
extern boost::arg<9> _9;
|
||||
}
|
||||
using namespace placeholders;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#endif
|
||||
@@ -3,10 +3,6 @@
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Portions of this file are from JUCE.
|
||||
Copyright (c) 2013 - Raw Material Software Ltd.
|
||||
Please visit http://www.juce.com
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
@@ -24,63 +20,13 @@
|
||||
#ifndef BEAST_CORE_SYSTEM_BOOSTINCLUDES_H_INCLUDED
|
||||
#define BEAST_CORE_SYSTEM_BOOSTINCLUDES_H_INCLUDED
|
||||
|
||||
// If boost is available we activate some boost-specific features.
|
||||
//
|
||||
#ifndef BEAST_BOOST_IS_AVAILABLE
|
||||
# define BEAST_BOOST_IS_AVAILABLE 0
|
||||
#endif
|
||||
#if BEAST_USE_BOOST_FEATURES
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#if BEAST_BOOST_IS_AVAILABLE
|
||||
|
||||
// Prevent <boost/bind/placeholders.hpp> from being included
|
||||
#ifdef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED
|
||||
# error "boost/bind.hpp must not be included before this file"
|
||||
#else
|
||||
# define BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED
|
||||
#endif
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/bind/arg.hpp>
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/function.hpp>
|
||||
#include <boost/thread/tss.hpp> // for FifoFreeStoreWithTLS
|
||||
#include <boost/version.hpp>
|
||||
|
||||
#if BOOST_VERSION > 105499
|
||||
# error "This hasnt been tested with boost versions above 1.54"
|
||||
#endif
|
||||
|
||||
// This is a hack to fix boost's goofy placeholders going into the global
|
||||
// namespace. First we prevent the user from including boost/bind.hpp
|
||||
// before us. Then we define the include guard macro and include
|
||||
// boost/bind.hpp ourselves to get the declarations. Finally we repeat
|
||||
// the missing placeholder declarations but put them in a proper namespace.
|
||||
//
|
||||
// We put the placeholders in boost::placeholders so they can be accessed
|
||||
// explicitly to handle the common case of a "using namespace oost" directive
|
||||
// being in effect.
|
||||
//
|
||||
// Declarations based on boost/bind/placeholders.cpp
|
||||
//
|
||||
namespace boost {
|
||||
namespace placeholders {
|
||||
extern boost::arg<1> _1;
|
||||
extern boost::arg<2> _2;
|
||||
extern boost::arg<3> _3;
|
||||
extern boost::arg<4> _4;
|
||||
extern boost::arg<5> _5;
|
||||
extern boost::arg<6> _6;
|
||||
extern boost::arg<7> _7;
|
||||
extern boost::arg<8> _8;
|
||||
extern boost::arg<9> _9;
|
||||
}
|
||||
using namespace placeholders;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#endif
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#if BEAST_USE_BOOST_FEATURES
|
||||
|
||||
namespace boost
|
||||
{
|
||||
|
||||
namespace placeholders
|
||||
{
|
||||
|
||||
boost::arg<1> _1;
|
||||
boost::arg<2> _2;
|
||||
boost::arg<3> _3;
|
||||
boost::arg<4> _4;
|
||||
boost::arg<5> _5;
|
||||
boost::arg<6> _6;
|
||||
boost::arg<7> _7;
|
||||
boost::arg<8> _8;
|
||||
boost::arg<9> _9;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,70 @@
|
||||
//------------------------------------------------------------------------------
|
||||
/*
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL , DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
||||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_CORE_SYSTEM_BOOSTPLACEHOLDERSFIX_H_INCLUDED
|
||||
#define BEAST_CORE_SYSTEM_BOOSTPLACEHOLDERSFIX_H_INCLUDED
|
||||
|
||||
#if BEAST_USE_BOOST_FEATURES
|
||||
|
||||
// Prevent <boost/bind/placeholders.hpp> from being included
|
||||
#ifdef BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED
|
||||
# error "boost/bind.hpp must not be included before this file"
|
||||
#else
|
||||
# define BOOST_BIND_PLACEHOLDERS_HPP_INCLUDED
|
||||
#endif
|
||||
|
||||
#include <boost/version.hpp>
|
||||
|
||||
#if BOOST_VERSION > 105499
|
||||
# error "This hasnt been tested with boost versions above 1.54"
|
||||
#endif
|
||||
|
||||
#include <boost/bind.hpp>
|
||||
#include <boost/bind/arg.hpp>
|
||||
|
||||
// This is a hack to fix boost's goofy placeholders going into the global
|
||||
// namespace. First we prevent the user from including boost/bind.hpp
|
||||
// before us. Then we define the include guard macro and include
|
||||
// boost/bind.hpp ourselves to get the declarations. Finally we repeat
|
||||
// the missing placeholder declarations but put them in a proper namespace.
|
||||
//
|
||||
// We put the placeholders in boost::placeholders so they can be accessed
|
||||
// explicitly to handle the common case of a "using namespace oost" directive
|
||||
// being in effect.
|
||||
//
|
||||
// Declarations based on boost/bind/placeholders.cpp
|
||||
//
|
||||
namespace boost {
|
||||
namespace placeholders {
|
||||
extern boost::arg<1> _1;
|
||||
extern boost::arg<2> _2;
|
||||
extern boost::arg<3> _3;
|
||||
extern boost::arg<4> _4;
|
||||
extern boost::arg<5> _5;
|
||||
extern boost::arg<6> _6;
|
||||
extern boost::arg<7> _7;
|
||||
extern boost::arg<8> _8;
|
||||
extern boost::arg<9> _9;
|
||||
}
|
||||
using namespace placeholders;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -276,7 +276,7 @@ struct trait_name
|
||||
*/
|
||||
|
||||
#ifndef BEAST_BIND_PLACEHOLDERS_N
|
||||
# if BEAST_MSVC && BEAST_BIND_USES_STD
|
||||
# if BEAST_MSVC && BEAST_FUNCTIONAL_USES_STD
|
||||
# define BEAST_BIND_PLACEHOLDERS_N 20 // Visual Studio 2012
|
||||
# else
|
||||
# define BEAST_BIND_PLACEHOLDERS_N 8 // Seems a reasonable number
|
||||
@@ -297,7 +297,7 @@ struct trait_name
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#if BEAST_BIND_USES_STD
|
||||
#if BEAST_FUNCTIONAL_USES_STD
|
||||
|
||||
namespace functional
|
||||
{
|
||||
@@ -400,7 +400,7 @@ using namespace placeholders;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#elif BEAST_BIND_USES_TR1
|
||||
#elif BEAST_FUNCTIONAL_USES_TR1
|
||||
|
||||
namespace functional
|
||||
{
|
||||
@@ -503,7 +503,7 @@ using namespace placeholders;
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#elif BEAST_BIND_USES_BOOST
|
||||
#elif BEAST_FUNCTIONAL_USES_BOOST
|
||||
|
||||
namespace functional
|
||||
{
|
||||
@@ -608,7 +608,7 @@ using namespace placeholders;
|
||||
|
||||
#else
|
||||
|
||||
#error Unknown bind source in beast_Functional.h
|
||||
#error Unknown bind source in Functional.h
|
||||
|
||||
#endif
|
||||
|
||||
@@ -3,10 +3,6 @@
|
||||
This file is part of Beast: https://github.com/vinniefalco/Beast
|
||||
Copyright 2013, Vinnie Falco <vinnie.falco@gmail.com>
|
||||
|
||||
Portions of this file are from JUCE.
|
||||
Copyright (c) 2013 - Raw Material Software Ltd.
|
||||
Please visit http://www.juce.com
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
@@ -21,36 +17,36 @@
|
||||
*/
|
||||
//==============================================================================
|
||||
|
||||
#ifndef BEAST_CORE_SYSTEM_BINDINCLUDES_H_INCLUDED
|
||||
#define BEAST_CORE_SYSTEM_BINDINCLUDES_H_INCLUDED
|
||||
#ifndef BEAST_CORE_SYSTEM_FUNCTIONALINCLUDES_H_INCLUDED
|
||||
#define BEAST_CORE_SYSTEM_FUNCTIONALINCLUDES_H_INCLUDED
|
||||
|
||||
// Choose a source of bind, placeholders, and function
|
||||
|
||||
#if !BEAST_BIND_USES_STD && !BEAST_BIND_USES_TR1 && !BEAST_BIND_USES_BOOST
|
||||
#if !BEAST_FUNCTIONAL_USES_STD && !BEAST_FUNCTIONAL_USES_TR1 && !BEAST_FUNCTIONAL_USES_BOOST
|
||||
# if BEAST_MSVC
|
||||
# define BEAST_BIND_USES_STD 1
|
||||
# define BEAST_FUNCTIONAL_USES_STD 1
|
||||
# elif BEAST_IOS || BEAST_MAC
|
||||
# include <ciso646> // detect version of std::lib
|
||||
# if BEAST_IOS && BEAST_BOOST_IS_AVAILABLE // Work-around for iOS bugs with bind.
|
||||
# define BEAST_BIND_USES_BOOST 1
|
||||
# if BEAST_IOS && BEAST_USE_BOOST_FEATURES // Work-around for iOS bugs with bind.
|
||||
# define BEAST_FUNCTIONAL_USES_BOOST 1
|
||||
# elif _LIBCPP_VERSION // libc++
|
||||
# define BEAST_BIND_USES_STD 1
|
||||
# define BEAST_FUNCTIONAL_USES_STD 1
|
||||
# else // libstdc++ (GNU)
|
||||
# define BEAST_BIND_USES_TR1 1
|
||||
# define BEAST_FUNCTIONAL_USES_TR1 1
|
||||
# endif
|
||||
# elif BEAST_LINUX || BEAST_BSD
|
||||
# define BEAST_BIND_USES_TR1 1
|
||||
# define BEAST_FUNCTIONAL_USES_TR1 1
|
||||
# else
|
||||
# define BEAST_BIND_USES_STD 1
|
||||
# define BEAST_FUNCTIONAL_USES_STD 1
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#if BEAST_BIND_USES_STD
|
||||
#if BEAST_FUNCTIONAL_USES_STD
|
||||
# include <functional>
|
||||
#elif BEAST_BIND_USES_TR1
|
||||
#elif BEAST_FUNCTIONAL_USES_TR1
|
||||
# include <tr1/functional>
|
||||
#elif BEAST_BIND_USES_BOOST
|
||||
// included in BoostIncludes.h
|
||||
#elif BEAST_FUNCTIONAL_USES_BOOST
|
||||
// included in BoostPlaceholdersFix.h
|
||||
#endif
|
||||
|
||||
#endif
|
||||
@@ -47,7 +47,7 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#include "beast_PlatformDefs.h"
|
||||
#include "PlatformDefs.h"
|
||||
|
||||
// Now we'll include some common OS headers..
|
||||
#if BEAST_MSVC
|
||||
@@ -30,7 +30,7 @@
|
||||
see BeastConfig.h.
|
||||
*/
|
||||
|
||||
#include "../beast_core/system/beast_TargetPlatform.h"
|
||||
#include "../beast_core/system/TargetPlatform.h"
|
||||
|
||||
#if BEAST_IOS || BEAST_MAC
|
||||
# define BEAST_HAVE_NATIVE_SQLITE 1
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "BeastConfig.h"
|
||||
|
||||
#include "beast/modules/beast_core/beast_core.h" // Must come before <boost/bind.hpp>
|
||||
#include "beast/modules/beast_core/beast_core.h"
|
||||
|
||||
#include <boost/bimap.hpp>
|
||||
#include <boost/bimap/list_of.hpp>
|
||||
|
||||
@@ -7,8 +7,6 @@
|
||||
#ifndef RIPPLE_APP_H_INCLUDED
|
||||
#define RIPPLE_APP_H_INCLUDED
|
||||
|
||||
#include "beast/modules/beast_core/beast_core.h" // Must come before <boost/bind.hpp>
|
||||
|
||||
#if BEAST_LINUX || BEAST_MAC || BEAST_BSD
|
||||
#include <sys/resource.h>
|
||||
#endif
|
||||
@@ -19,6 +17,7 @@
|
||||
// purely abstract and move implementation into .cpp files.
|
||||
//
|
||||
|
||||
#include "beast/modules/beast_core/system/BeforeBoost.h" // must come first
|
||||
#include <boost/algorithm/string/predicate.hpp>
|
||||
#include <boost/array.hpp>
|
||||
#include <boost/asio/read_until.hpp>
|
||||
|
||||
@@ -6,8 +6,7 @@
|
||||
|
||||
#include "BeastConfig.h"
|
||||
|
||||
#include "beast/modules/beast_core/beast_core.h" // Must come before <boost/bind.hpp>
|
||||
|
||||
#include "beast/modules/beast_core/system/BeforeBoost.h" // must come first
|
||||
#include <boost/bimap.hpp>
|
||||
#include <boost/bimap/multiset_of.hpp>
|
||||
#include <boost/bimap/unordered_set_of.hpp>
|
||||
|
||||
@@ -39,8 +39,7 @@
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
#include "beast/modules/beast_core/beast_core.h" // Must come before <boost/bind.hpp>
|
||||
|
||||
#include "beast/modules/beast_core/system/BeforeBoost.h" // must come first
|
||||
#include "system/ripple_BoostIncludes.h"
|
||||
|
||||
#include "system/ripple_OpenSSLIncludes.h"
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#ifndef RIPPLE_HYPERLEVELDB_RIPPLEHEADER
|
||||
#define RIPPLE_HYPERLEVELDB_RIPPLEHEADER
|
||||
|
||||
#include "beast/modules/beast_core/system/beast_TargetPlatform.h"
|
||||
#include "beast/modules/beast_core/system/TargetPlatform.h"
|
||||
|
||||
#if ! BEAST_WIN32
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#include "ripple_leveldb.h"
|
||||
|
||||
#include "beast/modules/beast_core/system/beast_TargetPlatform.h"
|
||||
#include "beast/modules/beast_core/system/TargetPlatform.h"
|
||||
|
||||
// Set the appropriate LevelDB platform macro based on our platform.
|
||||
//
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#ifndef RIPPLE_MDB_H_INCLUDED
|
||||
#define RIPPLE_MDB_H_INCLUDED
|
||||
|
||||
#include "beast/modules/beast_core/system/beast_TargetPlatform.h"
|
||||
#include "beast/modules/beast_core/system/TargetPlatform.h"
|
||||
|
||||
#if ! BEAST_WIN32
|
||||
#define RIPPLE_MDB_AVAILABLE 1
|
||||
|
||||
@@ -12,8 +12,7 @@
|
||||
|
||||
#include "BeastConfig.h"
|
||||
|
||||
#include "beast/modules/beast_core/beast_core.h" // Must come before <boost/bind.hpp>
|
||||
|
||||
#include "beast/modules/beast_core/system/BeforeBoost.h" // must come first
|
||||
#include <boost/version.hpp>
|
||||
#include <boost/asio/io_service.hpp>
|
||||
#include <boost/asio/ssl.hpp>
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
#ifndef RIPPLE_NET_H_INCLUDED
|
||||
#define RIPPLE_NET_H_INCLUDED
|
||||
|
||||
#include "beast/modules/beast_core/beast_core.h" // Must come before <boost/bind.hpp>
|
||||
|
||||
#include "beast/modules/beast_core/system/BeforeBoost.h" // must come first
|
||||
#include <boost/unordered_set.hpp> // For InfoSub
|
||||
|
||||
#include "beast/modules/beast_asio/beast_asio.h"
|
||||
|
||||
Reference in New Issue
Block a user