From f2c09dd3af7396544d9ea63b1f61721e8655cbe3 Mon Sep 17 00:00:00 2001 From: bolero-MURAKAMI Date: Sun, 6 Dec 2015 14:34:37 +0900 Subject: [PATCH] net.endian: resolution dependence on Boost --- .../test/random/test/distribution_generic.hpp | 87 +++++ libs/test/random/test/engine_generic.hpp | 73 +++++ sprout/config/auto_config.hpp | 22 +- sprout/config/compiler/gcc.hpp | 30 +- sprout/config/stdlib.hpp | 5 + sprout/config/stdlib/dinkumware.hpp | 7 +- sprout/config/stdlib/libcpp.hpp | 1 + sprout/config/stdlib/libstdcpp3.hpp | 44 ++- sprout/config/suffix.hpp | 51 ++- sprout/config/user.hpp | 64 ++++ sprout/net/endian.hpp | 298 ++++++++++-------- sprout/predef.hpp | 21 ++ sprout/predef/architecture.hpp | 30 ++ sprout/predef/architecture/alpha.hpp | 38 +++ sprout/predef/architecture/arm.hpp | 41 +++ sprout/predef/architecture/blackfin.hpp | 26 ++ sprout/predef/architecture/convex.hpp | 44 +++ sprout/predef/architecture/ia64.hpp | 26 ++ sprout/predef/architecture/m68k.hpp | 47 +++ sprout/predef/architecture/mips.hpp | 45 +++ sprout/predef/architecture/parisc.hpp | 38 +++ sprout/predef/architecture/ppc.hpp | 39 +++ sprout/predef/architecture/pyramid.hpp | 26 ++ sprout/predef/architecture/rs6k.hpp | 34 ++ sprout/predef/architecture/sparc.hpp | 35 ++ sprout/predef/architecture/superh.hpp | 44 +++ sprout/predef/architecture/sys370.hpp | 26 ++ sprout/predef/architecture/sys390.hpp | 26 ++ sprout/predef/architecture/x86.hpp | 28 ++ sprout/predef/architecture/x86/32.hpp | 51 +++ sprout/predef/architecture/x86/64.hpp | 28 ++ sprout/predef/architecture/z.hpp | 26 ++ sprout/predef/compiler.hpp | 42 +++ sprout/predef/compiler/borland.hpp | 38 +++ sprout/predef/compiler/clang.hpp | 34 ++ sprout/predef/compiler/comeau.hpp | 38 +++ sprout/predef/compiler/compaq.hpp | 41 +++ sprout/predef/compiler/diab.hpp | 33 ++ sprout/predef/compiler/digitalmars.hpp | 33 ++ sprout/predef/compiler/dignus.hpp | 33 ++ sprout/predef/compiler/edg.hpp | 33 ++ sprout/predef/compiler/ekopath.hpp | 34 ++ sprout/predef/compiler/gcc.hpp | 41 +++ sprout/predef/compiler/gcc_xml.hpp | 32 ++ sprout/predef/compiler/greenhills.hpp | 41 +++ sprout/predef/compiler/hp_acc.hpp | 38 +++ sprout/predef/compiler/iar.hpp | 33 ++ sprout/predef/compiler/ibm.hpp | 44 +++ sprout/predef/compiler/intel.hpp | 39 +++ sprout/predef/compiler/kai.hpp | 33 ++ sprout/predef/compiler/llvm.hpp | 33 ++ sprout/predef/compiler/metaware.hpp | 32 ++ sprout/predef/compiler/metrowerks.hpp | 51 +++ sprout/predef/compiler/microtec.hpp | 32 ++ sprout/predef/compiler/mpw.hpp | 38 +++ sprout/predef/compiler/palm.hpp | 33 ++ sprout/predef/compiler/pgi.hpp | 38 +++ sprout/predef/compiler/sgi_mipspro.hpp | 41 +++ sprout/predef/compiler/sunpro.hpp | 49 +++ sprout/predef/compiler/tendra.hpp | 32 ++ sprout/predef/compiler/visualc.hpp | 51 +++ sprout/predef/compiler/watcom.hpp | 33 ++ sprout/predef/detail/comp_detected.hpp | 17 + sprout/predef/detail/endian_compat.hpp | 27 ++ sprout/predef/detail/os_detected.hpp | 17 + sprout/predef/detail/platform_detected.hpp | 17 + sprout/predef/hardware.hpp | 14 + sprout/predef/hardware/simd.hpp | 47 +++ sprout/predef/hardware/simd/arm.hpp | 29 ++ sprout/predef/hardware/simd/arm/versions.hpp | 16 + sprout/predef/hardware/simd/ppc.hpp | 35 ++ sprout/predef/hardware/simd/ppc/versions.hpp | 20 ++ sprout/predef/hardware/simd/x86.hpp | 59 ++++ sprout/predef/hardware/simd/x86/versions.hpp | 36 +++ sprout/predef/hardware/simd/x86_amd.hpp | 40 +++ .../predef/hardware/simd/x86_amd/versions.hpp | 20 ++ sprout/predef/language.hpp | 16 + sprout/predef/language/objc.hpp | 26 ++ sprout/predef/language/stdc.hpp | 35 ++ sprout/predef/language/stdcpp.hpp | 61 ++++ sprout/predef/library.hpp | 15 + sprout/predef/library/c.hpp | 18 ++ sprout/predef/library/c/gnu.hpp | 40 +++ sprout/predef/library/c/prefix.hpp | 14 + sprout/predef/library/c/uc.hpp | 29 ++ sprout/predef/library/c/vms.hpp | 28 ++ sprout/predef/library/c/zos.hpp | 36 +++ sprout/predef/library/std.hpp | 24 ++ sprout/predef/library/std/cxx.hpp | 28 ++ sprout/predef/library/std/dinkumware.hpp | 32 ++ sprout/predef/library/std/libcomo.hpp | 28 ++ sprout/predef/library/std/modena.hpp | 27 ++ sprout/predef/library/std/msl.hpp | 32 ++ sprout/predef/library/std/prefix.hpp | 14 + sprout/predef/library/std/roguewave.hpp | 36 +++ sprout/predef/library/std/sgi.hpp | 32 ++ sprout/predef/library/std/stdcpp3.hpp | 32 ++ sprout/predef/library/std/stlport.hpp | 38 +++ sprout/predef/library/std/vacpp.hpp | 27 ++ sprout/predef/make.hpp | 41 +++ sprout/predef/os.hpp | 31 ++ sprout/predef/os/aix.hpp | 42 +++ sprout/predef/os/amigaos.hpp | 27 ++ sprout/predef/os/android.hpp | 27 ++ sprout/predef/os/beos.hpp | 27 ++ sprout/predef/os/bsd.hpp | 60 ++++ sprout/predef/os/bsd/bsdi.hpp | 32 ++ sprout/predef/os/bsd/dragonfly.hpp | 34 ++ sprout/predef/os/bsd/free.hpp | 43 +++ sprout/predef/os/bsd/net.hpp | 63 ++++ sprout/predef/os/bsd/open.hpp | 127 ++++++++ sprout/predef/os/cygwin.hpp | 27 ++ sprout/predef/os/haiku.hpp | 27 ++ sprout/predef/os/hpux.hpp | 27 ++ sprout/predef/os/ios.hpp | 27 ++ sprout/predef/os/irix.hpp | 27 ++ sprout/predef/os/linux.hpp | 27 ++ sprout/predef/os/macos.hpp | 34 ++ sprout/predef/os/os400.hpp | 27 ++ sprout/predef/os/qnxnto.hpp | 36 +++ sprout/predef/os/solaris.hpp | 27 ++ sprout/predef/os/unix.hpp | 39 +++ sprout/predef/os/vms.hpp | 32 ++ sprout/predef/os/windows.hpp | 28 ++ sprout/predef/other.hpp | 14 + sprout/predef/other/endian.hpp | 142 +++++++++ sprout/predef/platform.hpp | 18 ++ sprout/predef/platform/mingw.hpp | 44 +++ sprout/predef/platform/windows_desktop.hpp | 28 ++ sprout/predef/platform/windows_phone.hpp | 28 ++ sprout/predef/platform/windows_runtime.hpp | 28 ++ sprout/predef/platform/windows_store.hpp | 28 ++ sprout/predef/version_number.hpp | 40 +++ sprout/type_traits/enable_if.hpp | 2 + sprout/type_traits/enable_if_has_type.hpp | 24 ++ sprout/utility/ignore_unused.hpp | 21 ++ sprout/utility/operation_ext.hpp | 1 + testspr/header_all.hpp | 1 + testspr/typeinfo.hpp | 58 ++-- 139 files changed, 4800 insertions(+), 202 deletions(-) create mode 100644 libs/test/random/test/distribution_generic.hpp create mode 100644 libs/test/random/test/engine_generic.hpp create mode 100644 sprout/config/user.hpp create mode 100644 sprout/predef.hpp create mode 100644 sprout/predef/architecture.hpp create mode 100644 sprout/predef/architecture/alpha.hpp create mode 100644 sprout/predef/architecture/arm.hpp create mode 100644 sprout/predef/architecture/blackfin.hpp create mode 100644 sprout/predef/architecture/convex.hpp create mode 100644 sprout/predef/architecture/ia64.hpp create mode 100644 sprout/predef/architecture/m68k.hpp create mode 100644 sprout/predef/architecture/mips.hpp create mode 100644 sprout/predef/architecture/parisc.hpp create mode 100644 sprout/predef/architecture/ppc.hpp create mode 100644 sprout/predef/architecture/pyramid.hpp create mode 100644 sprout/predef/architecture/rs6k.hpp create mode 100644 sprout/predef/architecture/sparc.hpp create mode 100644 sprout/predef/architecture/superh.hpp create mode 100644 sprout/predef/architecture/sys370.hpp create mode 100644 sprout/predef/architecture/sys390.hpp create mode 100644 sprout/predef/architecture/x86.hpp create mode 100644 sprout/predef/architecture/x86/32.hpp create mode 100644 sprout/predef/architecture/x86/64.hpp create mode 100644 sprout/predef/architecture/z.hpp create mode 100644 sprout/predef/compiler.hpp create mode 100644 sprout/predef/compiler/borland.hpp create mode 100644 sprout/predef/compiler/clang.hpp create mode 100644 sprout/predef/compiler/comeau.hpp create mode 100644 sprout/predef/compiler/compaq.hpp create mode 100644 sprout/predef/compiler/diab.hpp create mode 100644 sprout/predef/compiler/digitalmars.hpp create mode 100644 sprout/predef/compiler/dignus.hpp create mode 100644 sprout/predef/compiler/edg.hpp create mode 100644 sprout/predef/compiler/ekopath.hpp create mode 100644 sprout/predef/compiler/gcc.hpp create mode 100644 sprout/predef/compiler/gcc_xml.hpp create mode 100644 sprout/predef/compiler/greenhills.hpp create mode 100644 sprout/predef/compiler/hp_acc.hpp create mode 100644 sprout/predef/compiler/iar.hpp create mode 100644 sprout/predef/compiler/ibm.hpp create mode 100644 sprout/predef/compiler/intel.hpp create mode 100644 sprout/predef/compiler/kai.hpp create mode 100644 sprout/predef/compiler/llvm.hpp create mode 100644 sprout/predef/compiler/metaware.hpp create mode 100644 sprout/predef/compiler/metrowerks.hpp create mode 100644 sprout/predef/compiler/microtec.hpp create mode 100644 sprout/predef/compiler/mpw.hpp create mode 100644 sprout/predef/compiler/palm.hpp create mode 100644 sprout/predef/compiler/pgi.hpp create mode 100644 sprout/predef/compiler/sgi_mipspro.hpp create mode 100644 sprout/predef/compiler/sunpro.hpp create mode 100644 sprout/predef/compiler/tendra.hpp create mode 100644 sprout/predef/compiler/visualc.hpp create mode 100644 sprout/predef/compiler/watcom.hpp create mode 100644 sprout/predef/detail/comp_detected.hpp create mode 100644 sprout/predef/detail/endian_compat.hpp create mode 100644 sprout/predef/detail/os_detected.hpp create mode 100644 sprout/predef/detail/platform_detected.hpp create mode 100644 sprout/predef/hardware.hpp create mode 100644 sprout/predef/hardware/simd.hpp create mode 100644 sprout/predef/hardware/simd/arm.hpp create mode 100644 sprout/predef/hardware/simd/arm/versions.hpp create mode 100644 sprout/predef/hardware/simd/ppc.hpp create mode 100644 sprout/predef/hardware/simd/ppc/versions.hpp create mode 100644 sprout/predef/hardware/simd/x86.hpp create mode 100644 sprout/predef/hardware/simd/x86/versions.hpp create mode 100644 sprout/predef/hardware/simd/x86_amd.hpp create mode 100644 sprout/predef/hardware/simd/x86_amd/versions.hpp create mode 100644 sprout/predef/language.hpp create mode 100644 sprout/predef/language/objc.hpp create mode 100644 sprout/predef/language/stdc.hpp create mode 100644 sprout/predef/language/stdcpp.hpp create mode 100644 sprout/predef/library.hpp create mode 100644 sprout/predef/library/c.hpp create mode 100644 sprout/predef/library/c/gnu.hpp create mode 100644 sprout/predef/library/c/prefix.hpp create mode 100644 sprout/predef/library/c/uc.hpp create mode 100644 sprout/predef/library/c/vms.hpp create mode 100644 sprout/predef/library/c/zos.hpp create mode 100644 sprout/predef/library/std.hpp create mode 100644 sprout/predef/library/std/cxx.hpp create mode 100644 sprout/predef/library/std/dinkumware.hpp create mode 100644 sprout/predef/library/std/libcomo.hpp create mode 100644 sprout/predef/library/std/modena.hpp create mode 100644 sprout/predef/library/std/msl.hpp create mode 100644 sprout/predef/library/std/prefix.hpp create mode 100644 sprout/predef/library/std/roguewave.hpp create mode 100644 sprout/predef/library/std/sgi.hpp create mode 100644 sprout/predef/library/std/stdcpp3.hpp create mode 100644 sprout/predef/library/std/stlport.hpp create mode 100644 sprout/predef/library/std/vacpp.hpp create mode 100644 sprout/predef/make.hpp create mode 100644 sprout/predef/os.hpp create mode 100644 sprout/predef/os/aix.hpp create mode 100644 sprout/predef/os/amigaos.hpp create mode 100644 sprout/predef/os/android.hpp create mode 100644 sprout/predef/os/beos.hpp create mode 100644 sprout/predef/os/bsd.hpp create mode 100644 sprout/predef/os/bsd/bsdi.hpp create mode 100644 sprout/predef/os/bsd/dragonfly.hpp create mode 100644 sprout/predef/os/bsd/free.hpp create mode 100644 sprout/predef/os/bsd/net.hpp create mode 100644 sprout/predef/os/bsd/open.hpp create mode 100644 sprout/predef/os/cygwin.hpp create mode 100644 sprout/predef/os/haiku.hpp create mode 100644 sprout/predef/os/hpux.hpp create mode 100644 sprout/predef/os/ios.hpp create mode 100644 sprout/predef/os/irix.hpp create mode 100644 sprout/predef/os/linux.hpp create mode 100644 sprout/predef/os/macos.hpp create mode 100644 sprout/predef/os/os400.hpp create mode 100644 sprout/predef/os/qnxnto.hpp create mode 100644 sprout/predef/os/solaris.hpp create mode 100644 sprout/predef/os/unix.hpp create mode 100644 sprout/predef/os/vms.hpp create mode 100644 sprout/predef/os/windows.hpp create mode 100644 sprout/predef/other.hpp create mode 100644 sprout/predef/other/endian.hpp create mode 100644 sprout/predef/platform.hpp create mode 100644 sprout/predef/platform/mingw.hpp create mode 100644 sprout/predef/platform/windows_desktop.hpp create mode 100644 sprout/predef/platform/windows_phone.hpp create mode 100644 sprout/predef/platform/windows_runtime.hpp create mode 100644 sprout/predef/platform/windows_store.hpp create mode 100644 sprout/predef/version_number.hpp create mode 100644 sprout/type_traits/enable_if_has_type.hpp create mode 100644 sprout/utility/ignore_unused.hpp diff --git a/libs/test/random/test/distribution_generic.hpp b/libs/test/random/test/distribution_generic.hpp new file mode 100644 index 00000000..aa58e485 --- /dev/null +++ b/libs/test/random/test/distribution_generic.hpp @@ -0,0 +1,87 @@ +#ifndef SPROUT_LIBS_RANDOM_TEST_DISTRIBUTION_GENERIC_HPP +#define SPROUT_LIBS_RANDOM_TEST_DISTRIBUTION_GENERIC_HPP + +#include +#include +#include +#include +#include + +namespace testspr { + template + void random_distribution_test_generic() { + using namespace sprout; + { + SPROUT_STATIC_CONSTEXPR auto parm = typename Distribution::param_type(); + + SPROUT_STATIC_CONSTEXPR auto dist1 = Distribution(parm); + SPROUT_STATIC_CONSTEXPR auto dist2 = Distribution(parm); + + // min + // max + TESTSPR_BOTH_ASSERT(dist1.min() <= dist1.max()); + + // param + TESTSPR_BOTH_ASSERT(parm == dist1.param()); + { + auto dist_temp = Distribution(); + dist_temp.param(parm); + TESTSPR_ASSERT(dist_temp == dist1); + } + + // operator== + // operator!= + TESTSPR_BOTH_ASSERT(dist1 == dist2); + TESTSPR_BOTH_ASSERT(!(dist1 != dist2)); + + { + std::string s; + + // operator<< + { + std::ostringstream os; + os << dist1; + // ??? WORKAROUND: for Clang +#if !defined(__clang__) + TESTSPR_ASSERT(!!os); +#endif + s = os.str(); + } + + auto dist_temp = Distribution(); + + // operator>> + { + std::istringstream is(s); + is >> dist_temp; + // ??? WORKAROUND: for Clang +#if !defined(__clang__) + TESTSPR_ASSERT(!!is); +#endif + } + + TESTSPR_ASSERT(dist_temp == dist1); + } + + // operator() + { + SPROUT_STATIC_CONSTEXPR auto eng = Engine(SPROUT_UNIQUE_SEED); + { + SPROUT_STATIC_CONSTEXPR auto rnd = dist1(eng); + + // result + TESTSPR_BOTH_ASSERT(dist1.min() <= rnd.result()); + TESTSPR_BOTH_ASSERT(rnd.result() <= dist1.max()); + + // engine + TESTSPR_BOTH_ASSERT(rnd.engine().min() <= rnd.engine().max()); + + // distribution + TESTSPR_BOTH_ASSERT(rnd.distribution().min() <= rnd.distribution().max()); + } + } + } + } +} // namespace testspr + +#endif // #ifndef SPROUT_LIBS_RANDOM_TEST_DISTRIBUTION_GENERIC_HPP diff --git a/libs/test/random/test/engine_generic.hpp b/libs/test/random/test/engine_generic.hpp new file mode 100644 index 00000000..b7c2fc0b --- /dev/null +++ b/libs/test/random/test/engine_generic.hpp @@ -0,0 +1,73 @@ +#ifndef SPROUT_LIBS_RANDOM_TEST_ENGINE_GENERIC_HPP +#define SPROUT_LIBS_RANDOM_TEST_ENGINE_GENERIC_HPP + +#include +#include +#include +#include + +namespace testspr { + template + void random_engine_test_generic() { + using namespace sprout; + { + SPROUT_STATIC_CONSTEXPR auto eng1 = Engine(SPROUT_UNIQUE_SEED); + SPROUT_STATIC_CONSTEXPR auto eng2 = Engine(SPROUT_UNIQUE_SEED); + + // min + // max + TESTSPR_BOTH_ASSERT(eng1.min() <= eng1.max()); + + // operator== + // operator!= + TESTSPR_BOTH_ASSERT(eng1 == eng1); + TESTSPR_BOTH_ASSERT(!(eng1 == eng2)); + TESTSPR_BOTH_ASSERT(eng1 != eng2); + TESTSPR_BOTH_ASSERT(!(eng1 != eng1)); + + { + std::string s; + + // operator<< + { + std::ostringstream os; + os << eng1; + // ??? WORKAROUND: for Clang +#if !defined(__clang__) + TESTSPR_ASSERT(!!os); +#endif + + s = os.str(); + } + + auto eng_temp = Engine(); + + // operator>> + { + std::istringstream is(s); + is >> eng_temp; + // ??? WORKAROUND: for Clang +#if !defined(__clang__) + TESTSPR_ASSERT(!!is); +#endif + } + + //TESTSPR_ASSERT(eng_temp == eng1); + } + + // operator() + { + SPROUT_STATIC_CONSTEXPR auto rnd = eng1(); + + // result + TESTSPR_BOTH_ASSERT(eng1.min() <= rnd.result()); + TESTSPR_BOTH_ASSERT(rnd.result() <= eng1.max()); + + // engine + TESTSPR_BOTH_ASSERT(rnd.engine().min() <= rnd.engine().max()); + } + } + } +} // namespace testspr + +#endif // #ifndef SPROUT_LIBS_RANDOM_TEST_ENGINE_GENERIC_HPP diff --git a/sprout/config/auto_config.hpp b/sprout/config/auto_config.hpp index 58d22247..fa94dc07 100644 --- a/sprout/config/auto_config.hpp +++ b/sprout/config/auto_config.hpp @@ -15,7 +15,7 @@ // SPROUT_CONFIG_DISABLE_CONSTEXPR // #ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR -# ifdef SPROUT_NO_CXX11_CONSTEXPR +# if defined(SPROUT_NO_CXX11_CONSTEXPR) && !defined(SPROUT_CONFIG_FORCE_CONSTEXPR) # define SPROUT_CONFIG_DISABLE_CONSTEXPR # endif // #ifdef SPROUT_NO_CXX11_CONSTEXPR #endif // #ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR @@ -24,7 +24,7 @@ // SPROUT_CONFIG_DISABLE_CXX14_CONSTEXPR // #ifndef SPROUT_CONFIG_DISABLE_CXX14_CONSTEXPR -# ifdef SPROUT_NO_CXX14_CONSTEXPR +# if defined(SPROUT_NO_CXX14_CONSTEXPR) && !defined(SPROUT_CONFIG_FORCE_CXX14_CONSTEXPR) # define SPROUT_CONFIG_DISABLE_CXX14_CONSTEXPR # endif // #ifdef SPROUT_NO_CXX14_CONSTEXPR #endif // #ifndef SPROUT_CONFIG_DISABLE_CONSTEXPR @@ -33,7 +33,7 @@ // SPROUT_CONFIG_DISABLE_DEFAULTED_FUNCTIONS // #ifndef SPROUT_CONFIG_DISABLE_DEFAULTED_FUNCTIONS -# ifdef SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS +# if defined(SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS) && !defined(SPROUT_CONFIG_FORCE_DEFAULTED_FUNCTIONS) # define SPROUT_CONFIG_DISABLE_DEFAULTED_FUNCTIONS # endif // #ifdef SPROUT_NO_CXX11_CONSTEXPR #endif // #ifndef SPROUT_CONFIG_DISABLE_DEFAULTED_FUNCTIONS @@ -42,7 +42,7 @@ // SPROUT_CONFIG_DISABLE_DELETED_FUNCTIONS // #ifndef SPROUT_CONFIG_DISABLE_DELETED_FUNCTIONS -# ifdef SPROUT_NO_CXX11_DELETED_FUNCTIONS +# if defined(SPROUT_NO_CXX11_DELETED_FUNCTIONS) && !defined(SPROUT_CONFIG_FORCE_DELETED_FUNCTIONS) # define SPROUT_CONFIG_DISABLE_DELETED_FUNCTIONS # endif // #ifdef SPROUT_NO_CXX11_CONSTEXPR #endif // #ifndef SPROUT_CONFIG_DISABLE_DELETED_FUNCTIONS @@ -51,7 +51,7 @@ // SPROUT_CONFIG_DISABLE_EXPLICIT_CONVERSION_OPERATORS // #ifndef SPROUT_CONFIG_DISABLE_EXPLICIT_CONVERSION_OPERATORS -# ifdef SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS +# if defined(SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS) && !defined(SPROUT_CONFIG_FORCE_EXPLICIT_CONVERSION_OPERATORS) # define SPROUT_CONFIG_DISABLE_EXPLICIT_CONVERSION_OPERATORS # endif // #ifdef SPROUT_NO_CXX11_CONSTEXPR #endif // #ifndef SPROUT_CONFIG_DISABLE_EXPLICIT_CONVERSION_OPERATORS @@ -60,7 +60,7 @@ // SPROUT_CONFIG_DISABLE_NOEXCEPT // #ifndef SPROUT_CONFIG_DISABLE_NOEXCEPT -# ifdef SPROUT_NO_CXX11_NOEXCEPT +# if defined(SPROUT_NO_CXX11_NOEXCEPT) && !defined(SPROUT_CONFIG_FORCE_NOEXCEPT) # define SPROUT_CONFIG_DISABLE_NOEXCEPT # endif // #ifdef SPROUT_NO_CXX11_NOEXCEPT #endif // #ifndef SPROUT_CONFIG_DISABLE_NOEXCEPT @@ -69,7 +69,7 @@ // SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES // #ifndef SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES -# ifdef SPROUT_NO_CXX11_TEMPLATE_ALIASES +# if defined(SPROUT_NO_CXX11_TEMPLATE_ALIASES) && !defined(SPROUT_CONFIG_FORCE_TEMPLATE_ALIASES) # define SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES # endif // #ifdef SPROUT_NO_CXX11_TEMPLATE_ALIASES #endif // #ifndef SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES @@ -78,7 +78,7 @@ // SPROUT_USE_USER_DEFINED_LITERALS // #ifndef SPROUT_USE_USER_DEFINED_LITERALS -# ifdef SPROUT_NO_CXX11_USER_DEFINED_LITERALS +# if defined(SPROUT_NO_CXX11_USER_DEFINED_LITERALS) && !defined(SPROUT_CONFIG_FORCE_USER_DEFINED_LITERALS) # define SPROUT_CONFIG_DISABLE_USER_DEFINED_LITERALS # endif // #ifdef SPROUT_NO_CXX11_USER_DEFINED_LITERALS #endif // #ifndef SPROUT_USE_USER_DEFINED_LITERALS @@ -87,7 +87,7 @@ // SPROUT_CONFIG_DISABLE_DELEGATING_CONSTRUCTORS // #ifndef SPROUT_CONFIG_DISABLE_DELEGATING_CONSTRUCTORS -# ifdef SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS +# if defined(SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS) && !defined(SPROUT_CONFIG_FORCE_DELEGATING_CONSTRUCTORS) # define SPROUT_CONFIG_DISABLE_DELEGATING_CONSTRUCTORS # endif // #ifdef SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS #endif // #ifndef SPROUT_CONFIG_DISABLE_DELEGATING_CONSTRUCTORS @@ -96,7 +96,7 @@ // SPROUT_CONFIG_DISABLE_UNICODE_LITERALS // #ifndef SPROUT_CONFIG_DISABLE_UNICODE_LITERALS -# ifdef SPROUT_NO_CXX11_UNICODE_LITERALS +# if defined(SPROUT_NO_CXX11_UNICODE_LITERALS) && !defined(SPROUT_CONFIG_FORCE_UNICODE_LITERALS) # define SPROUT_CONFIG_DISABLE_UNICODE_LITERALS # endif // #ifdef SPROUT_NO_CXX11_UNICODE_LITERALS #endif // #ifndef SPROUT_CONFIG_DISABLE_UNICODE_LITERALS @@ -105,7 +105,7 @@ // SPROUT_CONFIG_DISABLE_VARIABLE_TEMPLATES // #ifndef SPROUT_CONFIG_DISABLE_VARIABLE_TEMPLATES -# ifdef SPROUT_NO_CXX14_VARIABLE_TEMPLATES +# if defined(SPROUT_NO_CXX14_VARIABLE_TEMPLATES) && !defined(SPROUT_CONFIG_FORCE_VARIABLE_TEMPLATES) # define SPROUT_CONFIG_DISABLE_VARIABLE_TEMPLATES # endif // #ifdef SPROUT_NO_CXX14_VARIABLE_TEMPLATES #endif // #ifndef SPROUT_CONFIG_DISABLE_VARIABLE_TEMPLATES diff --git a/sprout/config/compiler/gcc.hpp b/sprout/config/compiler/gcc.hpp index 46f9b723..fd295db3 100644 --- a/sprout/config/compiler/gcc.hpp +++ b/sprout/config/compiler/gcc.hpp @@ -8,55 +8,59 @@ #ifndef SPROUT_CONFIG_COMPILER_GCC_HPP #define SPROUT_CONFIG_COMPILER_GCC_HPP -#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__)) +#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L) +# define SPROUT_GCC_CXX11 +#endif + +#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(SPROUT_GCC_CXX11)) # define SPROUT_NO_CXX11_CONSTEXPR #endif -#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__)) +#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(SPROUT_GCC_CXX11)) # define SPROUT_NO_CXX11_DEFAULTED_FUNCTIONS #endif -#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__)) +#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(SPROUT_GCC_CXX11)) # define SPROUT_NO_CXX11_DELETED_FUNCTIONS #endif -#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)) +#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(SPROUT_GCC_CXX11)) # define SPROUT_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS #endif -#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__)) +#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(SPROUT_GCC_CXX11)) # define SPROUT_NO_CXX11_NOEXCEPT #endif -#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__)) +#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(SPROUT_GCC_CXX11)) # define SPROUT_NO_CXX11_TEMPLATE_ALIASES #endif -#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__)) +#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(SPROUT_GCC_CXX11)) # define SPROUT_NO_CXX11_USER_DEFINED_LITERALS #endif -#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__)) +#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(SPROUT_GCC_CXX11)) # define SPROUT_NO_CXX11_DELEGATING_CONSTRUCTORS #endif -#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__)) +#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(SPROUT_GCC_CXX11)) # define SPROUT_NO_CXX11_UNICODE_LITERALS #endif -#if ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)) && defined(__GXX_EXPERIMENTAL_CXX0X__)) +#if ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 8)) && defined(SPROUT_GCC_CXX11)) # define SPROUT_NO_CXX11_ATTRIBUTES #endif -#if ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(__GXX_EXPERIMENTAL_CXX0X__)) +#if ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(SPROUT_GCC_CXX11)) # define SPROUT_HAS_CONSTEXPR_CMATH_FUNCTION #endif -#if ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(__GXX_EXPERIMENTAL_CXX0X__)) +#if ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(SPROUT_GCC_CXX11)) # define SPROUT_HAS_CONSTEXPR_COPYSIGN_FUNCTION #endif -#if ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(__GXX_EXPERIMENTAL_CXX0X__)) +#if ((__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)) && defined(SPROUT_GCC_CXX11)) # define SPROUT_HAS_CONSTEXPR_BIT_OPERATION #endif diff --git a/sprout/config/stdlib.hpp b/sprout/config/stdlib.hpp index 3aa8a1ea..0545cc1d 100644 --- a/sprout/config/stdlib.hpp +++ b/sprout/config/stdlib.hpp @@ -25,7 +25,12 @@ # include #else +#if !defined(__LIBCOMO__) && !defined(__STD_RWCOMPILER_H__) && !defined(_RWSTD_VER) \ + && !defined(_LIBCPP_VERSION) && !defined(__GLIBCPP__) && !defined(__GLIBCXX__) \ + && !defined(__STL_CONFIG_H) && !defined(__MSL_CPP__) && !defined(__IBMCPP__) \ + && !defined(MSIPL_COMPILE_H) && !defined(_YVALS) && !defined(_CPPLIB_VER) # include +#endif # if defined(__LIBCOMO__) # include diff --git a/sprout/config/stdlib/dinkumware.hpp b/sprout/config/stdlib/dinkumware.hpp index 192d6f83..9c6b7ad8 100644 --- a/sprout/config/stdlib/dinkumware.hpp +++ b/sprout/config/stdlib/dinkumware.hpp @@ -26,7 +26,7 @@ # define SPROUT_NO_CXX11_SMART_PTR #endif -#if (!defined(_HAS_TR1_IMPORTS) || (_HAS_TR1_IMPORTS+0 == 0)) && !defined(SPROUT_NO_CXX11_HDR_TUPLE) +#if (!defined(_HAS_TR1_IMPORTS) || (_HAS_TR1_IMPORTS+0 == 0)) && !defined(SPROUT_NO_CXX11_HDR_TUPLE) && (!defined(_CPPLIB_VER) || _CPPLIB_VER < 610) # define SPROUT_NO_CXX11_HDR_TUPLE #endif @@ -42,7 +42,10 @@ # define SPROUT_NO_CXX11_ATOMIC_SMART_PTR #endif -#define SPROUT_NO_CXX11_HDR_INITIALIZER_LIST +#if !defined(_CPPLIB_VER) || _CPPLIB_VER < 610 +# define SPROUT_NO_CXX11_HDR_INITIALIZER_LIST +# define SPROUT_NO_CXX11_HDR_ATOMIC +#endif #define SPROUT_NO_CXX14_INITIALIZER_LIST diff --git a/sprout/config/stdlib/libcpp.hpp b/sprout/config/stdlib/libcpp.hpp index a946a2e2..20341427 100644 --- a/sprout/config/stdlib/libcpp.hpp +++ b/sprout/config/stdlib/libcpp.hpp @@ -16,6 +16,7 @@ #define SPROUT_NO_CXX11_HDR_FUTURE #define SPROUT_NO_CXX11_HDR_TYPE_TRAITS #define SPROUT_NO_CXX11_ATOMIC_SMART_PTR +#define SPROUT_NO_CXX11_HDR_ATOMIC #include #if defined(_LIBCPP_VERSION) && (_LIBCPP_VERSION <= 1001) diff --git a/sprout/config/stdlib/libstdcpp3.hpp b/sprout/config/stdlib/libstdcpp3.hpp index d6ebcfbb..4df9c0a6 100644 --- a/sprout/config/stdlib/libstdcpp3.hpp +++ b/sprout/config/stdlib/libstdcpp3.hpp @@ -8,7 +8,11 @@ #ifndef SPROUT_CONFIG_STDLIB_LIBSTDCPP3_HPP #define SPROUT_CONFIG_STDLIB_LIBSTDCPP3_HPP -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) || !defined(__GXX_EXPERIMENTAL_CXX0X__) +#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103) +# define SPROUT_LIBSTDCXX11 +#endif + +#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) || !defined(SPROUT_LIBSTDCXX11) # define SPROUT_NO_CXX11_HDR_ARRAY # define SPROUT_NO_CXX11_HDR_REGEX # define SPROUT_NO_CXX11_HDR_TUPLE @@ -17,7 +21,7 @@ # define SPROUT_NO_CXX11_HDR_FUNCTIONAL #endif -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(__GXX_EXPERIMENTAL_CXX0X__) +#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 4) || !defined(SPROUT_LIBSTDCXX11) # define SPROUT_NO_CXX11_HDR_CONDITION_VARIABLE # define SPROUT_NO_CXX11_HDR_FORWARD_LIST # define SPROUT_NO_CXX11_HDR_INITIALIZER_LIST @@ -32,9 +36,9 @@ # define SPROUT_NO_CXX11_HDR_MUTEX #endif -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__) +#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(SPROUT_LIBSTDCXX11) # if defined(__clang__) -# if !__has_feature(cxx_constexpr) || !defined(__GXX_EXPERIMENTAL_CXX0X__) +# if !__has_feature(cxx_constexpr) || !defined(SPROUT_LIBSTDCXX11) # define SPROUT_NO_CXX11_CHAR_TRAITS # define SPROUT_NO_CXX11_NUMERIC_LIMITS # endif @@ -44,26 +48,42 @@ # endif #endif -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(__GXX_EXPERIMENTAL_CXX0X__) +#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 5) || !defined(SPROUT_LIBSTDCXX11) # define SPROUT_NO_CXX11_HDR_FUTURE # define SPROUT_NO_CXX11_HDR_RANDOM #endif -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__) +#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(SPROUT_LIBSTDCXX11) # define SPROUT_NO_CXX11_HDR_TYPEINDEX #endif -#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(__GXX_EXPERIMENTAL_CXX0X__) +#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) || !defined(SPROUT_LIBSTDCXX11) # define SPROUT_NO_CXX11_HDR_CHRONO # define SPROUT_NO_CXX11_ALLOCATOR #endif -#define SPROUT_NO_CXX11_HDR_THREAD -#define SPROUT_NO_CXX11_HDR_TYPE_TRAITS -#define SPROUT_NO_CXX11_HDR_CODECVT -#define SPROUT_NO_CXX11_ATOMIC_SMART_PTR +#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8) || !defined(SPROUT_LIBSTDCXX11) +# define SPROUT_NO_CXX11_HDR_ATOMIC +# define SPROUT_NO_CXX11_HDR_THREAD +#endif -#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(__GXX_EXPERIMENTAL_CXX0X__)) +#if __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 9) || !defined(SPROUT_LIBSTDCXX11) +# define SPROUT_NO_CXX11_HDR_REGEX +# define SPROUT_NO_CXX11_HDR_THREAD +#endif + +#if defined(__clang_major__) && ((__clang_major__ < 3) || ((__clang_major__ == 3) && (__clang_minor__ < 7))) +# define SPROUT_NO_CXX11_HDR_ATOMIC +#endif + +#if __GNUC__ < 5 || (__GNUC__ == 5 && __GNUC_MINOR__ < 1) || !defined(SPROUT_LIBSTDCXX11) +# define SPROUT_NO_CXX11_HDR_TYPE_TRAITS +# define SPROUT_NO_CXX11_HDR_CODECVT +# define SPROUT_NO_CXX11_ATOMIC_SMART_PTR +# define SPROUT_NO_CXX11_STD_ALIGN +#endif + +#if (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6) || !defined(SPROUT_LIBSTDCXX11)) # define SPROUT_NO_CXX14_INITIALIZER_LIST #endif diff --git a/sprout/config/suffix.hpp b/sprout/config/suffix.hpp index ce875c70..d4f22c38 100644 --- a/sprout/config/suffix.hpp +++ b/sprout/config/suffix.hpp @@ -65,11 +65,15 @@ // SPROUT_DEFAULTED_DESTRUCTOR_DECL // #ifndef SPROUT_CONFIG_DISABLE_DEFAULTED_FUNCTIONS -# define SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL = default; -# define SPROUT_DEFAULTED_DESTRUCTOR_DECL = default; +# define SPROUT_DEFAULTED_FUNCTION_DECL = default; +# define SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL SPROUT_DEFAULTED_FUNCTION_DECL +# define SPROUT_DEFAULTED_DESTRUCTOR_DECL SPROUT_DEFAULTED_FUNCTION_DECL +# define SPROUT_DEFAULTED_FUNCTION(FUNC, BODY) FUNC SPROUT_DEFAULTED_FUNCTION_DECL #else // #ifndef SPROUT_CONFIG_DISABLE_DEFAULTED_FUNCTIONS -# define SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL SPROUT_NOEXCEPT {} -# define SPROUT_DEFAULTED_DESTRUCTOR_DECL SPROUT_NOEXCEPT {} +# define SPROUT_DEFAULTED_FUNCTION_DECL SPROUT_NOEXCEPT {} +# define SPROUT_DEFAULTED_DEFAULT_CONSTRUCTOR_DECL SPROUT_DEFAULTED_FUNCTION_DECL +# define SPROUT_DEFAULTED_DESTRUCTOR_DECL SPROUT_DEFAULTED_FUNCTION_DECL +# define SPROUT_DEFAULTED_FUNCTION(FUNC, BODY) FUNC BODY #endif // #ifndef SPROUT_CONFIG_DISABLE_DEFAULTED_FUNCTIONS // @@ -77,8 +81,10 @@ // #ifndef SPROUT_CONFIG_DISABLE_DELETED_FUNCTIONS # define SPROUT_DELETED_FUNCTION_DECL = delete; +# define SPROUT_DELETED_FUNCTION(FUNC) FUNC SPROUT_DELETED_FUNCTION_DECL #else // #ifndef SPROUT_CONFIG_DISABLE_DELETED_FUNCTIONS # define SPROUT_DELETED_FUNCTION_DECL ; +# define SPROUT_DELETED_FUNCTION(FUNC) private: FUNC SPROUT_DELETED_FUNCTION_DECL #endif // #ifndef SPROUT_CONFIG_DISABLE_DELETED_FUNCTIONS // @@ -92,6 +98,43 @@ # define SPROUT_DEPRECATED #endif +// +// SPROUT_FORCEINLINE +// +#if defined(_MSC_VER) +# define SPROUT_FORCEINLINE __forceinline +#elif defined(__GNUC__) && (__GNUC__ > 3) +# define SPROUT_FORCEINLINE inline __attribute__ ((__always_inline__)) +#else +# define SPROUT_FORCEINLINE inline +#endif + +// +// SPROUT_NOINLINE +// +#if defined(_MSC_VER) +# define SPROUT_NOINLINE __declspec(noinline) +#elif defined(__GNUC__) && (__GNUC__ > 3) +# if defined(__CUDACC__) +# define SPROUT_NOINLINE __attribute__ ((noinline)) +# else +# define SPROUT_NOINLINE __attribute__ ((__noinline__)) +# endif +#else +# define SPROUT_NOINLINE +#endif + +// +// SPROUT_NORETURN +// +#if defined(_MSC_VER) +# define SPROUT_NORETURN __declspec(noreturn) +#elif defined(__GNUC__) +# define SPROUT_NORETURN __attribute__ ((__noreturn__)) +#else +# define SPROUT_NORETURN +#endif + // // SPROUT_USE_EXPLICIT_CONVERSION_OPERATORS // SPROUT_EXPLICIT_CONVERSION diff --git a/sprout/config/user.hpp b/sprout/config/user.hpp new file mode 100644 index 00000000..3db3bac1 --- /dev/null +++ b/sprout/config/user.hpp @@ -0,0 +1,64 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + 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 SPROUT_CONFIG_USER_HPP +#define SPROUT_CONFIG_USER_HPP + +// +// 言語機能を無効化するコンフィグ +// ユーザ定義されない場合、処理系に応じて自動的に定義される。 +// +//#define SPROUT_CONFIG_DISABLE_CONSTEXPR +//#define SPROUT_CONFIG_DISABLE_CXX14_CONSTEXPR +//#define SPROUT_CONFIG_DISABLE_DEFAULTED_FUNCTIONS +//#define SPROUT_CONFIG_DISABLE_DELETED_FUNCTIONS +//#define SPROUT_CONFIG_DISABLE_EXPLICIT_CONVERSION_OPERATORS +//#define SPROUT_CONFIG_DISABLE_NOEXCEPT +//#define SPROUT_CONFIG_DISABLE_TEMPLATE_ALIASES +//#define SPROUT_CONFIG_DISABLE_USER_DEFINED_LITERALS +//#define SPROUT_CONFIG_DISABLE_DELEGATING_CONSTRUCTORS +//#define SPROUT_CONFIG_DISABLE_UNICODE_LITERALS +//#define SPROUT_CONFIG_DISABLE_VARIABLE_TEMPLATES + +// +// 言語機能を強制的に有効化するコンフィグ +// SPROUT_CONFIG_DISABLE_*** の自動定義を抑制する。 +// SPROUT_CONFIG_DISABLE_*** がユーザ定義されている場合、無効化のほうが優先される。 +// +//#define SPROUT_CONFIG_FORCE_CONSTEXPR +//#define SPROUT_CONFIG_FORCE_CXX14_CONSTEXPR +//#define SPROUT_CONFIG_FORCE_DEFAULTED_FUNCTIONS +//#define SPROUT_CONFIG_FORCE_DELETED_FUNCTIONS +//#define SPROUT_CONFIG_FORCE_EXPLICIT_CONVERSION_OPERATORS +//#define SPROUT_CONFIG_FORCE_NOEXCEPT +//#define SPROUT_CONFIG_FORCE_TEMPLATE_ALIASES +//#define SPROUT_CONFIG_FORCE_USER_DEFINED_LITERALS +//#define SPROUT_CONFIG_FORCE_DELEGATING_CONSTRUCTORS +//#define SPROUT_CONFIG_FORCE_UNICODE_LITERALS +//#define SPROUT_CONFIG_FORCE_VARIABLE_TEMPLATES + +// +// 実装に外部ライブラリを使用するコンフィグ +// +//#define SPROUT_CONFIG_USE_SSCRISK_CEL + +// +// 処理系機能を無効化するコンフィグ +// ユーザ定義されない場合、処理系に応じて自動的に定義される。 +// +//#define SPROUT_CONFIG_DISABLE_BUILTIN_CMATH_FUNCTION +//#define SPROUT_CONFIG_DISABLE_BUILTIN_COPYSIGN_FUNCTION +//#define SPROUT_CONFIG_DISABLE_BUILTIN_BIT_OPERATION + +// +// 実装の詳細を切り替えるコンフィグ +// +//#define SPROUT_CONFIG_DISABLE_LARGE_FLOAT_ROUNDING +//#define SPROUT_CONFIG_DISABLE_SUPPORT_TEMPORARY_CONTAINER_ITERATION +//#define SPROUT_CONFIG_DISABLE_SUPPORT_EFFICIENT_ARRAY_ITERATION + +#endif // #ifndef SPROUT_CONFIG_USER_HPP diff --git a/sprout/net/endian.hpp b/sprout/net/endian.hpp index 1a3bc269..36976254 100644 --- a/sprout/net/endian.hpp +++ b/sprout/net/endian.hpp @@ -13,163 +13,185 @@ #include #include -#include - +#include +#include + namespace sprout { - namespace net { - namespace detail { - /* - * lshift_by - * Left shift 'val' by 'n' bytes - */ - template - SPROUT_CONSTEXPR T lshift_by(T val, std::uint_fast8_t n) { - return val << (n * 8); - } + namespace net { + namespace detail { + /* + * lshift_by + * Left shift 'val' by 'n' bytes + */ + template + inline SPROUT_CONSTEXPR T + lshift_by(T val, std::uint_fast8_t n) { + return val << (n * 8); + } - /* - * rshift_by - * Right shift 'val' by 'n' bytes - */ - template - SPROUT_CONSTEXPR T rshift_by(T val, std::uint_fast8_t n) { - return val >> (n * 8); - } + /* + * rshift_by + * Right shift 'val' by 'n' bytes + */ + template + inline SPROUT_CONSTEXPR T + rshift_by(T val, std::uint_fast8_t n) { + return val >> (n * 8); + } - /* - * mask_t - * Mask 'n'th byte - */ - template - SPROUT_CONSTEXPR T mask_at(std::uint_fast8_t n) { - return sprout::net::detail::lshift_by(T(0xFF), n); - } + /* + * mask_t + * Mask 'n'th byte + */ + template + inline SPROUT_CONSTEXPR T + mask_at(std::uint_fast8_t n) { + return sprout::net::detail::lshift_by(T(0xFF), n); + } - /* - * byte_at - * Get 'n'th byte from 'val' - */ - template - SPROUT_CONSTEXPR T byte_at(T val, std::uint_fast8_t n) { - return sprout::net::detail::rshift_by((val & sprout::net::detail::mask_at(n)), n); - } + /* + * byte_at + * Get 'n'th byte from 'val' + */ + template + inline SPROUT_CONSTEXPR T + byte_at(T val, std::uint_fast8_t n) { + return sprout::net::detail::rshift_by((val & sprout::net::detail::mask_at(n)), n); + } - /* - * replace_at - * Replace, in 'val', 'n'th byte with 'byte_val' - */ - template - SPROUT_CONSTEXPR T replace_at(T val, std::uint8_t byte_val, std::uint_fast8_t n) { - return (val & ~sprout::net::detail::mask_at(n)) | sprout::net::detail::lshift_by(T(byte_val), n); - } + /* + * replace_at + * Replace, in 'val', 'n'th byte with 'byte_val' + */ + template + inline SPROUT_CONSTEXPR T + replace_at(T val, std::uint8_t byte_val, std::uint_fast8_t n) { + return (val & ~sprout::net::detail::mask_at(n)) | sprout::net::detail::lshift_by(T(byte_val), n); + } - /* - * copy - * Copy, in 'val', byte at index 'from' to byte at index 'to' - */ - template - SPROUT_CONSTEXPR T copy(T val, std::uint_fast8_t from, std::uint_fast8_t to) { - return sprout::net::detail::replace_at(val, sprout::net::detail::byte_at(val, from), to); - } + /* + * copy + * Copy, in 'val', byte at index 'from' to byte at index 'to' + */ + template + inline SPROUT_CONSTEXPR T + copy(T val, std::uint_fast8_t from, std::uint_fast8_t to) { + return sprout::net::detail::replace_at(val, sprout::net::detail::byte_at(val, from), to); + } - /* - * swap - * Swap, in 'val', byte at index 'n1' with byte at index 'n2' - */ - template - SPROUT_CONSTEXPR T swap(T val, std::uint_fast8_t n1, std::uint_fast8_t n2) { - return sprout::net::detail::replace_at(sprout::net::detail::copy(val, n1, n2), sprout::net::detail::byte_at(val, n2), n1); - } + /* + * swap + * Swap, in 'val', byte at index 'n1' with byte at index 'n2' + */ + template + inline SPROUT_CONSTEXPR T + swap(T val, std::uint_fast8_t n1, std::uint_fast8_t n2) { + return sprout::net::detail::replace_at(sprout::net::detail::copy(val, n1, n2), sprout::net::detail::byte_at(val, n2), n1); + } - /* - * reverse_impl - * Swap, in 'val', byte at index 'n1' with byte at index 'n2' in 'val', increment n1, decrement n2 until n1 > n2 - */ - template - SPROUT_CONSTEXPR T reverse_impl(T val, std::uint_fast8_t n1, std::uint_fast8_t n2) { - return n1 > n2 ? val : sprout::net::detail::reverse_impl(swap(val, n1, n2), n1 + 1, n2 - 1); - } + /* + * reverse_impl + * Swap, in 'val', byte at index 'n1' with byte at index 'n2' in 'val', increment n1, decrement n2 until n1 > n2 + */ + template + inline SPROUT_CONSTEXPR T + reverse_impl(T val, std::uint_fast8_t n1, std::uint_fast8_t n2) { + return n1 > n2 ? val : sprout::net::detail::reverse_impl(swap(val, n1, n2), n1 + 1, n2 - 1); + } - /* - * reverse - * Reverse 'val' - */ - template - SPROUT_CONSTEXPR T reverse(T val) { - return sprout::net::detail::reverse_impl(val, 0, sizeof(T) - 1); - } + /* + * reverse + * Reverse 'val' + */ + template + inline SPROUT_CONSTEXPR T + reverse(T val) { + return sprout::net::detail::reverse_impl(val, 0, sizeof(T) - 1); + } - /* - * reverse_words_impl - * Swap, in 'val', byte at index 'n' - 1 with byte at index 'n' - 2, decrement n by 2 until n == 0 - */ - template - SPROUT_CONSTEXPR T reverse_words_impl(T val, std::uint_fast8_t n) { - return n == 0 ? val : sprout::net::detail::reverse_words_impl(swap(val, n - 1, n - 2), n - 2); - } + /* + * reverse_words_impl + * Swap, in 'val', byte at index 'n' - 1 with byte at index 'n' - 2, decrement n by 2 until n == 0 + */ + template + inline SPROUT_CONSTEXPR T + reverse_words_impl(T val, std::uint_fast8_t n) { + return n == 0 ? val : sprout::net::detail::reverse_words_impl(swap(val, n - 1, n - 2), n - 2); + } - /* - * reverse_words - * Reverse each word in 'val' - */ - template - SPROUT_CONSTEXPR T reverse_words(T val) { - return sprout::net::detail::reverse_words_impl(val, sizeof(T)); - } - } // namespace detail + /* + * reverse_words + * Reverse each word in 'val' + */ + template + inline SPROUT_CONSTEXPR T + reverse_words(T val) { + return sprout::net::detail::reverse_words_impl(val, sizeof(T)); + } + } // namespace detail - // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3620.pdf - // template<> - // constexpr unsigned-integral hton(unsigned-integral host) - template - SPROUT_CONSTEXPR T hton SPROUT_PREVENT_MACRO_SUBSTITUTION (T host) { -#if defined(BOOST_BIG_ENDIAN) - return host; -#elif defined(BOOST_LITTLE_ENDIAN) - return sprout::net::detail::reverse(host); -#elif defined(BOOST_PDP_ENDIAN) - return sprout::net::detail::reverse_words(host); + // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3620.pdf + // template<> + // constexpr unsigned-integral hton(unsigned-integral host) + template + inline SPROUT_CONSTEXPR T + hton SPROUT_PREVENT_MACRO_SUBSTITUTION (T host) { +#if defined(SPROUT_BIG_ENDIAN) + return host; +#elif defined(SPROUT_LITTLE_ENDIAN) + return sprout::net::detail::reverse(host); +#elif defined(SPROUT_PDP_ENDIAN) + return sprout::net::detail::reverse_words(host); +#else + return SPROUT_ASSERT_MSG(0, "hton: unsupported endian"), host; #endif - } + } - // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3620.pdf - // template<> - // constexpr unsigned-integral ntoh(unsigned-integral net) - template - SPROUT_CONSTEXPR T ntoh SPROUT_PREVENT_MACRO_SUBSTITUTION (T net) { -#if defined(BOOST_BIG_ENDIAN) - return net; -#elif defined(BOOST_LITTLE_ENDIAN) - return sprout::net::detail::reverse(net); -#elif defined(BOOST_PDP_ENDIAN) - return sprout::net::detail::reverse_words(host); + // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3620.pdf + // template<> + // constexpr unsigned-integral ntoh(unsigned-integral net) + template + inline SPROUT_CONSTEXPR T + ntoh SPROUT_PREVENT_MACRO_SUBSTITUTION (T net) { +#if defined(SPROUT_BIG_ENDIAN) + return net; +#elif defined(SPROUT_LITTLE_ENDIAN) + return sprout::net::detail::reverse(net); +#elif defined(SPROUT_PDP_ENDIAN) + return sprout::net::detail::reverse_words(host); +#else + return SPROUT_ASSERT_MSG(0, "ntoh: unsupported endian"), net; #endif - } + } - // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3620.pdf - // uint32_t htonl(uint32_t host32) - SPROUT_CONSTEXPR std::uint32_t htonl SPROUT_PREVENT_MACRO_SUBSTITUTION (std::uint32_t host32) { - return sprout::net::hton SPROUT_PREVENT_MACRO_SUBSTITUTION (host32); - } + // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3620.pdf + // uint32_t htonl(uint32_t host32) + inline SPROUT_CONSTEXPR std::uint32_t + htonl SPROUT_PREVENT_MACRO_SUBSTITUTION (std::uint32_t host32) { + return sprout::net::hton SPROUT_PREVENT_MACRO_SUBSTITUTION (host32); + } - // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3620.pdf - // uint16_t htons(uint16_t host16) - SPROUT_CONSTEXPR std::uint16_t htons SPROUT_PREVENT_MACRO_SUBSTITUTION (std::uint16_t host16) { - return sprout::net::hton SPROUT_PREVENT_MACRO_SUBSTITUTION (host16); - } + // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3620.pdf + // uint16_t htons(uint16_t host16) + inline SPROUT_CONSTEXPR std::uint16_t + htons SPROUT_PREVENT_MACRO_SUBSTITUTION (std::uint16_t host16) { + return sprout::net::hton SPROUT_PREVENT_MACRO_SUBSTITUTION (host16); + } - // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3620.pdf - // uint32_t ntohl(uint32_t net32) - SPROUT_CONSTEXPR std::uint32_t ntohl SPROUT_PREVENT_MACRO_SUBSTITUTION (std::uint32_t net32) { - return sprout::net::ntoh SPROUT_PREVENT_MACRO_SUBSTITUTION (net32); - } + // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3620.pdf + // uint32_t ntohl(uint32_t net32) + inline SPROUT_CONSTEXPR std::uint32_t + ntohl SPROUT_PREVENT_MACRO_SUBSTITUTION (std::uint32_t net32) { + return sprout::net::ntoh SPROUT_PREVENT_MACRO_SUBSTITUTION (net32); + } - // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3620.pdf - // uint16_t ntohs(uint32_t net16) - SPROUT_CONSTEXPR std::uint16_t ntohs SPROUT_PREVENT_MACRO_SUBSTITUTION (std::uint16_t net16) { - return sprout::net::ntoh SPROUT_PREVENT_MACRO_SUBSTITUTION (net16); - } - } //namespace net + // http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3620.pdf + // uint16_t ntohs(uint32_t net16) + inline SPROUT_CONSTEXPR std::uint16_t + ntohs SPROUT_PREVENT_MACRO_SUBSTITUTION (std::uint16_t net16) { + return sprout::net::ntoh SPROUT_PREVENT_MACRO_SUBSTITUTION (net16); + } + } //namespace net } // namespace sprout #endif // #ifndef SPROUT_NET_ENDIAN_HPP diff --git a/sprout/predef.hpp b/sprout/predef.hpp new file mode 100644 index 00000000..6b39aa39 --- /dev/null +++ b/sprout/predef.hpp @@ -0,0 +1,21 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_HPP +#define SPROUT_PREDEF_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // #ifndef SPROUT_PREDEF_HPP diff --git a/sprout/predef/architecture.hpp b/sprout/predef/architecture.hpp new file mode 100644 index 00000000..7281cf5e --- /dev/null +++ b/sprout/predef/architecture.hpp @@ -0,0 +1,30 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_ARCHITECTURE_HPP +#define SPROUT_PREDEF_ARCHITECTURE_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_HPP diff --git a/sprout/predef/architecture/alpha.hpp b/sprout/predef/architecture/alpha.hpp new file mode 100644 index 00000000..6c876bac --- /dev/null +++ b/sprout/predef/architecture/alpha.hpp @@ -0,0 +1,38 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_ARCHITECTURE_ALPHA_HPP +#define SPROUT_PREDEF_ARCHITECTURE_ALPHA_HPP + +#include +#include + +#define SPROUT_ARCH_ALPHA 0 + +#if defined(__alpha__) || defined(__alpha) || defined(_M_ALPHA) +# undef SPROUT_ARCH_ALPHA +# if !defined(SPROUT_ARCH_ALPHA) && defined(__alpha_ev4__) +# define SPROUT_ARCH_ALPHA SPROUT_VERSION_NUMBER(4, 0, 0) +# endif +# if !defined(SPROUT_ARCH_ALPHA) && defined(__alpha_ev5__) +# define SPROUT_ARCH_ALPHA SPROUT_VERSION_NUMBER(5, 0, 0) +# endif +# if !defined(SPROUT_ARCH_ALPHA) && defined(__alpha_ev6__) +# define SPROUT_ARCH_ALPHA SPROUT_VERSION_NUMBER(6, 0, 0) +# endif +# if !defined(SPROUT_ARCH_ALPHA) +# define SPROUT_ARCH_ALPHA 1 +# endif +#endif + +#if SPROUT_ARCH_ALPHA +# define SPROUT_ARCH_ALPHA_AVAILABLE +#endif + +#define SPROUT_ARCH_ALPHA_NAME "DEC Alpha" + +#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_ALPHA_HPP diff --git a/sprout/predef/architecture/arm.hpp b/sprout/predef/architecture/arm.hpp new file mode 100644 index 00000000..93c3fc79 --- /dev/null +++ b/sprout/predef/architecture/arm.hpp @@ -0,0 +1,41 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_ARCHITECTURE_ARM_HPP +#define SPROUT_PREDEF_ARCHITECTURE_ARM_HPP + +#include +#include + +#define SPROUT_ARCH_ARM 0 + +#if defined(__arm__) || defined(__arm64) || defined(__thumb__) || defined(__TARGET_ARCH_ARM) || defined(__TARGET_ARCH_THUMB) || defined(_M_ARM) +# undef SPROUT_ARCH_ARM +# if !defined(SPROUT_ARCH_ARM) && defined(__arm64) +# define SPROUT_ARCH_ARM SPROUT_VERSION_NUMBER(8, 0, 0) +# endif +# if !defined(SPROUT_ARCH_ARM) && defined(__TARGET_ARCH_ARM) +# define SPROUT_ARCH_ARM SPROUT_VERSION_NUMBER(__TARGET_ARCH_ARM, 0, 0) +# endif +# if !defined(SPROUT_ARCH_ARM) && defined(__TARGET_ARCH_THUMB) +# define SPROUT_ARCH_ARM SPROUT_VERSION_NUMBER(__TARGET_ARCH_THUMB, 0, 0) +# endif +# if !defined(SPROUT_ARCH_ARM) && defined(_M_ARM) +# define SPROUT_ARCH_ARM SPROUT_VERSION_NUMBER(_M_ARM, 0, 0) +# endif +# if !defined(SPROUT_ARCH_ARM) +# define SPROUT_ARCH_ARM 1 +# endif +#endif + +#if SPROUT_ARCH_ARM +# define SPROUT_ARCH_ARM_AVAILABLE +#endif + +#define SPROUT_ARCH_ARM_NAME "ARM" + +#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_ARM_HPP diff --git a/sprout/predef/architecture/blackfin.hpp b/sprout/predef/architecture/blackfin.hpp new file mode 100644 index 00000000..2a5d9c12 --- /dev/null +++ b/sprout/predef/architecture/blackfin.hpp @@ -0,0 +1,26 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_ARCHITECTURE_BLACKFIN_HPP +#define SPROUT_PREDEF_ARCHITECTURE_BLACKFIN_HPP + +#include + +#define SPROUT_ARCH_BLACKFIN 0 + +#if defined(__bfin__) || defined(__BFIN__) || defined(bfin) || defined(BFIN) +# undef SPROUT_ARCH_BLACKFIN +# define SPROUT_ARCH_BLACKFIN 1 +#endif + +#if SPROUT_ARCH_BLACKFIN +# define SPROUT_ARCH_BLACKFIN_AVAILABLE +#endif + +#define SPROUT_ARCH_BLACKFIN_NAME "Blackfin" + +#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_BLACKFIN_HPP diff --git a/sprout/predef/architecture/convex.hpp b/sprout/predef/architecture/convex.hpp new file mode 100644 index 00000000..6a9d84d7 --- /dev/null +++ b/sprout/predef/architecture/convex.hpp @@ -0,0 +1,44 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_ARCHITECTURE_CONVEX_HPP +#define SPROUT_PREDEF_ARCHITECTURE_CONVEX_HPP + +#include +#include + +#define SPROUT_ARCH_CONVEX 0 + +#if defined(__convex__) +# undef SPROUT_ARCH_CONVEX +# if !defined(SPROUT_ARCH_CONVEX) && defined(__convex_c1__) +# define SPROUT_ARCH_CONVEX SPROUT_VERSION_NUMBER(1, 0, 0) +# endif +# if !defined(SPROUT_ARCH_CONVEX) && defined(__convex_c2__) +# define SPROUT_ARCH_CONVEX SPROUT_VERSION_NUMBER(2, 0, 0) +# endif +# if !defined(SPROUT_ARCH_CONVEX) && defined(__convex_c32__) +# define SPROUT_ARCH_CONVEX SPROUT_VERSION_NUMBER(3, 2, 0) +# endif +# if !defined(SPROUT_ARCH_CONVEX) && defined(__convex_c34__) +# define SPROUT_ARCH_CONVEX SPROUT_VERSION_NUMBER(3, 4, 0) +# endif +# if !defined(SPROUT_ARCH_CONVEX) && defined(__convex_c38__) +# define SPROUT_ARCH_CONVEX SPROUT_VERSION_NUMBER(3, 8 ,0) +# endif +# if !defined(SPROUT_ARCH_CONVEX) +# define SPROUT_ARCH_CONVEX 1 +# endif +#endif + +#if SPROUT_ARCH_CONVEX +# define SPROUT_ARCH_CONVEX_AVAILABLE +#endif + +#define SPROUT_ARCH_CONVEX_NAME "Convex Computer" + +#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_CONVEX_HPP diff --git a/sprout/predef/architecture/ia64.hpp b/sprout/predef/architecture/ia64.hpp new file mode 100644 index 00000000..ee9acabc --- /dev/null +++ b/sprout/predef/architecture/ia64.hpp @@ -0,0 +1,26 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_ARCHITECTURE_IA64_HPP +#define SPROUT_PREDEF_ARCHITECTURE_IA64_HPP + +#include + +#define SPROUT_ARCH_IA64 0 + +#if defined(__ia64__) || defined(_IA64) || defined(__IA64__) || defined(__ia64) || defined(_M_IA64) || defined(__itanium__) +# undef SPROUT_ARCH_IA64 +# define SPROUT_ARCH_IA64 1 +#endif + +#if SPROUT_ARCH_IA64 +# define SPROUT_ARCH_IA64_AVAILABLE +#endif + +#define SPROUT_ARCH_IA64_NAME "Intel Itanium 64" + +#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_IA64_HPP diff --git a/sprout/predef/architecture/m68k.hpp b/sprout/predef/architecture/m68k.hpp new file mode 100644 index 00000000..d1265b17 --- /dev/null +++ b/sprout/predef/architecture/m68k.hpp @@ -0,0 +1,47 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_ARCHITECTURE_M68K_HPP +#define SPROUT_PREDEF_ARCHITECTURE_M68K_HPP + +#include +#include + +#define SPROUT_ARCH_M68K 0 + +#if defined(__m68k__) || defined(M68000) +# undef SPROUT_ARCH_M68K +# if !defined(SPROUT_ARCH_M68K) && (defined(__mc68060__) || defined(mc68060) || defined(__mc68060)) +# define SPROUT_ARCH_M68K SPROUT_VERSION_NUMBER(6, 0, 0) +# endif +# if !defined(SPROUT_ARCH_M68K) && (defined(__mc68040__) || defined(mc68040) || defined(__mc68040)) +# define SPROUT_ARCH_M68K SPROUT_VERSION_NUMBER(4, 0, 0) +# endif +# if !defined(SPROUT_ARCH_M68K) && (defined(__mc68030__) || defined(mc68030) || defined(__mc68030)) +# define SPROUT_ARCH_M68K SPROUT_VERSION_NUMBER(3, 0, 0) +# endif +# if !defined(SPROUT_ARCH_M68K) && (defined(__mc68020__) || defined(mc68020) || defined(__mc68020)) +# define SPROUT_ARCH_M68K SPROUT_VERSION_NUMBER(2, 0, 0) +# endif +# if !defined(SPROUT_ARCH_M68K) && (defined(__mc68010__) || defined(mc68010) || defined(__mc68010)) +# define SPROUT_ARCH_M68K SPROUT_VERSION_NUMBER(1, 0, 0) +# endif +# if !defined(SPROUT_ARCH_M68K) && (defined(__mc68000__) || defined(mc68000) || defined(__mc68000)) +# define SPROUT_ARCH_M68K 1 +# endif +# if !defined(SPROUT_ARCH_M68K) +# define SPROUT_ARCH_M68K 1 +# endif +#endif + +#if SPROUT_ARCH_M68K +# define SPROUT_ARCH_M68K_AVAILABLE +#endif + +#define SPROUT_ARCH_M68K_NAME "Motorola 68k" + +#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_M68K_HPP diff --git a/sprout/predef/architecture/mips.hpp b/sprout/predef/architecture/mips.hpp new file mode 100644 index 00000000..c5f1e71e --- /dev/null +++ b/sprout/predef/architecture/mips.hpp @@ -0,0 +1,45 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_ARCHITECTURE_MIPS_HPP +#define SPROUT_PREDEF_ARCHITECTURE_MIPS_HPP + +#include +#include + +#define SPROUT_ARCH_MIPS 0 + +#if defined(__mips__) || defined(__mips) || \ + defined(__MIPS__) +# undef SPROUT_ARCH_MIPS +# if !defined(SPROUT_ARCH_MIPS) && (defined(__mips)) +# define SPROUT_ARCH_MIPS SPROUT_VERSION_NUMBER(__mips, 0, 0) +# endif +# if !defined(SPROUT_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS1) || defined(_R3000)) +# define SPROUT_ARCH_MIPS SPROUT_VERSION_NUMBER(1, 0, 0) +# endif +# if !defined(SPROUT_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS2) || defined(__MIPS_ISA2__) || defined(_R4000)) +# define SPROUT_ARCH_MIPS SPROUT_VERSION_NUMBER(2, 0, 0) +# endif +# if !defined(SPROUT_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS3) || defined(__MIPS_ISA3__)) +# define SPROUT_ARCH_MIPS SPROUT_VERSION_NUMBER(3, 0, 0) +# endif +# if !defined(SPROUT_ARCH_MIPS) && (defined(_MIPS_ISA_MIPS4) || defined(__MIPS_ISA4__)) +# define SPROUT_ARCH_MIPS SPROUT_VERSION_NUMBER(4, 0, 0) +# endif +# if !defined(SPROUT_ARCH_MIPS) +# define SPROUT_ARCH_MIPS 1 +# endif +#endif + +#if SPROUT_ARCH_MIPS +# define SPROUT_ARCH_MIPS_AVAILABLE +#endif + +#define SPROUT_ARCH_MIPS_NAME "MIPS" + +#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_MIPS_HPP diff --git a/sprout/predef/architecture/parisc.hpp b/sprout/predef/architecture/parisc.hpp new file mode 100644 index 00000000..ce3170de --- /dev/null +++ b/sprout/predef/architecture/parisc.hpp @@ -0,0 +1,38 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_ARCHITECTURE_PARISC_HPP +#define SPROUT_PREDEF_ARCHITECTURE_PARISC_HPP + +#include +#include + +#define SPROUT_ARCH_PARISC 0 + +#if defined(__hppa__) || defined(__hppa) || defined(__HPPA__) +# undef SPROUT_ARCH_PARISC +# if !defined(SPROUT_ARCH_PARISC) && (defined(_PA_RISC1_0)) +# define SPROUT_ARCH_PARISC SPROUT_VERSION_NUMBER(1, 0, 0) +# endif +# if !defined(SPROUT_ARCH_PARISC) && (defined(_PA_RISC1_1) || defined(__HPPA11__) || defined(__PA7100__)) +# define SPROUT_ARCH_PARISC SPROUT_VERSION_NUMBER(1, 1, 0) +# endif +# if !defined(SPROUT_ARCH_PARISC) && (defined(_PA_RISC2_0) || defined(__RISC2_0__) || defined(__HPPA20__) || defined(__PA8000__)) +# define SPROUT_ARCH_PARISC SPROUT_VERSION_NUMBER(2, 0, 0) +# endif +# if !defined(SPROUT_ARCH_PARISC) +# define SPROUT_ARCH_PARISC 1 +# endif +#endif + +#if SPROUT_ARCH_PARISC +# define SPROUT_ARCH_PARISC_AVAILABLE +#endif + +#define SPROUT_ARCH_PARISC_NAME "HP/PA RISC" + +#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_PARISC_HPP diff --git a/sprout/predef/architecture/ppc.hpp b/sprout/predef/architecture/ppc.hpp new file mode 100644 index 00000000..671fdcd6 --- /dev/null +++ b/sprout/predef/architecture/ppc.hpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_ARCHITECTURE_PPC_HPP +#define SPROUT_PREDEF_ARCHITECTURE_PPC_HPP + +#include +#include + +#define SPROUT_ARCH_PPC 0 + +#if defined(__powerpc) || defined(__powerpc__) || defined(__POWERPC__) || defined(__ppc__) \ + || defined(_M_PPC) || defined(_ARCH_PPC) || defined(__PPCGECKO__) || defined(__PPCBROADWAY__) || defined(_XENON) +# undef SPROUT_ARCH_PPC +# if !defined (SPROUT_ARCH_PPC) && (defined(__ppc601__) || defined(_ARCH_601)) +# define SPROUT_ARCH_PPC SPROUT_VERSION_NUMBER(6, 1, 0) +# endif +# if !defined (SPROUT_ARCH_PPC) && (defined(__ppc603__) || defined(_ARCH_603)) +# define SPROUT_ARCH_PPC SPROUT_VERSION_NUMBER(6, 3, 0) +# endif +# if !defined (SPROUT_ARCH_PPC) && (defined(__ppc604__) || defined(__ppc604__)) +# define SPROUT_ARCH_PPC SPROUT_VERSION_NUMBER(6, 4, 0) +# endif +# if !defined (SPROUT_ARCH_PPC) +# define SPROUT_ARCH_PPC 1 +# endif +#endif + +#if SPROUT_ARCH_PPC +# define SPROUT_ARCH_PPC_AVAILABLE +#endif + +#define SPROUT_ARCH_PPC_NAME "PowerPC" + +#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_PPC_HPP diff --git a/sprout/predef/architecture/pyramid.hpp b/sprout/predef/architecture/pyramid.hpp new file mode 100644 index 00000000..820e1358 --- /dev/null +++ b/sprout/predef/architecture/pyramid.hpp @@ -0,0 +1,26 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_ARCHITECTURE_PYRAMID_HPP +#define SPROUT_PREDEF_ARCHITECTURE_PYRAMID_HPP + +#include + +#define SPROUT_ARCH_PYRAMID 0 + +#if defined(pyr) +# undef SPROUT_ARCH_PYRAMID +# define SPROUT_ARCH_PYRAMID 1 +#endif + +#if SPROUT_ARCH_PYRAMID +# define SPROUT_ARCH_PYRAMID_AVAILABLE +#endif + +#define SPROUT_ARCH_PYRAMID_NAME "Pyramid 9810" + +#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_PYRAMID_HPP diff --git a/sprout/predef/architecture/rs6k.hpp b/sprout/predef/architecture/rs6k.hpp new file mode 100644 index 00000000..ea1fe9a2 --- /dev/null +++ b/sprout/predef/architecture/rs6k.hpp @@ -0,0 +1,34 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_ARCHITECTURE_RS6K_HPP +#define SPROUT_PREDEF_ARCHITECTURE_RS6K_HPP + +#include + +#define SPROUT_ARCH_RS6000 0 + +#if defined(__THW_RS6000) || defined(_IBMR2) || defined(_POWER) || defined(_ARCH_PWR) || defined(_ARCH_PWR2) +# undef SPROUT_ARCH_RS6000 +# define SPROUT_ARCH_RS6000 1 +#endif + +#if SPROUT_ARCH_RS6000 +# define SPROUT_ARCH_RS6000_AVAILABLE +#endif + +#define SPROUT_ARCH_RS6000_NAME "RS/6000" + +#define SPROUT_ARCH_PWR SPROUT_ARCH_RS6000 + +#if SPROUT_ARCH_PWR +# define SPROUT_ARCH_PWR_AVAILABLE +#endif + +#define SPROUT_ARCH_PWR_NAME SPROUT_ARCH_RS6000_NAME + +#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_RS6K_HPP diff --git a/sprout/predef/architecture/sparc.hpp b/sprout/predef/architecture/sparc.hpp new file mode 100644 index 00000000..6234090a --- /dev/null +++ b/sprout/predef/architecture/sparc.hpp @@ -0,0 +1,35 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_ARCHITECTURE_SPARC_HPP +#define SPROUT_PREDEF_ARCHITECTURE_SPARC_HPP + +#include +#include + +#define SPROUT_ARCH_SPARC 0 + +#if defined(__sparc__) || defined(__sparc) +# undef SPROUT_ARCH_SPARC +# if !defined(SPROUT_ARCH_SPARC) && defined(__sparcv9) +# define SPROUT_ARCH_SPARC SPROUT_VERSION_NUMBER(9, 0, 0) +# endif +# if !defined(SPROUT_ARCH_SPARC) && defined(__sparcv8) +# define SPROUT_ARCH_SPARC SPROUT_VERSION_NUMBER(8, 0, 0) +# endif +# if !defined(SPROUT_ARCH_SPARC) +# define SPROUT_ARCH_SPARC 1 +# endif +#endif + +#if SPROUT_ARCH_SPARC +# define SPROUT_ARCH_SPARC_AVAILABLE +#endif + +#define SPROUT_ARCH_SPARC_NAME "SPARC" + +#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_SPARC_HPP diff --git a/sprout/predef/architecture/superh.hpp b/sprout/predef/architecture/superh.hpp new file mode 100644 index 00000000..56389f56 --- /dev/null +++ b/sprout/predef/architecture/superh.hpp @@ -0,0 +1,44 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_ARCHITECTURE_SUPERH_HPP +#define SPROUT_PREDEF_ARCHITECTURE_SUPERH_HPP + +#include +#include + +#define SPROUT_ARCH_SH 0 + +#if defined(__sh__) +# undef SPROUT_ARCH_SH +# if !defined(SPROUT_ARCH_SH) && (defined(__SH5__)) +# define SPROUT_ARCH_SH SPROUT_VERSION_NUMBER(5, 0, 0) +# endif +# if !defined(SPROUT_ARCH_SH) && (defined(__SH4__)) +# define SPROUT_ARCH_SH SPROUT_VERSION_NUMBER(4, 0, 0) +# endif +# if !defined(SPROUT_ARCH_SH) && (defined(__sh3__) || defined(__SH3__)) +# define SPROUT_ARCH_SH SPROUT_VERSION_NUMBER(3, 0, 0) +# endif +# if !defined(SPROUT_ARCH_SH) && (defined(__sh2__)) +# define SPROUT_ARCH_SH SPROUT_VERSION_NUMBER(2, 0, 0) +# endif +# if !defined(SPROUT_ARCH_SH) && (defined(__sh1__)) +# define SPROUT_ARCH_SH SPROUT_VERSION_NUMBER(1, 0, 0) +# endif +# if !defined(SPROUT_ARCH_SH) +# define SPROUT_ARCH_SH 1 +# endif +#endif + +#if SPROUT_ARCH_SH +# define SPROUT_ARCH_SH_AVAILABLE +#endif + +#define SPROUT_ARCH_SH_NAME "SuperH" + +#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_SUPERH_HPP diff --git a/sprout/predef/architecture/sys370.hpp b/sprout/predef/architecture/sys370.hpp new file mode 100644 index 00000000..614a7a68 --- /dev/null +++ b/sprout/predef/architecture/sys370.hpp @@ -0,0 +1,26 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_ARCHITECTURE_SYS370_HPP +#define SPROUT_PREDEF_ARCHITECTURE_SYS370_HPP + +#include + +#define SPROUT_ARCH_SYS370 0 + +#if defined(__370__) || defined(__THW_370__) +# undef SPROUT_ARCH_SYS370 +# define SPROUT_ARCH_SYS370 1 +#endif + +#if SPROUT_ARCH_SYS370 +# define SPROUT_ARCH_SYS370_AVAILABLE +#endif + +#define SPROUT_ARCH_SYS370_NAME "System/370" + +#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_SYS370_HPP diff --git a/sprout/predef/architecture/sys390.hpp b/sprout/predef/architecture/sys390.hpp new file mode 100644 index 00000000..e6c9a3eb --- /dev/null +++ b/sprout/predef/architecture/sys390.hpp @@ -0,0 +1,26 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_ARCHITECTURE_SYS390_HPP +#define SPROUT_PREDEF_ARCHITECTURE_SYS390_HPP + +#include + +#define SPROUT_ARCH_SYS390 0 + +#if defined(__s390__) || defined(__s390x__) +# undef SPROUT_ARCH_SYS390 +# define SPROUT_ARCH_SYS390 1 +#endif + +#if SPROUT_ARCH_SYS390 +# define SPROUT_ARCH_SYS390_AVAILABLE +#endif + +#define SPROUT_ARCH_SYS390_NAME "System/390" + +#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_SYS390_HPP diff --git a/sprout/predef/architecture/x86.hpp b/sprout/predef/architecture/x86.hpp new file mode 100644 index 00000000..ba6617be --- /dev/null +++ b/sprout/predef/architecture/x86.hpp @@ -0,0 +1,28 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_ARCHITECTURE_X86_HPP +#define SPROUT_PREDEF_ARCHITECTURE_X86_HPP + +#include +#include +#include + +#define SPROUT_ARCH_X86 0 + +#if SPROUT_ARCH_X86_32 || SPROUT_ARCH_X86_64 +# undef SPROUT_ARCH_X86 +# define SPROUT_ARCH_X86 1 +#endif + +#if SPROUT_ARCH_X86 +# define SPROUT_ARCH_X86_AVAILABLE +#endif + +#define SPROUT_ARCH_X86_NAME "Intel x86" + +#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_X86_HPP diff --git a/sprout/predef/architecture/x86/32.hpp b/sprout/predef/architecture/x86/32.hpp new file mode 100644 index 00000000..36cae792 --- /dev/null +++ b/sprout/predef/architecture/x86/32.hpp @@ -0,0 +1,51 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_ARCHITECTURE_X86_32_HPP +#define SPROUT_PREDEF_ARCHITECTURE_X86_32_HPP + +#include +#include +#include + +#define SPROUT_ARCH_X86_32 0 + +#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 SPROUT_ARCH_X86_32 +# if !defined(SPROUT_ARCH_X86_32) && defined(__I86__) +# define SPROUT_ARCH_X86_32 SPROUT_VERSION_NUMBER(__I86__, 0, 0) +# endif +# if !defined(SPROUT_ARCH_X86_32) && defined(_M_IX86) +# define SPROUT_ARCH_X86_32 SPROUT_PREDEF_MAKE_10_VV00(_M_IX86) +# endif +# if !defined(SPROUT_ARCH_X86_32) && defined(__i686__) +# define SPROUT_ARCH_X86_32 SPROUT_VERSION_NUMBER(6, 0, 0) +# endif +# if !defined(SPROUT_ARCH_X86_32) && defined(__i586__) +# define SPROUT_ARCH_X86_32 SPROUT_VERSION_NUMBER(5, 0, 0) +# endif +# if !defined(SPROUT_ARCH_X86_32) && defined(__i486__) +# define SPROUT_ARCH_X86_32 SPROUT_VERSION_NUMBER(4, 0, 0) +# endif +# if !defined(SPROUT_ARCH_X86_32) && defined(__i386__) +# define SPROUT_ARCH_X86_32 SPROUT_VERSION_NUMBER(3, 0, 0) +# endif +# if !defined(SPROUT_ARCH_X86_32) +# define SPROUT_ARCH_X86_32 1 +# endif +#endif + +#if SPROUT_ARCH_X86_32 +# define SPROUT_ARCH_X86_32_AVAILABLE +#endif + +#define SPROUT_ARCH_X86_32_NAME "Intel x86-32" + +#include + +#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_X86_32_HPP diff --git a/sprout/predef/architecture/x86/64.hpp b/sprout/predef/architecture/x86/64.hpp new file mode 100644 index 00000000..25ca967d --- /dev/null +++ b/sprout/predef/architecture/x86/64.hpp @@ -0,0 +1,28 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_ARCHITECTURE_X86_64_HPP +#define SPROUT_PREDEF_ARCHITECTURE_X86_64_HPP + +#include + +#define SPROUT_ARCH_X86_64 0 + +#if defined(__x86_64) || defined(__x86_64__) || defined(__amd64__) || defined(__amd64) || defined(_M_X64) +# undef SPROUT_ARCH_X86_64 +# define SPROUT_ARCH_X86_64 1 +#endif + +#if SPROUT_ARCH_X86_64 +# define SPROUT_ARCH_X86_64_AVAILABLE +#endif + +#define SPROUT_ARCH_X86_64_NAME "Intel x86-64" + +#include + +#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_X86_64_HPP diff --git a/sprout/predef/architecture/z.hpp b/sprout/predef/architecture/z.hpp new file mode 100644 index 00000000..11aaf5e0 --- /dev/null +++ b/sprout/predef/architecture/z.hpp @@ -0,0 +1,26 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_ARCHITECTURE_Z_HPP +#define SPROUT_PREDEF_ARCHITECTURE_Z_HPP + +#include + +#define SPROUT_ARCH_Z 0 + +#if defined(__SYSC_ZARCH__) +# undef SPROUT_ARCH_Z +# define SPROUT_ARCH_Z 1 +#endif + +#if SPROUT_ARCH_Z +# define SPROUT_ARCH_Z_AVAILABLE +#endif + +#define SPROUT_ARCH_Z_NAME "z/Architecture" + +#endif // #ifndef SPROUT_PREDEF_ARCHITECTURE_Z_HPP diff --git a/sprout/predef/compiler.hpp b/sprout/predef/compiler.hpp new file mode 100644 index 00000000..ec6fae27 --- /dev/null +++ b/sprout/predef/compiler.hpp @@ -0,0 +1,42 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_HPP +#define SPROUT_PREDEF_COMPILER_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif //#ifndef SPROUT_PREDEF_COMPILER_HPP diff --git a/sprout/predef/compiler/borland.hpp b/sprout/predef/compiler/borland.hpp new file mode 100644 index 00000000..c743c375 --- /dev/null +++ b/sprout/predef/compiler/borland.hpp @@ -0,0 +1,38 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_BORLAND_HPP +#define SPROUT_PREDEF_COMPILER_BORLAND_HPP + +#include +#include + +#define SPROUT_COMP_BORLAND 0 + +#if defined(__BORLANDC__) || defined(__CODEGEARC__) +# if !defined(SPROUT_COMP_BORLAND_DETECTION) && (defined(__CODEGEARC__)) +# define SPROUT_COMP_BORLAND_DETECTION SPROUT_PREDEF_MAKE_0X_VVRP(__CODEGEARC__) +# endif +# if !defined(SPROUT_COMP_BORLAND_DETECTION) +# define SPROUT_COMP_BORLAND_DETECTION SPROUT_PREDEF_MAKE_0X_VVRP(__BORLANDC__) +# endif +#endif + +#ifdef SPROUT_COMP_BORLAND_DETECTION +# define SPROUT_COMP_BORLAND_AVAILABLE +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_BORLAND_EMULATED SPROUT_COMP_BORLAND_DETECTION +# else +# undef SPROUT_COMP_BORLAND +# define SPROUT_COMP_BORLAND SPROUT_COMP_BORLAND_DETECTION +# endif +# include +#endif + +#define SPROUT_COMP_BORLAND_NAME "Borland C++" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_BORLAND_HPP diff --git a/sprout/predef/compiler/clang.hpp b/sprout/predef/compiler/clang.hpp new file mode 100644 index 00000000..c87da7e9 --- /dev/null +++ b/sprout/predef/compiler/clang.hpp @@ -0,0 +1,34 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_CLANG_HPP +#define SPROUT_PREDEF_COMPILER_CLANG_HPP + +#include +#include + +#define SPROUT_COMP_CLANG 0 + +#if defined(__clang__) +# define SPROUT_COMP_CLANG_DETECTION \ + SPROUT_VERSION_NUMBER(__clang_major__, __clang_minor__, __clang_patchlevel__) +#endif + +#ifdef SPROUT_COMP_CLANG_DETECTION +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_CLANG_EMULATED SPROUT_COMP_CLANG_DETECTION +# else +# undef SPROUT_COMP_CLANG +# define SPROUT_COMP_CLANG SPROUT_COMP_CLANG_DETECTION +# endif +# define SPROUT_COMP_CLANG_AVAILABLE +# include +#endif + +#define SPROUT_COMP_CLANG_NAME "Clang" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_CLANG_HPP diff --git a/sprout/predef/compiler/comeau.hpp b/sprout/predef/compiler/comeau.hpp new file mode 100644 index 00000000..ea02f3ec --- /dev/null +++ b/sprout/predef/compiler/comeau.hpp @@ -0,0 +1,38 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_COMEAU_HPP +#define SPROUT_PREDEF_COMPILER_COMEAU_HPP + +#include +#include + +#define SPROUT_COMP_COMO 0 + +#if defined(__COMO__) +# if !defined(SPROUT_COMP_COMO_DETECTION) && defined(__COMO_VERSION__) +# define SPROUT_COMP_COMO_DETECTION SPROUT_PREDEF_MAKE_0X_VRP(__COMO_VERSION__) +# endif +# if !defined(SPROUT_COMP_COMO_DETECTION) +# define SPROUT_COMP_COMO_DETECTION 1 +# endif +#endif + +#ifdef SPROUT_COMP_COMO_DETECTION +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_COMO_EMULATED SPROUT_COMP_COMO_DETECTION +# else +# undef SPROUT_COMP_COMO +# define SPROUT_COMP_COMO SPROUT_COMP_COMO_DETECTION +# endif +# define SPROUT_COMP_COMO_AVAILABLE +# include +#endif + +#define SPROUT_COMP_COMO_NAME "Comeau C++" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_COMEAU_HPP diff --git a/sprout/predef/compiler/compaq.hpp b/sprout/predef/compiler/compaq.hpp new file mode 100644 index 00000000..91342352 --- /dev/null +++ b/sprout/predef/compiler/compaq.hpp @@ -0,0 +1,41 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_COMPAQ_HPP +#define SPROUT_PREDEF_COMPILER_COMPAQ_HPP + +#include +#include + +#define SPROUT_COMP_DEC 0 + +#if defined(__DECC) || defined(__DECCXX) +# if !defined(SPROUT_COMP_DEC_DETECTION) && defined(__DECCXX_VER) +# define SPROUT_COMP_DEC_DETECTION SPROUT_PREDEF_MAKE_10_VVRR0PP00(__DECCXX_VER) +# endif +# if !defined(SPROUT_COMP_DEC_DETECTION) && defined(__DECC_VER) +# define SPROUT_COMP_DEC_DETECTION SPROUT_PREDEF_MAKE_10_VVRR0PP00(__DECC_VER) +# endif +# if !defined(SPROUT_COMP_DEC_DETECTION) +# define SPROUT_COM_DEC_DETECTION 1 +# endif +#endif + +#ifdef SPROUT_COMP_DEC_DETECTION +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_DEC_EMULATED SPROUT_COMP_DEC_DETECTION +# else +# undef SPROUT_COMP_DEC +# define SPROUT_COMP_DEC SPROUT_COMP_DEC_DETECTION +# endif +# define SPROUT_COMP_DEC_AVAILABLE +# include +#endif + +#define SPROUT_COMP_DEC_NAME "Compaq C/C++" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_COMPAQ_HPP diff --git a/sprout/predef/compiler/diab.hpp b/sprout/predef/compiler/diab.hpp new file mode 100644 index 00000000..42388934 --- /dev/null +++ b/sprout/predef/compiler/diab.hpp @@ -0,0 +1,33 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_DIAB_HPP +#define SPROUT_PREDEF_COMPILER_DIAB_HPP + +#include +#include + +#define SPROUT_COMP_DIAB 0 + +#if defined(__DCC__) +# define SPROUT_COMP_DIAB_DETECTION SPROUT_PREDEF_MAKE_10_VRPP(__VERSION_NUMBER__) +#endif + +#ifdef SPROUT_COMP_DIAB_DETECTION +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_DIAB_EMULATED SPROUT_COMP_DIAB_DETECTION +# else +# undef SPROUT_COMP_DIAB +# define SPROUT_COMP_DIAB SPROUT_COMP_DIAB_DETECTION +# endif +# define SPROUT_COMP_DIAB_AVAILABLE +# include +#endif + +#define SPROUT_COMP_DIAB_NAME "Diab C/C++" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_DIAB_HPP diff --git a/sprout/predef/compiler/digitalmars.hpp b/sprout/predef/compiler/digitalmars.hpp new file mode 100644 index 00000000..67ad2328 --- /dev/null +++ b/sprout/predef/compiler/digitalmars.hpp @@ -0,0 +1,33 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_DIGITALMARS_HPP +#define SPROUT_PREDEF_COMPILER_DIGITALMARS_HPP + +#include +#include + +#define SPROUT_COMP_DMC 0 + +#if defined(__DMC__) +# define SPROUT_COMP_DMC_DETECTION SPROUT_PREDEF_MAKE_0X_VRP(__DMC__) +#endif + +#ifdef SPROUT_COMP_DMC_DETECTION +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_DMC_EMULATED SPROUT_COMP_DMC_DETECTION +# else +# undef SPROUT_COMP_DMC +# define SPROUT_COMP_DMC SPROUT_COMP_DMC_DETECTION +# endif +# define SPROUT_COMP_DMC_AVAILABLE +# include +#endif + +#define SPROUT_COMP_DMC_NAME "Digital Mars" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_DIGITALMARS_HPP diff --git a/sprout/predef/compiler/dignus.hpp b/sprout/predef/compiler/dignus.hpp new file mode 100644 index 00000000..b85e689d --- /dev/null +++ b/sprout/predef/compiler/dignus.hpp @@ -0,0 +1,33 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_DIGNUS_HPP +#define SPROUT_PREDEF_COMPILER_DIGNUS_HPP + +#include +#include + +#define SPROUT_COMP_SYSC 0 + +#if defined(__SYSC__) +# define SPROUT_COMP_SYSC_DETECTION SPROUT_PREDEF_MAKE_10_VRRPP(__SYSC_VER__) +#endif + +#ifdef SPROUT_COMP_SYSC_DETECTION +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_SYSC_EMULATED SPROUT_COMP_SYSC_DETECTION +# else +# undef SPROUT_COMP_SYSC +# define SPROUT_COMP_SYSC SPROUT_COMP_SYSC_DETECTION +# endif +# define SPROUT_COMP_SYSC_AVAILABLE +# include +#endif + +#define SPROUT_COMP_SYSC_NAME "Dignus Systems/C++" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_DIGNUS_HPP diff --git a/sprout/predef/compiler/edg.hpp b/sprout/predef/compiler/edg.hpp new file mode 100644 index 00000000..ddde97b2 --- /dev/null +++ b/sprout/predef/compiler/edg.hpp @@ -0,0 +1,33 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_EDG_HPP +#define SPROUT_PREDEF_COMPILER_EDG_HPP + +#include +#include + +#define SPROUT_COMP_EDG 0 + +#if defined(__EDG__) +# define SPROUT_COMP_EDG_DETECTION SPROUT_PREDEF_MAKE_10_VRR(__EDG_VERSION__) +#endif + +#ifdef SPROUT_COMP_EDG_DETECTION +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_EDG_EMULATED SPROUT_COMP_EDG_DETECTION +# else +# undef SPROUT_COMP_EDG +# define SPROUT_COMP_EDG SPROUT_COMP_EDG_DETECTION +# endif +# define SPROUT_COMP_EDG_AVAILABLE +# include +#endif + +#define SPROUT_COMP_EDG_NAME "EDG C++ Frontend" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_EDG_HPP diff --git a/sprout/predef/compiler/ekopath.hpp b/sprout/predef/compiler/ekopath.hpp new file mode 100644 index 00000000..c9dcba01 --- /dev/null +++ b/sprout/predef/compiler/ekopath.hpp @@ -0,0 +1,34 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_EKOPATH_HPP +#define SPROUT_PREDEF_COMPILER_EKOPATH_HPP + +#include +#include + +#define SPROUT_COMP_PATH 0 + +#if defined(__PATHCC__) +# define SPROUT_COMP_PATH_DETECTION \ + SPROUT_VERSION_NUMBER(__PATHCC__, __PATHCC_MINOR__, __PATHCC_PATCHLEVEL__) +#endif + +#ifdef SPROUT_COMP_PATH_DETECTION +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_PATH_EMULATED SPROUT_COMP_PATH_DETECTION +# else +# undef SPROUT_COMP_PATH +# define SPROUT_COMP_PATH SPROUT_COMP_PATH_DETECTION +# endif +# define SPROUT_COMP_PATH_AVAILABLE +# include +#endif + +#define SPROUT_COMP_PATH_NAME "EKOpath" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_EKOPATH_HPP diff --git a/sprout/predef/compiler/gcc.hpp b/sprout/predef/compiler/gcc.hpp new file mode 100644 index 00000000..87c03e58 --- /dev/null +++ b/sprout/predef/compiler/gcc.hpp @@ -0,0 +1,41 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_GCC_HPP +#define SPROUT_PREDEF_COMPILER_GCC_HPP + +#include +#include +#include + +#define SPROUT_COMP_GNUC 0 + +#if defined(__GNUC__) +# if !defined(SPROUT_COMP_GNUC_DETECTION) && defined(__GNUC_PATCHLEVEL__) +# define SPROUT_COMP_GNUC_DETECTION \ + SPROUT_VERSION_NUMBER(__GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__) +# endif +# if !defined(SPROUT_COMP_GNUC_DETECTION) +# define SPROUT_COMP_GNUC_DETECTION \ + SPROUT_VERSION_NUMBER(__GNUC__, __GNUC_MINOR__, 0) +# endif +#endif + +#ifdef SPROUT_COMP_GNUC_DETECTION +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_GNUC_EMULATED SPROUT_COMP_GNUC_DETECTION +# else +# undef SPROUT_COMP_GNUC +# define SPROUT_COMP_GNUC SPROUT_COMP_GNUC_DETECTION +# endif +# define SPROUT_COMP_GNUC_AVAILABLE +# include +#endif + +#define SPROUT_COMP_GNUC_NAME "Gnu GCC C/C++" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_GCC_HPP diff --git a/sprout/predef/compiler/gcc_xml.hpp b/sprout/predef/compiler/gcc_xml.hpp new file mode 100644 index 00000000..6a4dca8c --- /dev/null +++ b/sprout/predef/compiler/gcc_xml.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_GCC_XML_HPP +#define SPROUT_PREDEF_COMPILER_GCC_XML_HPP + +#include + +#define SPROUT_COMP_GCCXML 0 + +#if defined(__GCCXML__) +# define SPROUT_COMP_GCCXML_DETECTION 1 +#endif + +#ifdef SPROUT_COMP_GCCXML_DETECTION +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_GCCXML_EMULATED SPROUT_COMP_GCCXML_DETECTION +# else +# undef SPROUT_COMP_GCCXML +# define SPROUT_COMP_GCCXML SPROUT_COMP_GCCXML_DETECTION +# endif +# define SPROUT_COMP_GCCXML_AVAILABLE +# include +#endif + +#define SPROUT_COMP_GCCXML_NAME "GCC XML" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_GCC_XML_HPP diff --git a/sprout/predef/compiler/greenhills.hpp b/sprout/predef/compiler/greenhills.hpp new file mode 100644 index 00000000..fe8498e8 --- /dev/null +++ b/sprout/predef/compiler/greenhills.hpp @@ -0,0 +1,41 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_GREENHILLS_HPP +#define SPROUT_PREDEF_COMPILER_GREENHILLS_HPP + +#include +#include + +#define SPROUT_COMP_GHS 0 + +#if defined(__ghs) || defined(__ghs__) +# if !defined(SPROUT_COMP_GHS_DETECTION) && defined(__GHS_VERSION_NUMBER__) +# define SPROUT_COMP_GHS_DETECTION SPROUT_PREDEF_MAKE_10_VRP(__GHS_VERSION_NUMBER__) +# endif +# if !defined(SPROUT_COMP_GHS_DETECTION) && defined(__ghs) +# define SPROUT_COMP_GHS_DETECTION SPROUT_PREDEF_MAKE_10_VRP(__ghs) +# endif +# if !defined(SPROUT_COMP_GHS_DETECTION) +# define SPROUT_COMP_GHS_DETECTION 1 +# endif +#endif + +#ifdef SPROUT_COMP_GHS_DETECTION +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_GHS_EMULATED SPROUT_COMP_GHS_DETECTION +# else +# undef SPROUT_COMP_GHS +# define SPROUT_COMP_GHS SPROUT_COMP_GHS_DETECTION +# endif +# define SPROUT_COMP_GHS_AVAILABLE +# include +#endif + +#define SPROUT_COMP_GHS_NAME "Green Hills C/C++" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_GREENHILLS_HPP diff --git a/sprout/predef/compiler/hp_acc.hpp b/sprout/predef/compiler/hp_acc.hpp new file mode 100644 index 00000000..6a460e33 --- /dev/null +++ b/sprout/predef/compiler/hp_acc.hpp @@ -0,0 +1,38 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_HP_ACC_HPP +#define SPROUT_PREDEF_COMPILER_HP_ACC_HPP + +#include +#include + +#define SPROUT_COMP_HPACC 0 + +#if defined(__HP_aCC) +# if !defined(SPROUT_COMP_HPACC_DETECTION) && (__HP_aCC > 1) +# define SPROUT_COMP_HPACC_DETECTION SPROUT_PREDEF_MAKE_10_VVRRPP(__HP_aCC) +# endif +# if !defined(SPROUT_COMP_HPACC_DETECTION) +# define SPROUT_COMP_HPACC_DETECTION 1 +# endif +#endif + +#ifdef SPROUT_COMP_HPACC_DETECTION +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_HPACC_EMULATED SPROUT_COMP_HPACC_DETECTION +# else +# undef SPROUT_COMP_HPACC +# define SPROUT_COMP_HPACC SPROUT_COMP_HPACC_DETECTION +# endif +# define SPROUT_COMP_HPACC_AVAILABLE +# include +#endif + +#define SPROUT_COMP_HPACC_NAME "HP aC++" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_HP_ACC_HPP diff --git a/sprout/predef/compiler/iar.hpp b/sprout/predef/compiler/iar.hpp new file mode 100644 index 00000000..fe380d8d --- /dev/null +++ b/sprout/predef/compiler/iar.hpp @@ -0,0 +1,33 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_IAR_HPP +#define SPROUT_PREDEF_COMPILER_IAR_HPP + +#include +#include + +#define SPROUT_COMP_IAR 0 + +#if defined(__IAR_SYSTEMS_ICC__) +# define SPROUT_COMP_IAR_DETECTION SPROUT_PREDEF_MAKE_10_VVRR(__VER__) +#endif + +#ifdef SPROUT_COMP_IAR_DETECTION +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_IAR_EMULATED SPROUT_COMP_IAR_DETECTION +# else +# undef SPROUT_COMP_IAR +# define SPROUT_COMP_IAR SPROUT_COMP_IAR_DETECTION +# endif +# define SPROUT_COMP_IAR_AVAILABLE +# include +#endif + +#define SPROUT_COMP_IAR_NAME "IAR C/C++" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_IAR_HPP diff --git a/sprout/predef/compiler/ibm.hpp b/sprout/predef/compiler/ibm.hpp new file mode 100644 index 00000000..f73a0455 --- /dev/null +++ b/sprout/predef/compiler/ibm.hpp @@ -0,0 +1,44 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_IBM_HPP +#define SPROUT_PREDEF_COMPILER_IBM_HPP + +#include +#include + +#define SPROUT_COMP_IBM 0 + +#if defined(__IBMCPP__) || defined(__xlC__) || defined(__xlc__) +# if !defined(SPROUT_COMP_IBM_DETECTION) && defined(__COMPILER_VER__) +# define SPROUT_COMP_IBM_DETECTION SPROUT_PREDEF_MAKE_0X_VRRPPPP(__COMPILER_VER__) +# endif +# if !defined(SPROUT_COMP_IBM_DETECTION) && defined(__xlC__) +# define SPROUT_COMP_IBM_DETECTION SPROUT_PREDEF_MAKE_0X_VVRR(__xlC__) +# endif +# if !defined(SPROUT_COMP_IBM_DETECTION) && defined(__xlc__) +# define SPROUT_COMP_IBM_DETECTION SPROUT_PREDEF_MAKE_0X_VVRR(__xlc__) +# endif +# if !defined(SPROUT_COMP_IBM_DETECTION) +# define SPROUT_COMP_IBM_DETECTION SPROUT_PREDEF_MAKE_10_VRP(__IBMCPP__) +# endif +#endif + +#ifdef SPROUT_COMP_IBM_DETECTION +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_IBM_EMULATED SPROUT_COMP_IBM_DETECTION +# else +# undef SPROUT_COMP_IBM +# define SPROUT_COMP_IBM SPROUT_COMP_IBM_DETECTION +# endif +# define SPROUT_COMP_IBM_AVAILABLE +# include +#endif + +#define SPROUT_COMP_IBM_NAME "IBM XL C/C++" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_IBM_HPP diff --git a/sprout/predef/compiler/intel.hpp b/sprout/predef/compiler/intel.hpp new file mode 100644 index 00000000..ce44a747 --- /dev/null +++ b/sprout/predef/compiler/intel.hpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_INTEL_HPP +#define SPROUT_PREDEF_COMPILER_INTEL_HPP + +#include +#include + +#define SPROUT_COMP_INTEL 0 + +#if defined(__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || \ + defined(__ECC) +# if !defined(SPROUT_COMP_INTEL_DETECTION) && defined(__INTEL_COMPILER) +# define SPROUT_COMP_INTEL_DETECTION SPROUT_PREDEF_MAKE_10_VRP(__INTEL_COMPILER) +# endif +# if !defined(SPROUT_COMP_INTEL_DETECTION) +# define SPROUT_COMP_INTEL_DETECTION 1 +# endif +#endif + +#ifdef SPROUT_COMP_INTEL_DETECTION +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_INTEL_EMULATED SPROUT_COMP_INTEL_DETECTION +# else +# undef SPROUT_COMP_INTEL +# define SPROUT_COMP_INTEL SPROUT_COMP_INTEL_DETECTION +# endif +# define SPROUT_COMP_INTEL_AVAILABLE +# include +#endif + +#define SPROUT_COMP_INTEL_NAME "Intel C/C++" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_INTEL_HPP diff --git a/sprout/predef/compiler/kai.hpp b/sprout/predef/compiler/kai.hpp new file mode 100644 index 00000000..3357980c --- /dev/null +++ b/sprout/predef/compiler/kai.hpp @@ -0,0 +1,33 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_KAI_HPP +#define SPROUT_PREDEF_COMPILER_KAI_HPP + +#include +#include + +#define SPROUT_COMP_KCC 0 + +#if defined(__KCC) +# define SPROUT_COMP_KCC_DETECTION SPROUT_PREDEF_MAKE_0X_VRPP(__KCC_VERSION) +#endif + +#ifdef SPROUT_COMP_KCC_DETECTION +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_KCC_EMULATED SPROUT_COMP_KCC_DETECTION +# else +# undef SPROUT_COMP_KCC +# define SPROUT_COMP_KCC SPROUT_COMP_KCC_DETECTION +# endif +# define SPROUT_COMP_KCC_AVAILABLE +# include +#endif + +#define SPROUT_COMP_KCC_NAME "Kai C++" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_KAI_HPP diff --git a/sprout/predef/compiler/llvm.hpp b/sprout/predef/compiler/llvm.hpp new file mode 100644 index 00000000..d35c502b --- /dev/null +++ b/sprout/predef/compiler/llvm.hpp @@ -0,0 +1,33 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_LLVM_HPP +#define SPROUT_PREDEF_COMPILER_LLVM_HPP + +#include +#include + +#define SPROUT_COMP_LLVM 0 + +#if defined(__llvm__) +# define SPROUT_COMP_LLVM_DETECTION 1 +#endif + +#ifdef SPROUT_COMP_LLVM_DETECTION +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_LLVM_EMULATED SPROUT_COMP_LLVM_DETECTION +# else +# undef SPROUT_COMP_LLVM +# define SPROUT_COMP_LLVM SPROUT_COMP_LLVM_DETECTION +# endif +# define SPROUT_COMP_LLVM_AVAILABLE +# include +#endif + +#define SPROUT_COMP_LLVM_NAME "LLVM" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_LLVM_HPP diff --git a/sprout/predef/compiler/metaware.hpp b/sprout/predef/compiler/metaware.hpp new file mode 100644 index 00000000..04f5adc3 --- /dev/null +++ b/sprout/predef/compiler/metaware.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_METAWARE_HPP +#define SPROUT_PREDEF_COMPILER_METAWARE_HPP + +#include + +#define SPROUT_COMP_HIGHC 0 + +#if defined(__HIGHC__) +# define SPROUT_COMP_HIGHC_DETECTION 1 +#endif + +#ifdef SPROUT_COMP_HIGHC_DETECTION +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_HIGHC_EMULATED SPROUT_COMP_HIGHC_DETECTION +# else +# undef SPROUT_COMP_HIGHC +# define SPROUT_COMP_HIGHC SPROUT_COMP_HIGHC_DETECTION +# endif +# define SPROUT_COMP_HIGHC_AVAILABLE +# include +#endif + +#define SPROUT_COMP_HIGHC_NAME "MetaWare High C/C++" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_METAWARE_HPP diff --git a/sprout/predef/compiler/metrowerks.hpp b/sprout/predef/compiler/metrowerks.hpp new file mode 100644 index 00000000..1369ce18 --- /dev/null +++ b/sprout/predef/compiler/metrowerks.hpp @@ -0,0 +1,51 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_METROWERKS_HPP +#define SPROUT_PREDEF_COMPILER_METROWERKS_HPP + +#include +#include +#include + +#define SPROUT_COMP_MWERKS 0 + +#if defined(__MWERKS__) || defined(__CWCC__) +# if !defined(SPROUT_COMP_MWERKS_DETECTION) && defined(__CWCC__) +# define SPROUT_COMP_MWERKS_DETECTION SPROUT_PREDEF_MAKE_0X_VRPP(__CWCC__) +# endif +# if !defined(SPROUT_COMP_MWERKS_DETECTION) && (__MWERKS__ >= 0x4200) +# define SPROUT_COMP_MWERKS_DETECTION SPROUT_PREDEF_MAKE_0X_VRPP(__MWERKS__) +# endif +# if !defined(SPROUT_COMP_MWERKS_DETECTION) && (__MWERKS__ >= 0x3204) +# define SPROUT_COMP_MWERKS_DETECTION SPROUT_VERSION_NUMBER(9, (__MWERKS__) % 100 - 1, 0) +# endif +# if !defined(SPROUT_COMP_MWERKS_DETECTION) && (__MWERKS__ >= 0x3200) +# define SPROUT_COMP_MWERKS_DETECTION SPROUT_VERSION_NUMBER(9, (__MWERKS__) % 100, 0) +# endif +# if !defined(SPROUT_COMP_MWERKS_DETECTION) && (__MWERKS__ >= 0x3000) +# define SPROUT_COMP_MWERKS_DETECTION SPROUT_VERSION_NUMBER(8, (__MWERKS__) % 100, 0) +# endif +# if !defined(SPROUT_COMP_MWERKS_DETECTION) +# define SPROUT_COMP_MWERKS_DETECTION 1 +# endif +#endif + +#ifdef SPROUT_COMP_MWERKS_DETECTION +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_MWERKS_EMULATED SPROUT_COMP_MWERKS_DETECTION +# else +# undef SPROUT_COMP_MWERKS +# define SPROUT_COMP_MWERKS SPROUT_COMP_MWERKS_DETECTION +# endif +# define SPROUT_COMP_MWERKS_AVAILABLE +# include +#endif + +#define SPROUT_COMP_MWERKS_NAME "Metrowerks CodeWarrior" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_METROWERKS_HPP diff --git a/sprout/predef/compiler/microtec.hpp b/sprout/predef/compiler/microtec.hpp new file mode 100644 index 00000000..98d4f652 --- /dev/null +++ b/sprout/predef/compiler/microtec.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_MICROTEC_HPP +#define SPROUT_PREDEF_COMPILER_MICROTEC_HPP + +#include + +#define SPROUT_COMP_MRI 0 + +#if defined(_MRI) +# define SPROUT_COMP_MRI_DETECTION 1 +#endif + +#ifdef SPROUT_COMP_MRI_DETECTION +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_MRI_EMULATED SPROUT_COMP_MRI_DETECTION +# else +# undef SPROUT_COMP_MRI +# define SPROUT_COMP_MRI SPROUT_COMP_MRI_DETECTION +# endif +# define SPROUT_COMP_MRI_AVAILABLE +# include +#endif + +#define SPROUT_COMP_MRI_NAME "Microtec C/C++" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_MICROTEC_HPP diff --git a/sprout/predef/compiler/mpw.hpp b/sprout/predef/compiler/mpw.hpp new file mode 100644 index 00000000..e95e1172 --- /dev/null +++ b/sprout/predef/compiler/mpw.hpp @@ -0,0 +1,38 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_MPW_HPP +#define SPROUT_PREDEF_COMPILER_MPW_HPP + +#include +#include + +#define SPROUT_COMP_MPW 0 + +#if defined(__MRC__) || defined(MPW_C) || defined(MPW_CPLUS) +# if !defined(SPROUT_COMP_MPW_DETECTION) && defined(__MRC__) +# define SPROUT_COMP_MPW_DETECTION SPROUT_PREDEF_MAKE_0X_VVRR(__MRC__) +# endif +# if !defined(SPROUT_COMP_MPW_DETECTION) +# define SPROUT_COMP_MPW_DETECTION 1 +# endif +#endif + +#ifdef SPROUT_COMP_MPW_DETECTION +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_MPW_EMULATED SPROUT_COMP_MPW_DETECTION +# else +# undef SPROUT_COMP_MPW +# define SPROUT_COMP_MPW SPROUT_COMP_MPW_DETECTION +# endif +# define SPROUT_COMP_MPW_AVAILABLE +# include +#endif + +#define SPROUT_COMP_MPW_NAME "MPW C++" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_MPW_HPP diff --git a/sprout/predef/compiler/palm.hpp b/sprout/predef/compiler/palm.hpp new file mode 100644 index 00000000..709d42ab --- /dev/null +++ b/sprout/predef/compiler/palm.hpp @@ -0,0 +1,33 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_PALM_HPP +#define SPROUT_PREDEF_COMPILER_PALM_HPP + +#include +#include + +#define SPROUT_COMP_PALM 0 + +#if defined(_PACC_VER) +# define SPROUT_COMP_PALM_DETECTION SPROUT_PREDEF_MAKE_0X_VRRPP000(_PACC_VER) +#endif + +#ifdef SPROUT_COMP_PALM_DETECTION +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_PALM_EMULATED SPROUT_COMP_PALM_DETECTION +# else +# undef SPROUT_COMP_PALM +# define SPROUT_COMP_PALM SPROUT_COMP_PALM_DETECTION +# endif +# define SPROUT_COMP_PALM_AVAILABLE +# include +#endif + +#define SPROUT_COMP_PALM_NAME "Palm C/C++" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_PALM_HPP diff --git a/sprout/predef/compiler/pgi.hpp b/sprout/predef/compiler/pgi.hpp new file mode 100644 index 00000000..b8bf3bf7 --- /dev/null +++ b/sprout/predef/compiler/pgi.hpp @@ -0,0 +1,38 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_PGI_HPP +#define SPROUT_PREDEF_COMPILER_PGI_HPP + +#include +#include + +#define SPROUT_COMP_PGI 0 + +#if defined(__PGI) +# if !defined(SPROUT_COMP_PGI_DETECTION) && (defined(__PGIC__) && defined(__PGIC_MINOR__) && defined(__PGIC_PATCHLEVEL__)) +# define SPROUT_COMP_PGI_DETECTION SPROUT_VERSION_NUMBER(__PGIC__, __PGIC_MINOR__, __PGIC_PATCHLEVEL__) +# endif +# if !defined(SPROUT_COMP_PGI_DETECTION) +# define SPROUT_COMP_PGI_DETECTION 1 +# endif +#endif + +#ifdef SPROUT_COMP_PGI_DETECTION +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_PGI_EMULATED SPROUT_COMP_PGI_DETECTION +# else +# undef SPROUT_COMP_PGI +# define SPROUT_COMP_PGI SPROUT_COMP_PGI_DETECTION +# endif +# define SPROUT_COMP_PGI_AVAILABLE +# include +#endif + +#define SPROUT_COMP_PGI_NAME "Portland Group C/C++" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_PGI_HPP diff --git a/sprout/predef/compiler/sgi_mipspro.hpp b/sprout/predef/compiler/sgi_mipspro.hpp new file mode 100644 index 00000000..6503c580 --- /dev/null +++ b/sprout/predef/compiler/sgi_mipspro.hpp @@ -0,0 +1,41 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_SGI_MIPSPRO_HPP +#define SPROUT_PREDEF_COMPILER_SGI_MIPSPRO_HPP + +#include +#include + +#define SPROUT_COMP_SGI 0 + +#if defined(__sgi) || defined(sgi) +# if !defined(SPROUT_COMP_SGI_DETECTION) && defined(_SGI_COMPILER_VERSION) +# define SPROUT_COMP_SGI_DETECTION SPROUT_PREDEF_MAKE_10_VRP(_SGI_COMPILER_VERSION) +# endif +# if !defined(SPROUT_COMP_SGI_DETECTION) && defined(_COMPILER_VERSION) +# define SPROUT_COMP_SGI_DETECTION SPROUT_PREDEF_MAKE_10_VRP(_COMPILER_VERSION) +# endif +# if !defined(SPROUT_COMP_SGI_DETECTION) +# define SPROUT_COMP_SGI_DETECTION 1 +# endif +#endif + +#ifdef SPROUT_COMP_SGI_DETECTION +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_SGI_EMULATED SPROUT_COMP_SGI_DETECTION +# else +# undef SPROUT_COMP_SGI +# define SPROUT_COMP_SGI SPROUT_COMP_SGI_DETECTION +# endif +# define SPROUT_COMP_SGI_AVAILABLE +# include +#endif + +#define SPROUT_COMP_SGI_NAME "SGI MIPSpro" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_SGI_MIPSPRO_HPP diff --git a/sprout/predef/compiler/sunpro.hpp b/sprout/predef/compiler/sunpro.hpp new file mode 100644 index 00000000..b4c95f2a --- /dev/null +++ b/sprout/predef/compiler/sunpro.hpp @@ -0,0 +1,49 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_SUNPRO_HPP +#define SPROUT_PREDEF_COMPILER_SUNPRO_HPP + +#include +#include + +#define SPROUT_COMP_SUNPRO 0 + +#if defined(__SUNPRO_CC) || defined(__SUNPRO_C) +# if !defined(SPROUT_COMP_SUNPRO_DETECTION) && defined(__SUNPRO_CC) +# if (__SUNPRO_CC < 0x5100) +# define SPROUT_COMP_SUNPRO_DETECTION SPROUT_PREDEF_MAKE_0X_VRP(__SUNPRO_CC) +# else +# define SPROUT_COMP_SUNPRO_DETECTION SPROUT_PREDEF_MAKE_0X_VVRRP(__SUNPRO_CC) +# endif +# endif +# if !defined(SPROUT_COMP_SUNPRO_DETECTION) && defined(__SUNPRO_C) +# if (__SUNPRO_C < 0x5100) +# define SPROUT_COMP_SUNPRO_DETECTION SPROUT_PREDEF_MAKE_0X_VRP(__SUNPRO_C) +# else +# define SPROUT_COMP_SUNPRO_DETECTION SPROUT_PREDEF_MAKE_0X_VVRRP(__SUNPRO_C) +# endif +# endif +# if !defined(SPROUT_COMP_SUNPRO_DETECTION) +# define SPROUT_COMP_SUNPRO_DETECTION 1 +# endif +#endif + +#ifdef SPROUT_COMP_SUNPRO_DETECTION +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_SUNPRO_EMULATED SPROUT_COMP_SUNPRO_DETECTION +# else +# undef SPROUT_COMP_SUNPRO +# define SPROUT_COMP_SUNPRO SPROUT_COMP_SUNPRO_DETECTION +# endif +# define SPROUT_COMP_SUNPRO_AVAILABLE +# include +#endif + +#define SPROUT_COMP_SUNPRO_NAME "Oracle Solaris Studio" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_SUNPRO_HPP diff --git a/sprout/predef/compiler/tendra.hpp b/sprout/predef/compiler/tendra.hpp new file mode 100644 index 00000000..50dbe9e1 --- /dev/null +++ b/sprout/predef/compiler/tendra.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_TENDRA_HPP +#define SPROUT_PREDEF_COMPILER_TENDRA_HPP + +#include + +#define SPROUT_COMP_TENDRA 0 + +#if defined(__TenDRA__) +# define SPROUT_COMP_TENDRA_DETECTION 1 +#endif + +#ifdef SPROUT_COMP_TENDRA_DETECTION +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_TENDRA_EMULATED SPROUT_COMP_TENDRA_DETECTION +# else +# undef SPROUT_COMP_TENDRA +# define SPROUT_COMP_TENDRA SPROUT_COMP_TENDRA_DETECTION +# endif +# define SPROUT_COMP_TENDRA_AVAILABLE +# include +#endif + +#define SPROUT_COMP_TENDRA_NAME "TenDRA C/C++" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_TENDRA_HPP diff --git a/sprout/predef/compiler/visualc.hpp b/sprout/predef/compiler/visualc.hpp new file mode 100644 index 00000000..c4e9991c --- /dev/null +++ b/sprout/predef/compiler/visualc.hpp @@ -0,0 +1,51 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_VISUALC_HPP +#define SPROUT_PREDEF_COMPILER_VISUALC_HPP + +#include +#include +#include + +#define SPROUT_COMP_MSVC 0 + +#if defined(_MSC_VER) +# if !defined (_MSC_FULL_VER) +# define SPROUT_COMP_MSVC_BUILD 0 +# else +# if _MSC_FULL_VER / 10000 == _MSC_VER +# define SPROUT_COMP_MSVC_BUILD (_MSC_FULL_VER % 10000) +# elif _MSC_FULL_VER / 100000 == _MSC_VER +# define SPROUT_COMP_MSVC_BUILD (_MSC_FULL_VER % 100000) +# else +# error "Cannot determine build number from _MSC_FULL_VER" +# endif +# endif +# if (_MSC_VER >= 1900) +# define SPROUT_COMP_MSVC_DETECTION \ + SPROUT_VERSION_NUMBER(_MSC_VER / 100 - 5, _MSC_VER % 100, SPROUT_COMP_MSVC_BUILD) +# else +# define SPROUT_COMP_MSVC_DETECTION \ + SPROUT_VERSION_NUMBER(_MSC_VER / 100 - 6, _MSC_VER % 100, SPROUT_COMP_MSVC_BUILD) +# endif +#endif + +#ifdef SPROUT_COMP_MSVC_DETECTION +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_MSVC_EMULATED SPROUT_COMP_MSVC_DETECTION +# else +# undef SPROUT_COMP_MSVC +# define SPROUT_COMP_MSVC SPROUT_COMP_MSVC_DETECTION +# endif +# define SPROUT_COMP_MSVC_AVAILABLE +# include +#endif + +#define SPROUT_COMP_MSVC_NAME "Microsoft Visual C/C++" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_VISUALC_HPP diff --git a/sprout/predef/compiler/watcom.hpp b/sprout/predef/compiler/watcom.hpp new file mode 100644 index 00000000..fda83a81 --- /dev/null +++ b/sprout/predef/compiler/watcom.hpp @@ -0,0 +1,33 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_COMPILER_WATCOM_HPP +#define SPROUT_PREDEF_COMPILER_WATCOM_HPP + +#include +#include + +#define SPROUT_COMP_WATCOM 0 + +#if defined(__WATCOMC__) +# define SPROUT_COMP_WATCOM_DETECTION SPROUT_PREDEF_MAKE_10_VVRR(__WATCOMC__) +#endif + +#ifdef SPROUT_COMP_WATCOM_DETECTION +# if defined(SPROUT_PREDEF_DETAIL_COMP_DETECTED) +# define SPROUT_COMP_WATCOM_EMULATED SPROUT_COMP_WATCOM_DETECTION +# else +# undef SPROUT_COMP_WATCOM +# define SPROUT_COMP_WATCOM SPROUT_COMP_WATCOM_DETECTION +# endif +# define SPROUT_COMP_WATCOM_AVAILABLE +# include +#endif + +#define SPROUT_COMP_WATCOM_NAME "Watcom C++" + +#endif //#ifndef SPROUT_PREDEF_COMPILER_WATCOM_HPP diff --git a/sprout/predef/detail/comp_detected.hpp b/sprout/predef/detail/comp_detected.hpp new file mode 100644 index 00000000..7550966a --- /dev/null +++ b/sprout/predef/detail/comp_detected.hpp @@ -0,0 +1,17 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_DETAIL_COMP_DETECTED_HPP +#define SPROUT_PREDEF_DETAIL_COMP_DETECTED_HPP + +#include + +#ifndef SPROUT_PREDEF_DETAIL_COMP_DETECTED +# define SPROUT_PREDEF_DETAIL_COMP_DETECTED 1 +#endif + +#endif // #ifndef SPROUT_PREDEF_DETAIL_COMP_DETECTED_HPP diff --git a/sprout/predef/detail/endian_compat.hpp b/sprout/predef/detail/endian_compat.hpp new file mode 100644 index 00000000..d26760fd --- /dev/null +++ b/sprout/predef/detail/endian_compat.hpp @@ -0,0 +1,27 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_DETAIL_ENDIAN_COMPAT_HPP +#define SPROUT_PREDEF_DETAIL_ENDIAN_COMPAT_HPP + +#include +#include + +#if SPROUT_ENDIAN_BIG_BYTE +# define SPROUT_BIG_ENDIAN +# define SPROUT_BYTE_ORDER 4321 +#endif +#if SPROUT_ENDIAN_LITTLE_BYTE +# define SPROUT_LITTLE_ENDIAN +# define SPROUT_BYTE_ORDER 1234 +#endif +#if SPROUT_ENDIAN_LITTLE_WORD +# define SPROUT_PDP_ENDIAN +# define SPROUT_BYTE_ORDER 2134 +#endif + +#endif // #ifndef SPROUT_PREDEF_HPP diff --git a/sprout/predef/detail/os_detected.hpp b/sprout/predef/detail/os_detected.hpp new file mode 100644 index 00000000..aeb7d67d --- /dev/null +++ b/sprout/predef/detail/os_detected.hpp @@ -0,0 +1,17 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_DETAIL_OS_DETECTED_HPP +#define SPROUT_PREDEF_DETAIL_OS_DETECTED_HPP + +#include + +#ifndef SPROUT_PREDEF_DETAIL_OS_DETECTED +# define SPROUT_PREDEF_DETAIL_OS_DETECTED 1 +#endif + +#endif // #ifndef SPROUT_PREDEF_DETAIL_OS_DETECTED_HPP diff --git a/sprout/predef/detail/platform_detected.hpp b/sprout/predef/detail/platform_detected.hpp new file mode 100644 index 00000000..88e726e8 --- /dev/null +++ b/sprout/predef/detail/platform_detected.hpp @@ -0,0 +1,17 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_DETAIL_PLATFORM_DETECTED_HPP +#define SPROUT_PREDEF_DETAIL_PLATFORM_DETECTED_HPP + +#include + +#ifndef SPROUT_PREDEF_DETAIL_PLAT_DETECTED +# define SPROUT_PREDEF_DETAIL_PLAT_DETECTED 1 +#endif + +#endif // #ifndef SPROUT_PREDEF_DETAIL_PLATFORM_DETECTED_HPP diff --git a/sprout/predef/hardware.hpp b/sprout/predef/hardware.hpp new file mode 100644 index 00000000..25853320 --- /dev/null +++ b/sprout/predef/hardware.hpp @@ -0,0 +1,14 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_HARDWARE_HPP +#define SPROUT_PREDEF_HARDWARE_HPP + +#include +#include + +#endif // #ifndef SPROUT_PREDEF_HARDWARE_HPP diff --git a/sprout/predef/hardware/simd.hpp b/sprout/predef/hardware/simd.hpp new file mode 100644 index 00000000..1ee6a1d4 --- /dev/null +++ b/sprout/predef/hardware/simd.hpp @@ -0,0 +1,47 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_HARDWARE_SIMD_HPP +#define SPROUT_PREDEF_HARDWARE_SIMD_HPP + +#include +#include +#include +#include +#include + +#if defined(SPROUT_HW_SIMD_ARM_AVAILABLE) && defined(SPROUT_HW_SIMD_PPC_AVAILABLE) \ + || defined(SPROUT_HW_SIMD_ARM_AVAILABLE) && defined(SPROUT_HW_SIMD_X86_AVAILABLE) \ + || defined(SPROUT_HW_SIMD_PPC_AVAILABLE) && defined(SPROUT_HW_SIMD_X86_AVAILABLE) +# error "Multiple SIMD architectures detected, this cannot happen!" +#endif + +#if defined(SPROUT_HW_SIMD_X86_AVAILABLE) +# define SPROUT_HW_SIMD SPROUT_HW_SIMD_X86 +#endif + +#if defined(SPROUT_HW_SIMD_X86_AMD_AVAILABLE) +# define SPROUT_HW_SIMD SPROUT_HW_SIMD_X86_AMD +#endif + +#if defined(SPROUT_HW_SIMD_ARM_AVAILABLE) +# define SPROUT_HW_SIMD SPROUT_HW_SIMD_ARM +#endif + +#if defined(SPROUT_HW_SIMD_PPC_AVAILABLE) +# define SPROUT_HW_SIMD SPROUT_HW_SIMD_PPC +#endif + +#if defined(SPROUT_HW_SIMD) +# define SPROUT_HW_SIMD_AVAILABLE +#else +# define SPROUT_HW_SIMD 0 +#endif + +#define SPROUT_HW_SIMD_NAME "Hardware SIMD" + +#endif // #ifndef SPROUT_PREDEF_HARDWARE_SIMD_HPP diff --git a/sprout/predef/hardware/simd/arm.hpp b/sprout/predef/hardware/simd/arm.hpp new file mode 100644 index 00000000..7fa8b578 --- /dev/null +++ b/sprout/predef/hardware/simd/arm.hpp @@ -0,0 +1,29 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_HARDWARE_SIMD_ARM_HPP +#define SPROUT_PREDEF_HARDWARE_SIMD_ARM_HPP + +#include +#include + +#define SPROUT_HW_SIMD_ARM 0 + +#undef SPROUT_HW_SIMD_ARM +#if !defined(SPROUT_HW_SIMD_ARM) && (defined(__ARM_NEON__) || defined(__aarch64__) || defined (_M_ARM)) +# define SPROUT_HW_SIMD_ARM SPROUT_HW_SIMD_ARM_NEON_VERSION +#endif + +#if !defined(SPROUT_HW_SIMD_ARM) +# define SPROUT_HW_SIMD_ARM 0 +#else +# define SPROUT_HW_SIMD_ARM_AVAILABLE +#endif + +#define SPROUT_HW_SIMD_ARM_NAME "ARM SIMD" + +#endif // #ifndef SPROUT_PREDEF_HARDWARE_SIMD_ARM_HPP diff --git a/sprout/predef/hardware/simd/arm/versions.hpp b/sprout/predef/hardware/simd/arm/versions.hpp new file mode 100644 index 00000000..1ffc2661 --- /dev/null +++ b/sprout/predef/hardware/simd/arm/versions.hpp @@ -0,0 +1,16 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_HARDWARE_SIMD_ARM_VERSIONS_HPP +#define SPROUT_PREDEF_HARDWARE_SIMD_ARM_VERSIONS_HPP + +#include +#include + +#define SPROUT_HW_SIMD_ARM_NEON_VERSION SPROUT_VERSION_NUMBER(1, 0, 0) + +#endif // #ifndef SPROUT_PREDEF_HARDWARE_SIMD_ARM_VERSIONS_HPP diff --git a/sprout/predef/hardware/simd/ppc.hpp b/sprout/predef/hardware/simd/ppc.hpp new file mode 100644 index 00000000..39dfb216 --- /dev/null +++ b/sprout/predef/hardware/simd/ppc.hpp @@ -0,0 +1,35 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_HARDWARE_SIMD_PPC_HPP +#define SPROUT_PREDEF_HARDWARE_SIMD_PPC_HPP + +#include +#include + +#define SPROUT_HW_SIMD_PPC 0 + +#undef SPROUT_HW_SIMD_PPC +#if !defined(SPROUT_HW_SIMD_PPC) && defined(__VECTOR4DOUBLE__) +# define SPROUT_HW_SIMD_PPC SPROUT_HW_SIMD_PPC_QPX_VERSION +#endif +#if !defined(SPROUT_HW_SIMD_PPC) && defined(__VSX__) +# define SPROUT_HW_SIMD_PPC SPROUT_HW_SIMD_PPC_VSX_VERSION +#endif +#if !defined(SPROUT_HW_SIMD_PPC) && (defined(__ALTIVEC__) || defined(__VEC__)) +# define SPROUT_HW_SIMD_PPC SPROUT_HW_SIMD_PPC_VMX_VERSION +#endif + +#if !defined(SPROUT_HW_SIMD_PPC) +# define SPROUT_HW_SIMD_PPC 0 +#else +# define SPROUT_HW_SIMD_PPC_AVAILABLE +#endif + +#define SPROUT_HW_SIMD_PPC_NAME "PPC SIMD" + +#endif // #ifndef SPROUT_PREDEF_HARDWARE_SIMD_PPC_HPP diff --git a/sprout/predef/hardware/simd/ppc/versions.hpp b/sprout/predef/hardware/simd/ppc/versions.hpp new file mode 100644 index 00000000..28718c18 --- /dev/null +++ b/sprout/predef/hardware/simd/ppc/versions.hpp @@ -0,0 +1,20 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_HARDWARE_SIMD_PPC_VERSIONS_HPP +#define SPROUT_PREDEF_HARDWARE_SIMD_PPC_VERSIONS_HPP + +#include +#include + +#define SPROUT_HW_SIMD_PPC_VMX_VERSION SPROUT_VERSION_NUMBER(1, 0, 0) + +#define SPROUT_HW_SIMD_PPC_VSX_VERSION SPROUT_VERSION_NUMBER(1, 1, 0) + +#define SPROUT_HW_SIMD_PPC_QPX_VERSION SPROUT_VERSION_NUMBER(2, 0, 0) + +#endif // #ifndef SPROUT_PREDEF_HARDWARE_SIMD_PPC_VERSIONS_HPP diff --git a/sprout/predef/hardware/simd/x86.hpp b/sprout/predef/hardware/simd/x86.hpp new file mode 100644 index 00000000..1c0ec3c0 --- /dev/null +++ b/sprout/predef/hardware/simd/x86.hpp @@ -0,0 +1,59 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_HARDWARE_SIMD_X86_HPP +#define SPROUT_PREDEF_HARDWARE_SIMD_X86_HPP + +#include +#include + +#define SPROUT_HW_SIMD_X86 0 + +#undef SPROUT_HW_SIMD_X86 +#if !defined(SPROUT_HW_SIMD_X86) && defined(__MIC__) +# define SPROUT_HW_SIMD_X86 SPROUT_HW_SIMD_X86_MIC_VERSION +#endif +#if !defined(SPROUT_HW_SIMD_X86) && defined(__AVX2__) +# define SPROUT_HW_SIMD_X86 SPROUT_HW_SIMD_X86_AVX2_VERSION +#endif +#if !defined(SPROUT_HW_SIMD_X86) && defined(__AVX__) +# define SPROUT_HW_SIMD_X86 SPROUT_HW_SIMD_X86_AVX_VERSION +#endif +#if !defined(SPROUT_HW_SIMD_X86) && defined(__FMA__) +# define SPROUT_HW_SIMD_X86 SPROUT_HW_SIMD_X86_FMA_VERSION +#endif +#if !defined(SPROUT_HW_SIMD_X86) && defined(__SSE4_2__) +# define SPROUT_HW_SIMD_X86 SPROUT_HW_SIMD_X86_SSE4_2_VERSION +#endif +#if !defined(SPROUT_HW_SIMD_X86) && defined(__SSE4_1__) +# define SPROUT_HW_SIMD_X86 SPROUT_HW_SIMD_X86_SSE4_1_VERSION +#endif +#if !defined(SPROUT_HW_SIMD_X86) && defined(__SSSE3__) +# define SPROUT_HW_SIMD_X86 SPROUT_HW_SIMD_X86_SSSE3_VERSION +#endif +#if !defined(SPROUT_HW_SIMD_X86) && defined(__SSE3__) +# define SPROUT_HW_SIMD_X86 SPROUT_HW_SIMD_X86_SSE3_VERSION +#endif +#if !defined(SPROUT_HW_SIMD_X86) && (defined(__SSE2__) || defined(_M_X64) || _M_IX86_FP >= 2) +# define SPROUT_HW_SIMD_X86 SPROUT_HW_SIMD_X86_SSE2_VERSION +#endif +#if !defined(SPROUT_HW_SIMD_X86) && (defined(__SSE__) || defined(_M_X64) || _M_IX86_FP >= 1) +# define SPROUT_HW_SIMD_X86 SPROUT_HW_SIMD_X86_SSE_VERSION +#endif +#if !defined(SPROUT_HW_SIMD_X86) && defined(__MMX__) +# define SPROUT_HW_SIMD_X86 SPROUT_HW_SIMD_X86_MMX_VERSION +#endif + +#if !defined(SPROUT_HW_SIMD_X86) +# define SPROUT_HW_SIMD_X86 0 +#else +# define SPROUT_HW_SIMD_X86_AVAILABLE +#endif + +#define SPROUT_HW_SIMD_X86_NAME "x86 SIMD" + +#endif // #ifndef SPROUT_PREDEF_HARDWARE_SIMD_X86_HPP diff --git a/sprout/predef/hardware/simd/x86/versions.hpp b/sprout/predef/hardware/simd/x86/versions.hpp new file mode 100644 index 00000000..4065de04 --- /dev/null +++ b/sprout/predef/hardware/simd/x86/versions.hpp @@ -0,0 +1,36 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_HARDWARE_SIMD_X86_VERSIONS_HPP +#define SPROUT_PREDEF_HARDWARE_SIMD_X86_VERSIONS_HPP + +#include +#include + +#define SPROUT_HW_SIMD_X86_MMX_VERSION SPROUT_VERSION_NUMBER(0, 99, 0) + +#define SPROUT_HW_SIMD_X86_SSE_VERSION SPROUT_VERSION_NUMBER(1, 0, 0) + +#define SPROUT_HW_SIMD_X86_SSE2_VERSION SPROUT_VERSION_NUMBER(2, 0, 0) + +#define SPROUT_HW_SIMD_X86_SSE3_VERSION SPROUT_VERSION_NUMBER(3, 0, 0) + +#define SPROUT_HW_SIMD_X86_SSSE3_VERSION SPROUT_VERSION_NUMBER(3, 1, 0) + +#define SPROUT_HW_SIMD_X86_SSE4_1_VERSION SPROUT_VERSION_NUMBER(4, 1, 0) + +#define SPROUT_HW_SIMD_X86_SSE4_2_VERSION SPROUT_VERSION_NUMBER(4, 2, 0) + +#define SPROUT_HW_SIMD_X86_AVX_VERSION SPROUT_VERSION_NUMBER(5, 0, 0) + +#define SPROUT_HW_SIMD_X86_FMA3_VERSION SPROUT_VERSION_NUMBER(5, 2, 0) + +#define SPROUT_HW_SIMD_X86_AVX2_VERSION SPROUT_VERSION_NUMBER(5, 3, 0) + +#define SPROUT_HW_SIMD_X86_MIC_VERSION SPROUT_VERSION_NUMBER(9, 0, 0) + +#endif // #ifndef SPROUT_PREDEF_HARDWARE_SIMD_X86_VERSIONS_HPP diff --git a/sprout/predef/hardware/simd/x86_amd.hpp b/sprout/predef/hardware/simd/x86_amd.hpp new file mode 100644 index 00000000..c0a4583d --- /dev/null +++ b/sprout/predef/hardware/simd/x86_amd.hpp @@ -0,0 +1,40 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_HARDWARE_SIMD_X86_AMD_HPP +#define SPROUT_PREDEF_HARDWARE_SIMD_X86_AMD_HPP + +#include +#include + +#define SPROUT_HW_SIMD_X86_AMD 0 + +#undef SPROUT_HW_SIMD_X86_AMD +#if !defined(SPROUT_HW_SIMD_X86_AMD) && defined(__XOP__) +# define SPROUT_HW_SIMD_X86_AMD SPROUT_HW_SIMD_X86_AMD_XOP_VERSION +#endif +#if !defined(SPROUT_HW_SIMD_X86_AMD) && defined(__FMA4__) +# define SPROUT_HW_SIMD_X86_AMD SPROUT_HW_SIMD_X86_AMD_FMA4_VERSION +#endif +#if !defined(SPROUT_HW_SIMD_X86_AMD) && defined(__SSE4A__) +# define SPROUT_HW_SIMD_X86_AMD SPROUT_HW_SIMD_X86_AMD_SSE4A_VERSION +#endif + +#if !defined(SPROUT_HW_SIMD_X86_AMD) +# define SPROUT_HW_SIMD_X86_AMD 0 +#else +# include +# if SPROUT_HW_SIMD_X86 > SPROUT_HW_SIMD_X86_AMD +# undef SPROUT_HW_SIMD_X86_AMD +# define SPROUT_HW_SIMD_X86_AMD SPROUT_HW_SIMD_X86 +# endif +# define SPROUT_HW_SIMD_X86_AMD_AVAILABLE +#endif + +#define SPROUT_HW_SIMD_X86_AMD_NAME "x86 (AMD) SIMD" + +#endif // #ifndef SPROUT_PREDEF_HARDWARE_SIMD_X86_AMD_HPP diff --git a/sprout/predef/hardware/simd/x86_amd/versions.hpp b/sprout/predef/hardware/simd/x86_amd/versions.hpp new file mode 100644 index 00000000..740fe9ac --- /dev/null +++ b/sprout/predef/hardware/simd/x86_amd/versions.hpp @@ -0,0 +1,20 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_HARDWARE_SIMD_X86_AMD_VERSIONS_HPP +#define SPROUT_PREDEF_HARDWARE_SIMD_X86_AMD_VERSIONS_HPP + +#include +#include + +#define SPROUT_HW_SIMD_X86_AMD_SSE4A_VERSION SPROUT_VERSION_NUMBER(4, 0, 0) + +#define SPROUT_HW_SIMD_X86_AMD_FMA4_VERSION SPROUT_VERSION_NUMBER(5, 1, 0) + +#define SPROUT_HW_SIMD_X86_AMD_XOP_VERSION SPROUT_VERSION_NUMBER(5, 1, 1) + +#endif // #ifndef SPROUT_PREDEF_HARDWARE_SIMD_X86_AMD_VERSIONS_HPP diff --git a/sprout/predef/language.hpp b/sprout/predef/language.hpp new file mode 100644 index 00000000..32ac0638 --- /dev/null +++ b/sprout/predef/language.hpp @@ -0,0 +1,16 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_LANGUAGE_HPP +#define SPROUT_PREDEF_LANGUAGE_HPP + +#include +#include +#include +#include + +#endif // #ifndef SPROUT_PREDEF_LANGUAGE_HPP diff --git a/sprout/predef/language/objc.hpp b/sprout/predef/language/objc.hpp new file mode 100644 index 00000000..676a9964 --- /dev/null +++ b/sprout/predef/language/objc.hpp @@ -0,0 +1,26 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_LANGUAGE_OBJC_HPP +#define SPROUT_PREDEF_LANGUAGE_OBJC_HPP + +#include + +#define SPROUT_LANG_OBJC 0 + +#if defined(__OBJC__) +# undef SPROUT_LANG_OBJC +# define SPROUT_LANG_OBJC 1 +#endif + +#if SPROUT_LANG_OBJC +# define SPROUT_LANG_OBJC_AVAILABLE +#endif + +#define SPROUT_LANG_OBJC_NAME "Objective-C" + +#endif // #ifndef SPROUT_PREDEF_LANGUAGE_OBJC_HPP diff --git a/sprout/predef/language/stdc.hpp b/sprout/predef/language/stdc.hpp new file mode 100644 index 00000000..ea272c97 --- /dev/null +++ b/sprout/predef/language/stdc.hpp @@ -0,0 +1,35 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_LANGUAGE_STDC_HPP +#define SPROUT_PREDEF_LANGUAGE_STDC_HPP + +#include +#include + +#define SPROUT_LANG_STDC 0 + +#if defined(__STDC__) +# undef SPROUT_LANG_STDC +# if defined(__STDC_VERSION__) +# if (__STDC_VERSION__ > 100) +# define SPROUT_LANG_STDC SPROUT_PREDEF_MAKE_YYYYMM(__STDC_VERSION__) +# else +# define SPROUT_LANG_STDC 1 +# endif +# else +# define SPROUT_LANG_STDC 1 +# endif +#endif + +#if SPROUT_LANG_STDC +# define SPROUT_LANG_STDC_AVAILABLE +#endif + +#define SPROUT_LANG_STDC_NAME "Standard C" + +#endif // #ifndef SPROUT_PREDEF_LANGUAGE_STDC_HPP diff --git a/sprout/predef/language/stdcpp.hpp b/sprout/predef/language/stdcpp.hpp new file mode 100644 index 00000000..d01bf7d8 --- /dev/null +++ b/sprout/predef/language/stdcpp.hpp @@ -0,0 +1,61 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_LANGUAGE_STDCPP_HPP +#define SPROUT_PREDEF_LANGUAGE_STDCPP_HPP + +#include +#include + +#define SPROUT_LANG_STDCPP 0 + +#if defined(__cplusplus) +# undef SPROUT_LANG_STDCPP +# if (__cplusplus > 100) +# define SPROUT_LANG_STDCPP SPROUT_PREDEF_MAKE_YYYYMM(__cplusplus) +# else +# define SPROUT_LANG_STDCPP 1 +# endif +#endif + +#if SPROUT_LANG_STDCPP +# define SPROUT_LANG_STDCPP_AVAILABLE +#endif + +#define SPROUT_LANG_STDCPP_NAME "Standard C++" + +#define SPROUT_LANG_STDCPPCLI 0 + +#if defined(__cplusplus_cli) +# undef SPROUT_LANG_STDCPPCLI +# if (__cplusplus_cli > 100) +# define SPROUT_LANG_STDCPPCLI SPROUT_PREDEF_MAKE_YYYYMM(__cplusplus_cli) +# else +# define SPROUT_LANG_STDCPPCLI 1 +# endif +#endif + +#if SPROUT_LANG_STDCPPCLI +# define SPROUT_LANG_STDCPPCLI_AVAILABLE +#endif + +#define SPROUT_LANG_STDCPPCLI_NAME "Standard C++/CLI" + +#define SPROUT_LANG_STDECPP 0 + +#if defined(__embedded_cplusplus) +# undef SPROUT_LANG_STDECPP +# define SPROUT_LANG_STDECPP 1 +#endif + +#if SPROUT_LANG_STDECPP +# define SPROUT_LANG_STDECPP_AVAILABLE +#endif + +#define SPROUT_LANG_STDECPP_NAME "Standard Embedded C++" + +#endif // #ifndef SPROUT_PREDEF_LANGUAGE_STDCPP_HPP diff --git a/sprout/predef/library.hpp b/sprout/predef/library.hpp new file mode 100644 index 00000000..1c7f759a --- /dev/null +++ b/sprout/predef/library.hpp @@ -0,0 +1,15 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_LIBRARY_HPP +#define SPROUT_PREDEF_LIBRARY_HPP + +#include +#include +#include + +#endif //#ifndef SPROUT_PREDEF_LIBRARY_HPP diff --git a/sprout/predef/library/c.hpp b/sprout/predef/library/c.hpp new file mode 100644 index 00000000..3ea972e5 --- /dev/null +++ b/sprout/predef/library/c.hpp @@ -0,0 +1,18 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_LIBRARY_C_HPP +#define SPROUT_PREDEF_LIBRARY_C_HPP + +#include +#include +#include +#include +#include +#include + +#endif //#ifndef SPROUT_PREDEF_LIBRARY_C_HPP diff --git a/sprout/predef/library/c/gnu.hpp b/sprout/predef/library/c/gnu.hpp new file mode 100644 index 00000000..e128a25a --- /dev/null +++ b/sprout/predef/library/c/gnu.hpp @@ -0,0 +1,40 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_LIBRARY_C_GNU_HPP +#define SPROUT_PREDEF_LIBRARY_C_GNU_HPP + +#include +#include +#include + +#if defined(__STDC__) +# include +#elif defined(__cplusplus) +# include +#endif + +#define SPROUT_LIB_C_GNU 0 + +#if defined(__GLIBC__) || defined(__GNU_LIBRARY__) +# undef SPROUT_LIB_C_GNU +# if defined(__GLIBC__) +# define SPROUT_LIB_C_GNU \ + SPROUT_VERSION_NUMBER(__GLIBC__, __GLIBC_MINOR__, 0) +# else +# define SPROUT_LIB_C_GNU \ + SPROUT_VERSION_NUMBER(__GNU_LIBRARY__, __GNU_LIBRARY_MINOR__, 0) +# endif +#endif + +#if SPROUT_LIB_C_GNU +# define SPROUT_LIB_C_GNU_AVAILABLE +#endif + +#define SPROUT_LIB_C_GNU_NAME "GNU" + +#endif //#ifndef SPROUT_PREDEF_LIBRARY_C_GNU_HPP diff --git a/sprout/predef/library/c/prefix.hpp b/sprout/predef/library/c/prefix.hpp new file mode 100644 index 00000000..c2a3a5ad --- /dev/null +++ b/sprout/predef/library/c/prefix.hpp @@ -0,0 +1,14 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_LIBRARY_C_PREFIX_HPP +#define SPROUT_PREDEF_LIBRARY_C_PREFIX_HPP + +#include +#include + +#endif //#ifndef SPROUT_PREDEF_LIBRARY_C_PREFIX_HPP diff --git a/sprout/predef/library/c/uc.hpp b/sprout/predef/library/c/uc.hpp new file mode 100644 index 00000000..8f439934 --- /dev/null +++ b/sprout/predef/library/c/uc.hpp @@ -0,0 +1,29 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_LIBRARY_C_UC_HPP +#define SPROUT_PREDEF_LIBRARY_C_UC_HPP + +#include +#include +#include + +#define SPROUT_LIB_C_UC 0 + +#if defined(__UCLIBC__) +# undef SPROUT_LIB_C_UC +# define SPROUT_LIB_C_UC \ + SPROUT_VERSION_NUMBER(__UCLIBC_MAJOR__, __UCLIBC_MINOR__, __UCLIBC_SUBLEVEL__) +#endif + +#if SPROUT_LIB_C_UC +# define SPROUT_LIB_C_UC_AVAILABLE +#endif + +#define SPROUT_LIB_C_UC_NAME "uClibc" + +#endif //#ifndef SPROUT_PREDEF_LIBRARY_C_UC_HPP diff --git a/sprout/predef/library/c/vms.hpp b/sprout/predef/library/c/vms.hpp new file mode 100644 index 00000000..22250d18 --- /dev/null +++ b/sprout/predef/library/c/vms.hpp @@ -0,0 +1,28 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_LIBRARY_C_VMS_HPP +#define SPROUT_PREDEF_LIBRARY_C_VMS_HPP + +#include +#include +#include + +#define SPROUT_LIB_C_VMS 0 + +#if defined(__CRTL_VER) +# undef SPROUT_LIB_C_VMS +# define SPROUT_LIB_C_VMS SPROUT_PREDEF_MAKE_10_VVRR0PP00(__CRTL_VER) +#endif + +#if SPROUT_LIB_C_VMS +# define SPROUT_LIB_C_VMS_AVAILABLE +#endif + +#define SPROUT_LIB_C_VMS_NAME "VMS" + +#endif //#ifndef SPROUT_PREDEF_LIBRARY_C_VMS_HPP diff --git a/sprout/predef/library/c/zos.hpp b/sprout/predef/library/c/zos.hpp new file mode 100644 index 00000000..30734cbd --- /dev/null +++ b/sprout/predef/library/c/zos.hpp @@ -0,0 +1,36 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_LIBRARY_C_ZOS_HPP +#define SPROUT_PREDEF_LIBRARY_C_ZOS_HPP + +#include +#include +#include + +#define SPROUT_LIB_C_ZOS 0 + +#if defined(__LIBREL__) +# undef SPROUT_LIB_C_ZOS +# if !defined(SPROUT_LIB_C_ZOS) && defined(__LIBREL__) +# define SPROUT_LIB_C_ZOS SPROUT_PREDEF_MAKE_0X_VRRPPPP(__LIBREL__) +# endif +# if !defined(SPROUT_LIB_C_ZOS) && defined(__TARGET_LIB__) +# define SPROUT_LIB_C_ZOS SPROUT_PREDEF_MAKE_0X_VRRPPPP(__TARGET_LIB__) +# endif +# if !defined(SPROUT_LIB_C_ZOS) +# define SPROUT_LIB_C_ZOS 1 +# endif +#endif + +#if SPROUT_LIB_C_ZOS +# define SPROUT_LIB_C_ZOS_AVAILABLE +#endif + +#define SPROUT_LIB_C_ZOS_NAME "z/OS" + +#endif //#ifndef SPROUT_PREDEF_LIBRARY_C_ZOS_HPP diff --git a/sprout/predef/library/std.hpp b/sprout/predef/library/std.hpp new file mode 100644 index 00000000..784fbac8 --- /dev/null +++ b/sprout/predef/library/std.hpp @@ -0,0 +1,24 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_LIBRARY_STD_HPP +#define SPROUT_PREDEF_LIBRARY_STD_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif //#ifndef SPROUT_PREDEF_LIBRARY_STD_HPP diff --git a/sprout/predef/library/std/cxx.hpp b/sprout/predef/library/std/cxx.hpp new file mode 100644 index 00000000..656aa2e1 --- /dev/null +++ b/sprout/predef/library/std/cxx.hpp @@ -0,0 +1,28 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_LIBRARY_STD_CXX_HPP +#define SPROUT_PREDEF_LIBRARY_STD_CXX_HPP + +#include +#include +#include + +#define SPROUT_LIB_STD_CXX 0 + +#if defined(_LIBCPP_VERSION) +# undef SPROUT_LIB_STD_CXX +# define SPROUT_LIB_STD_CXX SPROUT_PREDEF_MAKE_10_VPPP(_LIBCPP_VERSION) +#endif + +#if SPROUT_LIB_STD_CXX +# define SPROUT_LIB_STD_CXX_AVAILABLE +#endif + +#define SPROUT_LIB_STD_CXX_NAME "libc++" + +#endif //#ifndef SPROUT_PREDEF_LIBRARY_STD_CXX_HPP diff --git a/sprout/predef/library/std/dinkumware.hpp b/sprout/predef/library/std/dinkumware.hpp new file mode 100644 index 00000000..a7a50b20 --- /dev/null +++ b/sprout/predef/library/std/dinkumware.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_LIBRARY_STD_DINKUMWARE_HPP +#define SPROUT_PREDEF_LIBRARY_STD_DINKUMWARE_HPP + +#include +#include +#include + +#define SPROUT_LIB_STD_DINKUMWARE 0 + +#if (defined(_YVALS) && !defined(__IBMCPP__)) || defined(_CPPLIB_VER) +# undef SPROUT_LIB_STD_DINKUMWARE +# if defined(_CPPLIB_VER) +# define SPROUT_LIB_STD_DINKUMWARE SPROUT_PREDEF_MAKE_10_VVRR(_CPPLIB_VER) +# else +# define SPROUT_LIB_STD_DINKUMWARE 1 +# endif +#endif + +#if SPROUT_LIB_STD_DINKUMWARE +# define SPROUT_LIB_STD_DINKUMWARE_AVAILABLE +#endif + +#define SPROUT_LIB_STD_DINKUMWARE_NAME "Dinkumware" + +#endif //#ifndef SPROUT_PREDEF_LIBRARY_STD_DINKUMWARE_HPP diff --git a/sprout/predef/library/std/libcomo.hpp b/sprout/predef/library/std/libcomo.hpp new file mode 100644 index 00000000..de3cec96 --- /dev/null +++ b/sprout/predef/library/std/libcomo.hpp @@ -0,0 +1,28 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_LIBRARY_STD_LIBCOMO_HPP +#define SPROUT_PREDEF_LIBRARY_STD_LIBCOMO_HPP + +#include +#include +#include + +#define SPROUT_LIB_STD_COMO 0 + +#if defined(__LIBCOMO__) +# undef SPROUT_LIB_STD_COMO +# define SPROUT_LIB_STD_COMO SPROUT_VERSION_NUMBER(__LIBCOMO_VERSION__, 0, 0) +#endif + +#if SPROUT_LIB_STD_COMO +# define SPROUT_LIB_STD_COMO_AVAILABLE +#endif + +#define SPROUT_LIB_STD_COMO_NAME "Comeau Computing" + +#endif //#ifndef SPROUT_PREDEF_LIBRARY_STD_LIBCOMO_HPP diff --git a/sprout/predef/library/std/modena.hpp b/sprout/predef/library/std/modena.hpp new file mode 100644 index 00000000..01e80031 --- /dev/null +++ b/sprout/predef/library/std/modena.hpp @@ -0,0 +1,27 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_LIBRARY_STD_MODENA_HPP +#define SPROUT_PREDEF_LIBRARY_STD_MODENA_HPP + +#include +#include + +#define SPROUT_LIB_STD_MSIPL 0 + +#if defined(MSIPL_COMPILE_H) || defined(__MSIPL_COMPILE_H) +# undef SPROUT_LIB_STD_MSIPL +# define SPROUT_LIB_STD_MSIPL 1 +#endif + +#if SPROUT_LIB_STD_MSIPL +# define SPROUT_LIB_STD_MSIPL_AVAILABLE +#endif + +#define SPROUT_LIB_STD_MSIPL_NAME "Modena Software Lib++" + +#endif //#ifndef SPROUT_PREDEF_LIBRARY_STD_MODENA_HPP diff --git a/sprout/predef/library/std/msl.hpp b/sprout/predef/library/std/msl.hpp new file mode 100644 index 00000000..05ed3a4d --- /dev/null +++ b/sprout/predef/library/std/msl.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_LIBRARY_STD_MSL_HPP +#define SPROUT_PREDEF_LIBRARY_STD_MSL_HPP + +#include +#include +#include + +#define SPROUT_LIB_STD_MSL 0 + +#if defined(__MSL_CPP__) || defined(__MSL__) +# undef SPROUT_LIB_STD_MSL +# if defined(__MSL_CPP__) +# define SPROUT_LIB_STD_MSL SPROUT_PREDEF_MAKE_0X_VRPP(__MSL_CPP__) +# else +# define SPROUT_LIB_STD_MSL SPROUT_PREDEF_MAKE_0X_VRPP(__MSL__) +# endif +#endif + +#if SPROUT_LIB_STD_MSL +# define SPROUT_LIB_STD_MSL_AVAILABLE +#endif + +#define SPROUT_LIB_STD_MSL_NAME "Metrowerks" + +#endif //#ifndef SPROUT_PREDEF_LIBRARY_STD_MSL_HPP diff --git a/sprout/predef/library/std/prefix.hpp b/sprout/predef/library/std/prefix.hpp new file mode 100644 index 00000000..2c4ea003 --- /dev/null +++ b/sprout/predef/library/std/prefix.hpp @@ -0,0 +1,14 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_LIBRARY_STD_PREFIX_HPP +#define SPROUT_PREDEF_LIBRARY_STD_PREFIX_HPP + +#include +#include + +#endif //#ifndef SPROUT_PREDEF_LIBRARY_STD_PREFIX_HPP diff --git a/sprout/predef/library/std/roguewave.hpp b/sprout/predef/library/std/roguewave.hpp new file mode 100644 index 00000000..71d574da --- /dev/null +++ b/sprout/predef/library/std/roguewave.hpp @@ -0,0 +1,36 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_LIBRARY_STD_ROGUEWAVE_HPP +#define SPROUT_PREDEF_LIBRARY_STD_ROGUEWAVE_HPP + +#include +#include +#include + +#define SPROUT_LIB_STD_RW 0 + +#if defined(__STD_RWCOMPILER_H__) || defined(_RWSTD_VER) +# undef SPROUT_LIB_STD_RW +# if defined(_RWSTD_VER) +# if _RWSTD_VER < 0x010000 +# define SPROUT_LIB_STD_RW SPROUT_PREDEF_MAKE_0X_VVRRP(_RWSTD_VER) +# else +# define SPROUT_LIB_STD_RW SPROUT_PREDEF_MAKE_0X_VVRRPP(_RWSTD_VER) +# endif +# else +# define SPROUT_LIB_STD_RW 1 +# endif +#endif + +#if SPROUT_LIB_STD_RW +# define SPROUT_LIB_STD_RW_AVAILABLE +#endif + +#define SPROUT_LIB_STD_RW_NAME "Roguewave" + +#endif //#ifndef SPROUT_PREDEF_LIBRARY_STD_ROGUEWAVE_HPP diff --git a/sprout/predef/library/std/sgi.hpp b/sprout/predef/library/std/sgi.hpp new file mode 100644 index 00000000..83a81cfd --- /dev/null +++ b/sprout/predef/library/std/sgi.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_LIBRARY_STD_SGI_HPP +#define SPROUT_PREDEF_LIBRARY_STD_SGI_HPP + +#include +#include +#include + +#define SPROUT_LIB_STD_SGI 0 + +#if defined(__STL_CONFIG_H) +# undef SPROUT_LIB_STD_SGI +# if defined(__SGI_STL) +# define SPROUT_LIB_STD_SGI SPROUT_PREDEF_MAKE_0X_VRP(__SGI_STL) +# else +# define SPROUT_LIB_STD_SGI 1 +# endif +#endif + +#if SPROUT_LIB_STD_SGI +# define SPROUT_LIB_STD_SGI_AVAILABLE +#endif + +#define SPROUT_LIB_STD_SGI_NAME "SGI" + +#endif //#ifndef SPROUT_PREDEF_LIBRARY_STD_SGI_HPP diff --git a/sprout/predef/library/std/stdcpp3.hpp b/sprout/predef/library/std/stdcpp3.hpp new file mode 100644 index 00000000..092a4650 --- /dev/null +++ b/sprout/predef/library/std/stdcpp3.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_LIBRARY_STD_STDCPP3_HPP +#define SPROUT_PREDEF_LIBRARY_STD_STDCPP3_HPP + +#include +#include +#include + +#define SPROUT_LIB_STD_GNU 0 + +#if defined(__GLIBCPP__) || defined(__GLIBCXX__) +# undef SPROUT_LIB_STD_GNU +# if defined(__GLIBCXX__) +# define SPROUT_LIB_STD_GNU SPROUT_PREDEF_MAKE_YYYYMMDD(__GLIBCXX__) +# else +# define SPROUT_LIB_STD_GNU SPROUT_PREDEF_MAKE_YYYYMMDD(__GLIBCPP__) +# endif +#endif + +#if SPROUT_LIB_STD_GNU +# define SPROUT_LIB_STD_GNU_AVAILABLE +#endif + +#define SPROUT_LIB_STD_GNU_NAME "GNU" + +#endif //#ifndef SPROUT_PREDEF_LIBRARY_STD_STDCPP3_HPP diff --git a/sprout/predef/library/std/stlport.hpp b/sprout/predef/library/std/stlport.hpp new file mode 100644 index 00000000..9e4ba422 --- /dev/null +++ b/sprout/predef/library/std/stlport.hpp @@ -0,0 +1,38 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_LIBRARY_STD_STLPORT_HPP +#define SPROUT_PREDEF_LIBRARY_STD_STLPORT_HPP + +#include +#include +#include +#include + +#define SPROUT_LIB_STD_STLPORT 0 + +#if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION) +# undef SPROUT_LIB_STD_STLPORT +# if !defined(SPROUT_LIB_STD_STLPORT) && defined(_STLPORT_MAJOR) +# define SPROUT_LIB_STD_STLPORT \ + SPROUT_VERSION_NUMBER(_STLPORT_MAJOR, _STLPORT_MINOR, _STLPORT_PATCHLEVEL) +# endif +# if !defined(SPROUT_LIB_STD_STLPORT) && defined(_STLPORT_VERSION) +# define SPROUT_LIB_STD_STLPORT SPROUT_PREDEF_MAKE_0X_VRP(_STLPORT_VERSION) +# endif +# if !defined(SPROUT_LIB_STD_STLPORT) +# define SPROUT_LIB_STD_STLPORT SPROUT_PREDEF_MAKE_0X_VRP(__SGI_STL_PORT) +# endif +#endif + +#if SPROUT_LIB_STD_STLPORT +# define SPROUT_LIB_STD_STLPORT_AVAILABLE +#endif + +#define SPROUT_LIB_STD_STLPORT_NAME "STLport" + +#endif //#ifndef SPROUT_PREDEF_LIBRARY_STD_STLPORT_HPP diff --git a/sprout/predef/library/std/vacpp.hpp b/sprout/predef/library/std/vacpp.hpp new file mode 100644 index 00000000..7d545893 --- /dev/null +++ b/sprout/predef/library/std/vacpp.hpp @@ -0,0 +1,27 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_LIBRARY_STD_VACPP_HPP +#define SPROUT_PREDEF_LIBRARY_STD_VACPP_HPP + +#include +#include + +#define SPROUT_LIB_STD_IBM 0 + +#if defined(__IBMCPP__) +# undef SPROUT_LIB_STD_IBM +# define SPROUT_LIB_STD_IBM 1 +#endif + +#if SPROUT_LIB_STD_IBM +# define SPROUT_LIB_STD_IBM_AVAILABLE +#endif + +#define SPROUT_LIB_STD_IBM_NAME "IBM VACPP" + +#endif //#ifndef SPROUT_PREDEF_LIBRARY_STD_VACPP_HPP diff --git a/sprout/predef/make.hpp b/sprout/predef/make.hpp new file mode 100644 index 00000000..d2cff8bf --- /dev/null +++ b/sprout/predef/make.hpp @@ -0,0 +1,41 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + 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 SPROUT_PREDEF_MAKE_HPP +#define SPROUT_PREDEF_MAKE_HPP + +#include +#include + +#define SPROUT_PREDEF_MAKE_0X_VRP(V) SPROUT_VERSION_NUMBER((V & 0xF00) >> 8, (V & 0xF0) >> 4, (V & 0xF)) +#define SPROUT_PREDEF_MAKE_0X_VVRP(V) SPROUT_VERSION_NUMBER((V & 0xFF00) >> 8, (V & 0xF0) >> 4, (V & 0xF)) +#define SPROUT_PREDEF_MAKE_0X_VRPP(V) SPROUT_VERSION_NUMBER((V & 0xF000) >> 12, (V & 0xF00) >> 8, (V & 0xFF)) +#define SPROUT_PREDEF_MAKE_0X_VVRR(V) SPROUT_VERSION_NUMBER((V & 0xFF00) >> 8, (V & 0xFF), 0) +#define SPROUT_PREDEF_MAKE_0X_VRRPPPP(V) SPROUT_VERSION_NUMBER((V & 0xF000000) >> 24, (V & 0xFF0000) >> 16, (V & 0xFFFF)) +#define SPROUT_PREDEF_MAKE_0X_VVRRP(V) SPROUT_VERSION_NUMBER((V & 0xFF000) >> 12, (V & 0xFF0) >> 4, (V & 0xF)) +#define SPROUT_PREDEF_MAKE_0X_VRRPP000(V) SPROUT_VERSION_NUMBER((V & 0xF0000000) >> 28, (V & 0xFF00000) >> 20, (V & 0xFF000) >> 12) +#define SPROUT_PREDEF_MAKE_0X_VVRRPP(V) SPROUT_VERSION_NUMBER((V & 0xFF0000) >> 16, (V & 0xFF00) >> 8, (V & 0xFF)) +#define SPROUT_PREDEF_MAKE_10_VPPP(V) SPROUT_VERSION_NUMBER(((V) / 1000) % 10, 0, (V) % 1000) +#define SPROUT_PREDEF_MAKE_10_VRP(V) SPROUT_VERSION_NUMBER(((V) / 100) % 10, ((V) / 10) % 10, (V) % 10) +#define SPROUT_PREDEF_MAKE_10_VRP000(V) SPROUT_VERSION_NUMBER(((V) / 100000) % 10, ((V) / 10000) % 10, ((V) / 1000) % 10) +#define SPROUT_PREDEF_MAKE_10_VRPP(V) SPROUT_VERSION_NUMBER(((V) / 1000) % 10, ((V) / 100) % 10, (V) % 100) +#define SPROUT_PREDEF_MAKE_10_VRR(V) SPROUT_VERSION_NUMBER(((V) / 100) % 10, (V) % 100, 0) +#define SPROUT_PREDEF_MAKE_10_VRRPP(V) SPROUT_VERSION_NUMBER(((V) / 10000) % 10, ((V) / 100) % 100, (V) % 100) +#define SPROUT_PREDEF_MAKE_10_VRR000(V) SPROUT_VERSION_NUMBER(((V) / 100000) % 10, ((V) / 1000) % 100, 0) +#define SPROUT_PREDEF_MAKE_10_VV00(V) SPROUT_VERSION_NUMBER(((V) / 100) % 100, 0, 0) +#define SPROUT_PREDEF_MAKE_10_VVRR(V) SPROUT_VERSION_NUMBER(((V) / 100) % 100, (V) % 100, 0) +#define SPROUT_PREDEF_MAKE_10_VVRRPP(V) SPROUT_VERSION_NUMBER(((V) / 10000) % 100, ((V) / 100) % 100, (V) % 100) +#define SPROUT_PREDEF_MAKE_10_VVRR0PP00(V) SPROUT_VERSION_NUMBER(((V) / 10000000) % 100, ((V) / 100000) % 100, ((V) / 100) % 100) +#define SPROUT_PREDEF_MAKE_10_VVRR0PPPP(V) SPROUT_VERSION_NUMBER(((V) / 10000000) % 100, ((V) / 100000) % 100, (V) % 10000) +#define SPROUT_PREDEF_MAKE_10_VVRR00PP00(V) SPROUT_VERSION_NUMBER(((V) / 100000000) % 100, ((V) / 1000000) % 100, ((V) / 100) % 100) + +#define SPROUT_PREDEF_MAKE_DATE(Y, M, D) SPROUT_VERSION_NUMBER((Y) % 10000 - 1970, (M) % 100, (D) % 100) +#define SPROUT_PREDEF_MAKE_YYYYMMDD(V) SPROUT_PREDEF_MAKE_DATE(((V) / 10000) % 10000, ((V) / 100) % 100, (V) % 100) +#define SPROUT_PREDEF_MAKE_YYYY(V) SPROUT_PREDEF_MAKE_DATE(V, 1, 1) +#define SPROUT_PREDEF_MAKE_YYYYMM(V) SPROUT_PREDEF_MAKE_DATE((V) / 100, (V) % 100, 1) + +#endif // #ifndef SPROUT_PREDEF_MAKE_HPP diff --git a/sprout/predef/os.hpp b/sprout/predef/os.hpp new file mode 100644 index 00000000..fb2581e0 --- /dev/null +++ b/sprout/predef/os.hpp @@ -0,0 +1,31 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_OS_HPP +#define SPROUT_PREDEF_OS_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#endif // #ifndef SPROUT_PREDEF_OS_HPP diff --git a/sprout/predef/os/aix.hpp b/sprout/predef/os/aix.hpp new file mode 100644 index 00000000..febad7ba --- /dev/null +++ b/sprout/predef/os/aix.hpp @@ -0,0 +1,42 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_OS_AIX_HPP +#define SPROUT_PREDEF_OS_AIX_HPP + +#include +#include + +#define SPROUT_OS_AIX 0 + +#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && (defined(_AIX) || defined(__TOS_AIX__)) +# undef SPROUT_OS_AIX +# if !defined(SPROUT_OS_AIX) && defined(_AIX43) +# define SPROUT_OS_AIX SPROUT_VERSION_NUMBER(4, 3, 0) +# endif +# if !defined(SPROUT_OS_AIX) && defined(_AIX41) +# define SPROUT_OS_AIX SPROUT_VERSION_NUMBER(4, 1, 0) +# endif +# if !defined(SPROUT_OS_AIX) && defined(_AIX32) +# define SPROUT_OS_AIX SPROUT_VERSION_NUMBER(3, 2, 0) +# endif +# if !defined(SPROUT_OS_AIX) && defined(_AIX3) +# define SPROUT_OS_AIX SPROUT_VERSION_NUMBER(3, 0, 0) +# endif +# if !defined(SPROUT_OS_AIX) +# define SPROUT_OS_AIX 1 +# endif +#endif + +#if SPROUT_OS_AIX +# define SPROUT_OS_AIX_AVAILABLE +# include +#endif + +#define SPROUT_OS_AIX_NAME "IBM AIX" + +#endif // #ifndef SPROUT_PREDEF_OS_AIX_HPP diff --git a/sprout/predef/os/amigaos.hpp b/sprout/predef/os/amigaos.hpp new file mode 100644 index 00000000..6a414082 --- /dev/null +++ b/sprout/predef/os/amigaos.hpp @@ -0,0 +1,27 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_OS_AMIGAOS_HPP +#define SPROUT_PREDEF_OS_AMIGAOS_HPP + +#include + +#define SPROUT_OS_AMIGAOS 0 + +#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && (defined(AMIGA) || defined(__amigaos__)) +# undef SPROUT_OS_AMIGAOS +# define SPROUT_OS_AMIGAOS 1 +#endif + +#if SPROUT_OS_AMIGAOS +# define SPROUT_OS_AMIGAOS_AVAILABLE +# include +#endif + +#define SPROUT_OS_AMIGAOS_NAME "AmigaOS" + +#endif // #ifndef SPROUT_PREDEF_OS_AMIGAOS_HPP diff --git a/sprout/predef/os/android.hpp b/sprout/predef/os/android.hpp new file mode 100644 index 00000000..2341cf10 --- /dev/null +++ b/sprout/predef/os/android.hpp @@ -0,0 +1,27 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_OS_ADROID_HPP +#define SPROUT_PREDEF_OS_ADROID_HPP + +#include + +#define SPROUT_OS_ANDROID 0 + +#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && defined(__ANDROID__) +# undef SPROUT_OS_ANDROID +# define SPROUT_OS_ANDROID 1 +#endif + +#if SPROUT_OS_ANDROID +# define SPROUT_OS_ANDROID_AVAILABLE +# include +#endif + +#define SPROUT_OS_ANDROID_NAME "Android" + +#endif // #ifndef SPROUT_PREDEF_OS_ADROID_HPP diff --git a/sprout/predef/os/beos.hpp b/sprout/predef/os/beos.hpp new file mode 100644 index 00000000..84a18476 --- /dev/null +++ b/sprout/predef/os/beos.hpp @@ -0,0 +1,27 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_OS_BEOS_HPP +#define SPROUT_PREDEF_OS_BEOS_HPP + +#include + +#define SPROUT_OS_BEOS 0 + +#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && defined(__BEOS__) +# undef SPROUT_OS_BEOS +# define SPROUT_OS_BEOS 1 +#endif + +#if SPROUT_OS_BEOS +# define SPROUT_OS_BEOS_AVAILABLE +# include +#endif + +#define SPROUT_OS_BEOS_NAME "BeOS" + +#endif // #ifndef SPROUT_PREDEF_OS_BEOS_HPP diff --git a/sprout/predef/os/bsd.hpp b/sprout/predef/os/bsd.hpp new file mode 100644 index 00000000..f6d63fa2 --- /dev/null +++ b/sprout/predef/os/bsd.hpp @@ -0,0 +1,60 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_OS_BSD_HPP +#define SPROUT_PREDEF_OS_BSD_HPP + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifndef SPROUT_OS_BSD +#define SPROUT_OS_BSD 0 +#endif + +#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && (defined(BSD) || defined(_SYSTYPE_BSD)) +# undef SPROUT_OS_BSD +# include +# if !defined(SPROUT_OS_BSD) && defined(BSD4_4) +# define SPROUT_OS_BSD SPROUT_VERSION_NUMBER(4, 4, 0) +# endif +# if !defined(SPROUT_OS_BSD) && defined(BSD4_3) +# define SPROUT_OS_BSD SPROUT_VERSION_NUMBER(4, 3, 0) +# endif +# if !defined(SPROUT_OS_BSD) && defined(BSD4_2) +# define SPROUT_OS_BSD SPROUT_VERSION_NUMBER(4, 2, 0) +# endif +# if !defined(SPROUT_OS_BSD) && defined(BSD) +# define SPROUT_OS_BSD SPROUT_PREDEF_MAKE_10_VVRR(BSD) +# endif +# if !defined(SPROUT_OS_BSD) +# define SPROUT_OS_BSD 1 +# endif +#endif + +#if SPROUT_OS_BSD +# define SPROUT_OS_BSD_AVAILABLE +# include +#endif + +#define SPROUT_OS_BSD_NAME "BSD" + +#else // #ifndef SPROUT_PREDEF_OS_BSD_HPP + +#include +#include +#include +#include +#include + +#endif // #ifndef SPROUT_PREDEF_OS_BSD_HPP diff --git a/sprout/predef/os/bsd/bsdi.hpp b/sprout/predef/os/bsd/bsdi.hpp new file mode 100644 index 00000000..59790e69 --- /dev/null +++ b/sprout/predef/os/bsd/bsdi.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + 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 SPROUT_PREDEF_OS_BSD_BSDI_HPP +#define SPROUT_PREDEF_OS_BSD_BSDI_HPP + +#include +#include + +#define SPROUT_OS_BSD_BSDI 0 + +#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && defined(__bsdi__) +# ifndef SPROUT_OS_BSD_AVAILABLE +# define SPROUT_OS_BSD 1 +# define SPROUT_OS_BSD_AVAILABLE +# endif +# undef SPROUT_OS_BSD_BSDI +# define SPROUT_OS_BSD_BSDI 1 +#endif + +#if SPROUT_OS_BSD_BSDI +# define SPROUT_OS_BSD_BSDI_AVAILABLE +# include +#endif + +#define SPROUT_OS_BSD_BSDI_NAME "BSDi BSD/OS" + +#endif // #ifndef SPROUT_PREDEF_OS_BSD_BSDI_HPP diff --git a/sprout/predef/os/bsd/dragonfly.hpp b/sprout/predef/os/bsd/dragonfly.hpp new file mode 100644 index 00000000..fd8fedf3 --- /dev/null +++ b/sprout/predef/os/bsd/dragonfly.hpp @@ -0,0 +1,34 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + 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 SPROUT_PREDEF_OS_BSD_DRADONFLY_HPP +#define SPROUT_PREDEF_OS_BSD_DRADONFLY_HPP + +#include +#include + +#define SPROUT_OS_BSD_DRAGONFLY 0 + +#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && defined(__DragonFly__) +# ifndef SPROUT_OS_BSD_AVAILABLE +# define SPROUT_OS_BSD 1 +# define SPROUT_OS_BSD_AVAILABLE +# endif +# undef SPROUT_OS_BSD_DRAGONFLY +# if defined(__DragonFly__) +# define SPROUT_OS_DRAGONFLY_BSD 1 +# endif +#endif + +#if SPROUT_OS_BSD_DRAGONFLY +# define SPROUT_OS_BSD_DRAGONFLY_AVAILABLE +# include +#endif + +#define SPROUT_OS_BSD_DRAGONFLY_NAME "DragonFly BSD" + +#endif // #ifndef SPROUT_PREDEF_OS_BSD_DRADONFLY_HPP diff --git a/sprout/predef/os/bsd/free.hpp b/sprout/predef/os/bsd/free.hpp new file mode 100644 index 00000000..3401afba --- /dev/null +++ b/sprout/predef/os/bsd/free.hpp @@ -0,0 +1,43 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + 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 SPROUT_PREDEF_OS_BSD_FREE_HPP +#define SPROUT_PREDEF_OS_BSD_FREE_HPP + +#include +#include +#include + +#define SPROUT_OS_BSD_FREE 0 + +#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && defined(__FreeBSD__) +# ifndef SPROUT_OS_BSD_AVAILABLE +# define SPROUT_OS_BSD 1 +# define SPROUT_OS_BSD_AVAILABLE +# endif +# undef SPROUT_OS_BSD_FREE +# if defined(__FreeBSD_version) +# if __FreeBSD_version < 500000 +# define SPROUT_OS_BSD_FREE \ + SPROUT_PREDEF_MAKE_10_VRP000(__FreeBSD_version) +# else +# define SPROUT_OS_BSD_FREE \ + SPROUT_PREDEF_MAKE_10_VRR000(__FreeBSD_version) +# endif +# else +# define SPROUT_OS_BSD_FREE 1 +# endif +#endif + +#if SPROUT_OS_BSD_FREE +# define SPROUT_OS_BSD_FREE_AVAILABLE +# include +#endif + +#define SPROUT_OS_BSD_FREE_NAME "Free BSD" + +#endif // #ifndef SPROUT_PREDEF_OS_BSD_BSDI_HPP diff --git a/sprout/predef/os/bsd/net.hpp b/sprout/predef/os/bsd/net.hpp new file mode 100644 index 00000000..f650e055 --- /dev/null +++ b/sprout/predef/os/bsd/net.hpp @@ -0,0 +1,63 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + 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 SPROUT_PREDEF_OS_BSD_NET_HPP +#define SPROUT_PREDEF_OS_BSD_NET_HPP + +#include +#include +#include +#include + +#define SPROUT_OS_BSD_NET 0 + +#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && defined(__NETBSD__) || defined(__NetBSD__) +# ifndef SPROUT_OS_BSD_AVAILABLE +# define SPROUT_OS_BSD 1 +# define SPROUT_OS_BSD_AVAILABLE +# endif +# undef SPROUT_OS_BSD_NET +# if defined(__NETBSD__) +# if defined(__NETBSD_version) +# if __NETBSD_version < 500000 +# define SPROUT_OS_BSD_NET \ + SPROUT_PREDEF_MAKE_10_VRP000(__NETBSD_version) +# else +# define SPROUT_OS_BSD_NET \ + SPROUT_PREDEF_MAKE_10_VRR000(__NETBSD_version) +# endif +# else +# define SPROUT_OS_BSD_NET 1 +# endif +# elif defined(__NetBSD__) +# if !defined(SPROUT_OS_BSD_NET) && defined(NetBSD0_8) +# define SPROUT_OS_BSD_NET SPROUT_VERSION_NUMBER(0, 8, 0) +# endif +# if !defined(SPROUT_OS_BSD_NET) && defined(NetBSD0_9) +# define SPROUT_OS_BSD_NET SPROUT_VERSION_NUMBER(0, 9, 0) +# endif +# if !defined(SPROUT_OS_BSD_NET) && defined(NetBSD1_0) +# define SPROUT_OS_BSD_NET SPROUT_VERSION_NUMBER(1, 0, 0) +# endif +# if !defined(SPROUT_OS_BSD_NET) && defined(__NetBSD_Version) +# define SPROUT_OS_BSD_NET \ + SPROUT_PREDEF_MAKE_10_VVRR00PP00(__NetBSD_Version) +# endif +# if !defined(SPROUT_OS_BSD_NET) +# define SPROUT_OS_BSD_NET 1 +# endif +# endif +#endif + +#if SPROUT_OS_BSD_NET +# define SPROUT_OS_BSD_NET_AVAILABLE +# include +#endif + +#define SPROUT_OS_BSD_NET_NAME "DragonFly BSD" + +#endif // #ifndef SPROUT_PREDEF_OS_BSD_NET_HPP diff --git a/sprout/predef/os/bsd/open.hpp b/sprout/predef/os/bsd/open.hpp new file mode 100644 index 00000000..bc3bb343 --- /dev/null +++ b/sprout/predef/os/bsd/open.hpp @@ -0,0 +1,127 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + 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 SPROUT_PREDEF_OS_BSD_OPEN_HPP +#define SPROUT_PREDEF_OS_BSD_OPEN_HPP + +#include +#include +#include + +#define SPROUT_OS_BSD_OPEN 0 + +#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && ( \ + defined(__OpenBSD__) \ + ) +# ifndef SPROUT_OS_BSD_AVAILABLE +# define SPROUT_OS_BSD 1 +# define SPROUT_OS_BSD_AVAILABLE +# endif +# undef SPROUT_OS_BSD_OPEN +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD2_0) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(2, 0, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD2_1) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(2, 1, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD2_2) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(2, 2, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD2_3) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(2, 3, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD2_4) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(2, 4, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD2_5) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(2, 5, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD2_6) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(2, 6, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD2_7) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(2, 7, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD2_8) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(2, 8, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD2_9) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(2, 9, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD3_0) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(3, 0, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD3_1) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(3, 1, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD3_2) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(3, 2, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD3_3) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(3, 3, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD3_4) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(3, 4, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD3_5) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(3, 5, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD3_6) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(3, 6, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD3_7) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(3, 7, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD3_8) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(3, 8, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD3_9) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(3, 9, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD4_0) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(4, 0, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD4_1) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(4, 1, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD4_2) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(4, 2, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD4_3) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(4, 3, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD4_4) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(4, 4, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD4_5) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(4, 5, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD4_6) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(4, 6, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD4_7) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(4, 7, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD4_8) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(4, 8, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) && defined(OpenBSD4_9) +# define SPROUT_OS_BSD_OPEN SPROUT_VERSION_NUMBER(4, 9, 0) +# endif +# if !defined(SPROUT_OS_BSD_OPEN) +# define SPROUT_OS_BSD_OPEN 1 +# endif +#endif + +#if SPROUT_OS_BSD_OPEN +# define SPROUT_OS_BSD_OPEN_AVAILABLE +# include +#endif + +#define SPROUT_OS_BSD_OPEN_NAME "OpenBSD" + +#endif // #ifndef SPROUT_PREDEF_OS_BSD_OPEN_HPP diff --git a/sprout/predef/os/cygwin.hpp b/sprout/predef/os/cygwin.hpp new file mode 100644 index 00000000..7e6fff82 --- /dev/null +++ b/sprout/predef/os/cygwin.hpp @@ -0,0 +1,27 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_OS_CYGWIN_HPP +#define SPROUT_PREDEF_OS_CYGWIN_HPP + +#include + +#define SPROUT_OS_CYGWIN 0 + +#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && defined(__CYGWIN__) +# undef SPROUT_OS_CYGWIN +# define SPROUT_OS_CGYWIN 1 +#endif + +#if SPROUT_OS_CYGWIN +# define SPROUT_OS_CYGWIN_AVAILABLE +# include +#endif + +#define SPROUT_OS_CYGWIN_NAME "Cygwin" + +#endif // #ifndef SPROUT_PREDEF_OS_CYGWIN_HPP diff --git a/sprout/predef/os/haiku.hpp b/sprout/predef/os/haiku.hpp new file mode 100644 index 00000000..2670fca3 --- /dev/null +++ b/sprout/predef/os/haiku.hpp @@ -0,0 +1,27 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_OS_HAIKU_HPP +#define SPROUT_PREDEF_OS_HAIKU_HPP + +#include + +#define SPROUT_OS_HAIKU 0 + +#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && defined(__HAIKU__) +# undef SPROUT_OS_HAIKU +# define SPROUT_OS_HAIKU 1 +#endif + +#if SPROUT_OS_HAIKU +# define SPROUT_OS_HAIKU_AVAILABLE +# include +#endif + +#define SPROUT_OS_HAIKU_NAME "Haiku" + +#endif // #ifndef SPROUT_PREDEF_OS_HAIKU_HPP diff --git a/sprout/predef/os/hpux.hpp b/sprout/predef/os/hpux.hpp new file mode 100644 index 00000000..a1389083 --- /dev/null +++ b/sprout/predef/os/hpux.hpp @@ -0,0 +1,27 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_OS_HPUX_HPP +#define SPROUT_PREDEF_OS_HPUX_HPP + +#include + +#define SPROUT_OS_HPUX 0 + +#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && (defined(hpux) || defined(_hpux) || defined(__hpux)) +# undef SPROUT_OS_HPUX +# define SPROUT_OS_HPUX 1 +#endif + +#if SPROUT_OS_HPUX +# define SPROUT_OS_HPUX_AVAILABLE +# include +#endif + +#define SPROUT_OS_HPUX_NAME "HP-UX" + +#endif // #ifndef SPROUT_PREDEF_OS_HPUX_HPP diff --git a/sprout/predef/os/ios.hpp b/sprout/predef/os/ios.hpp new file mode 100644 index 00000000..87878099 --- /dev/null +++ b/sprout/predef/os/ios.hpp @@ -0,0 +1,27 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_OS_IOS_HPP +#define SPROUT_PREDEF_OS_IOS_HPP + +#include + +#define SPROUT_OS_IOS 0 + +#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && (defined(__APPLE__) && defined(__MACH__) && defined(__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__)) +# undef SPROUT_OS_IOS +# define SPROUT_OS_IOS (__ENVIRONMENT_IPHONE_OS_VERSION_MIN_REQUIRED__ * 1000) +#endif + +#if SPROUT_OS_IOS +# define SPROUT_OS_IOS_AVAILABLE +# include +#endif + +#define SPROUT_OS_IOS_NAME "iOS" + +#endif // #ifndef SPROUT_PREDEF_OS_IOS_HPP diff --git a/sprout/predef/os/irix.hpp b/sprout/predef/os/irix.hpp new file mode 100644 index 00000000..e0bf5ffd --- /dev/null +++ b/sprout/predef/os/irix.hpp @@ -0,0 +1,27 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_OS_IRIX_HPP +#define SPROUT_PREDEF_OS_IRIX_HPP + +#include + +#define SPROUT_OS_IRIX 0 + +#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && (defined(sgi) || defined(__sgi)) +# undef SPROUT_OS_IRIX +# define SPROUT_OS_IRIX 1 +#endif + +#if SPROUT_OS_IRIX +# define SPROUT_OS_IRIX_AVAILABLE +# include +#endif + +#define SPROUT_OS_IRIX_NAME "IRIX" + +#endif // #ifndef SPROUT_PREDEF_OS_IRIX_HPP diff --git a/sprout/predef/os/linux.hpp b/sprout/predef/os/linux.hpp new file mode 100644 index 00000000..c8e825fa --- /dev/null +++ b/sprout/predef/os/linux.hpp @@ -0,0 +1,27 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_OS_LINUX_HPP +#define SPROUT_PREDEF_OS_LINUX_HPP + +#include + +#define SPROUT_OS_LINUX 0 + +#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && (defined(linux) || defined(__linux)) +# undef SPROUT_OS_LINUX +# define SPROUT_OS_LINUX 1 +#endif + +#if SPROUT_OS_LINUX +# define SPROUT_OS_LINUX_AVAILABLE +# include +#endif + +#define SPROUT_OS_LINUX_NAME "Linux" + +#endif // #ifndef SPROUT_PREDEF_OS_LINUX_HPP diff --git a/sprout/predef/os/macos.hpp b/sprout/predef/os/macos.hpp new file mode 100644 index 00000000..475a02cf --- /dev/null +++ b/sprout/predef/os/macos.hpp @@ -0,0 +1,34 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_OS_MACOS_HPP +#define SPROUT_PREDEF_OS_MACOS_HPP + +#include +#include +#include + +#define SPROUT_OS_MACOS 0 + +#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && (defined(macintosh) || defined(Macintosh) || (defined(__APPLE__) && defined(__MACH__))) +# undef SPROUT_OS_MACOS +# if !defined(SPROUT_OS_MACOS) && defined(__APPLE__) && defined(__MACH__) +# define SPROUT_OS_MACOS SPROUT_VERSION_NUMBER(10, 0, 0) +# endif +# if !defined(SPROUT_OS_MACOS) +# define SPROUT_OS_MACOS SPROUT_VERSION_NUMBER(9, 0, 0) +# endif +#endif + +#if SPROUT_OS_MACOS +# define SPROUT_OS_MACOS_AVAILABLE +# include +#endif + +#define SPROUT_OS_MACOS_NAME "Mac OS" + +#endif // #ifndef SPROUT_PREDEF_OS_MACOS_HPP diff --git a/sprout/predef/os/os400.hpp b/sprout/predef/os/os400.hpp new file mode 100644 index 00000000..c6464d8c --- /dev/null +++ b/sprout/predef/os/os400.hpp @@ -0,0 +1,27 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_OS_OS400_HPP +#define SPROUT_PREDEF_OS_OS400_HPP + +#include + +#define SPROUT_OS_OS400 0 + +#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && defined(__OS400__) +# undef SPROUT_OS_OS400 +# define SPROUT_OS_OS400 1 +#endif + +#if SPROUT_OS_OS400 +# define SPROUT_OS_OS400_AVAILABLE +# include +#endif + +#define SPROUT_OS_OS400_NAME "IBM OS/400" + +#endif // #ifndef SPROUT_PREDEF_OS_OS400_HPP diff --git a/sprout/predef/os/qnxnto.hpp b/sprout/predef/os/qnxnto.hpp new file mode 100644 index 00000000..33345298 --- /dev/null +++ b/sprout/predef/os/qnxnto.hpp @@ -0,0 +1,36 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_OS_QNXNTO_HPP +#define SPROUT_PREDEF_OS_QNXNTO_HPP + +#include +#include + +#define SPROUT_OS_QNX 0 + +#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && (defined(__QNX__) || defined(__QNXNTO__)) +# undef SPROUT_OS_QNX +# if !defined(SPROUT_OS_QNX) && defined(_NTO_VERSION) +# define SPROUT_OS_QNX SPROUT_PREDEF_MAKE_10_VVRR(_NTO_VERSION) +# endif +# if !defined(SPROUT_OS_QNX) && defined(__QNX__) +# define SPROUT_OS_QNX SPROUT_VERSION_NUMBER(4, 0, 0) +# endif +# if !defined(SPROUT_OS_QNX) +# define SPROUT_OS_QNX 1 +# endif +#endif + +#if SPROUT_OS_QNX +# define SPROUT_OS_QNX_AVAILABLE +# include +#endif + +#define SPROUT_OS_QNX_NAME "QNX" + +#endif // #ifndef SPROUT_PREDEF_OS_QNXNTO_HPP diff --git a/sprout/predef/os/solaris.hpp b/sprout/predef/os/solaris.hpp new file mode 100644 index 00000000..c09765ac --- /dev/null +++ b/sprout/predef/os/solaris.hpp @@ -0,0 +1,27 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_OS_SOLARIS_HPP +#define SPROUT_PREDEF_OS_SOLARIS_HPP + +#include + +#define SPROUT_OS_SOLARIS 0 + +#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && (defined(sun) || defined(__sun)) +# undef SPROUT_OS_SOLARIS +# define SPROUT_OS_SOLARIS 1 +#endif + +#if SPROUT_OS_SOLARIS +# define SPROUT_OS_SOLARIS_AVAILABLE +# include +#endif + +#define SPROUT_OS_SOLARIS_NAME "Solaris" + +#endif // #ifndef SPROUT_PREDEF_OS_SOLARIS_HPP diff --git a/sprout/predef/os/unix.hpp b/sprout/predef/os/unix.hpp new file mode 100644 index 00000000..0007a051 --- /dev/null +++ b/sprout/predef/os/unix.hpp @@ -0,0 +1,39 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_OS_UNIX_HPP +#define SPROUT_PREDEF_OS_UNIX_HPP + +#include + +#define SPROUT_OS_UNIX 0 + +#if defined(unix) || defined(__unix) || defined(_XOPEN_SOURCE) || defined(_POSIX_SOURCE) +# undef SPROUT_OS_UNIX +# define SPROUT_OS_UNIX 1 +#endif + +#if SPROUT_OS_UNIX +# define SPROUT_OS_UNIX_AVAILABLE +#endif + +#define SPROUT_OS_UNIX_NAME "Unix Environment" + +#define SPROUT_OS_SVR4 0 + +#if defined(__sysv__) || defined(__SVR4) || defined(__svr4__) || defined(_SYSTYPE_SVR4) +# undef SPROUT_OS_SVR4 +# define SPROUT_OS_SVR4 1 +#endif + +#if SPROUT_OS_SVR4 +# define SPROUT_OS_SVR4_AVAILABLE +#endif + +#define SPROUT_OS_SVR4_NAME "SVR4 Environment" + +#endif // #ifndef SPROUT_PREDEF_OS_UNIX_HPP diff --git a/sprout/predef/os/vms.hpp b/sprout/predef/os/vms.hpp new file mode 100644 index 00000000..cdd87574 --- /dev/null +++ b/sprout/predef/os/vms.hpp @@ -0,0 +1,32 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_OS_VMS_HPP +#define SPROUT_PREDEF_OS_VMS_HPP + +#include +#include + +#define SPROUT_OS_VMS 0 + +#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) && (defined(VMS) || defined(__VMS)) +# undef SPROUT_OS_VMS +# if defined(__VMS_VER) +# define SPROUT_OS_VMS SPROUT_PREDEF_MAKE_10_VVRR00PP00(__VMS_VER) +# else +# define SPROUT_OS_VMS 1 +# endif +#endif + +#if SPROUT_OS_VMS +# define SPROUT_OS_VMS_AVAILABLE +# include +#endif + +#define SPROUT_OS_VMS_NAME "VMS" + +#endif // #ifndef SPROUT_PREDEF_OS_VMS_HPP diff --git a/sprout/predef/os/windows.hpp b/sprout/predef/os/windows.hpp new file mode 100644 index 00000000..d75542bc --- /dev/null +++ b/sprout/predef/os/windows.hpp @@ -0,0 +1,28 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_OS_WINDOWS_HPP +#define SPROUT_PREDEF_OS_WINDOWS_HPP + +#include + +#define SPROUT_OS_WINDOWS 0 + +#if !defined(SPROUT_PREDEF_DETAIL_OS_DETECTED) \ + && (defined(_WIN32) || defined(_WIN64) || defined(__WIN32__) || defined(__TOS_WIN__) || defined(__WINDOWS__)) +# undef SPROUT_OS_WINDOWS +# define SPROUT_OS_WINDOWS 1 +#endif + +#if SPROUT_OS_WINDOWS +# define SPROUT_OS_WINDOWS_AVAILABLE +# include +#endif + +#define SPROUT_OS_WINDOWS_NAME "Microsoft Windows" + +#endif // #ifndef SPROUT_PREDEF_OS_WINDOWS_HPP diff --git a/sprout/predef/other.hpp b/sprout/predef/other.hpp new file mode 100644 index 00000000..336d833a --- /dev/null +++ b/sprout/predef/other.hpp @@ -0,0 +1,14 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_OTHER_HPP +#define SPROUT_PREDEF_OTHER_HPP + +#include +#include + +#endif // #ifndef SPROUT_PREDEF_OTHER_HPP diff --git a/sprout/predef/other/endian.hpp b/sprout/predef/other/endian.hpp new file mode 100644 index 00000000..82ca68c4 --- /dev/null +++ b/sprout/predef/other/endian.hpp @@ -0,0 +1,142 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + 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 SPROUT_PREDEF_OTHER_ENDIAN_HPP +#define SPROUT_PREDEF_OTHER_ENDIAN_HPP + +#include +#include +#include +#include +#include + +// +// SPROUT_ENDIAN_BIG_BYTE +// SPROUT_ENDIAN_BIG_WORD +// SPROUT_ENDIAN_LITTLE_BYTE +// SPROUT_ENDIAN_LITTLE_WORD +// +#define SPROUT_ENDIAN_BIG_BYTE 0 +#define SPROUT_ENDIAN_BIG_WORD 0 +#define SPROUT_ENDIAN_LITTLE_BYTE 0 +#define SPROUT_ENDIAN_LITTLE_WORD 0 + +#if !SPROUT_ENDIAN_BIG_BYTE && !SPROUT_ENDIAN_BIG_WORD && !SPROUT_ENDIAN_LITTLE_BYTE && !SPROUT_ENDIAN_LITTLE_WORD +# if SPROUT_LIB_C_GNU || SPROUT_OS_ANDROID +# include +# else +# if SPROUT_OS_MACOS +# include +# else +# if SPROUT_OS_BSD +# if SPROUT_OS_BSD_OPEN +# include +# else +# include +# endif +# endif +# endif +# endif +# if defined(__BYTE_ORDER) +# if defined(__BIG_ENDIAN) && (__BYTE_ORDER == __BIG_ENDIAN) +# undef SPROUT_ENDIAN_BIG_BYTE +# define SPROUT_ENDIAN_BIG_BYTE 1 +# endif +# if defined(__LITTLE_ENDIAN) && (__BYTE_ORDER == __LITTLE_ENDIAN) +# undef SPROUT_ENDIAN_LITTLE_BYTE +# define SPROUT_ENDIAN_LITTLE_BYTE 1 +# endif +# if defined(__PDP_ENDIAN) && (__BYTE_ORDER == __PDP_ENDIAN) +# undef SPROUT_ENDIAN_LITTLE_WORD +# define SPROUT_ENDIAN_LITTLE_WORD 1 +# endif +# endif +# if !defined(__BYTE_ORDER) && defined(_BYTE_ORDER) +# if defined(_BIG_ENDIAN) && (_BYTE_ORDER == _BIG_ENDIAN) +# undef SPROUT_ENDIAN_BIG_BYTE +# define SPROUT_ENDIAN_BIG_BYTE 1 +# endif +# if defined(_LITTLE_ENDIAN) && (_BYTE_ORDER == _LITTLE_ENDIAN) +# undef SPROUT_ENDIAN_LITTLE_BYTE +# define SPROUT_ENDIAN_LITTLE_BYTE 1 +# endif +# if defined(_PDP_ENDIAN) && (_BYTE_ORDER == _PDP_ENDIAN) +# undef SPROUT_ENDIAN_LITTLE_WORD +# define SPROUT_ENDIAN_LITTLE_WORD 1 +# endif +# endif +#endif + +#if !SPROUT_ENDIAN_BIG_BYTE && !SPROUT_ENDIAN_BIG_WORD && !SPROUT_ENDIAN_LITTLE_BYTE && !SPROUT_ENDIAN_LITTLE_WORD +# if (defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__)) || (defined(_BIG_ENDIAN) && !defined(_LITTLE_ENDIAN)) \ + || defined(__ARMEB__) || defined(__THUMBEB__) || defined(__AARCH64EB__) || defined(_MIPSEB) || defined(__MIPSEB) || defined(__MIPSEB__) +# undef SPROUT_ENDIAN_BIG_BYTE +# define SPROUT_ENDIAN_BIG_BYTE 1 +# endif +#endif + +#if !SPROUT_ENDIAN_BIG_BYTE && !SPROUT_ENDIAN_BIG_WORD && !SPROUT_ENDIAN_LITTLE_BYTE && !SPROUT_ENDIAN_LITTLE_WORD +# if (defined(__LITTLE_ENDIAN__) && !defined(__BIG_ENDIAN__)) || (defined(_LITTLE_ENDIAN) && !defined(_BIG_ENDIAN)) \ + || defined(__ARMEL__) || defined(__THUMBEL__) || defined(__AARCH64EL__) || defined(_MIPSEL) || defined(__MIPSEL) || defined(__MIPSEL__) +# undef SPROUT_ENDIAN_LITTLE_BYTE +# define SPROUT_ENDIAN_LITTLE_BYTE 1 +# endif +#endif + +#if !SPROUT_ENDIAN_BIG_BYTE && !SPROUT_ENDIAN_BIG_WORD && !SPROUT_ENDIAN_LITTLE_BYTE && !SPROUT_ENDIAN_LITTLE_WORD +# include +# if SPROUT_ARCH_M68K || SPROUT_ARCH_PARISC || SPROUT_ARCH_SPARC || SPROUT_ARCH_SYS370 || SPROUT_ARCH_SYS390 || SPROUT_ARCH_Z +# undef SPROUT_ENDIAN_BIG_BYTE +# define SPROUT_ENDIAN_BIG_BYTE 1 +# endif +# if SPROUT_ARCH_AMD64 || SPROUT_ARCH_IA64 || SPROUT_ARCH_X86 || SPROUT_ARCH_BLACKFIN +# undef SPROUT_ENDIAN_LITTLE_BYTE +# define SPROUT_ENDIAN_LITTLE_BYTE 1 +# endif +#endif + +#if !SPROUT_ENDIAN_BIG_BYTE && !SPROUT_ENDIAN_BIG_WORD && !SPROUT_ENDIAN_LITTLE_BYTE && !SPROUT_ENDIAN_LITTLE_WORD +# if SPROUT_ARCH_ARM +# include +# if SPROUT_OS_WINDOWS +# undef SPROUT_ENDIAN_LITTLE_BYTE +# define SPROUT_ENDIAN_LITTLE_BYTE 1 +# endif +# endif +#endif + +// +// SPROUT_ENDIAN_BIG_BYTE_AVAILABLE +// SPROUT_ENDIAN_BIG_WORD_BYTE_AVAILABLE +// SPROUT_ENDIAN_LITTLE_BYTE_AVAILABLE +// SPROUT_ENDIAN_LITTLE_WORD_BYTE_AVAILABLE +// +#if SPROUT_ENDIAN_BIG_BYTE +# define SPROUT_ENDIAN_BIG_BYTE_AVAILABLE +#endif +#if SPROUT_ENDIAN_BIG_WORD +# define SPROUT_ENDIAN_BIG_WORD_BYTE_AVAILABLE +#endif +#if SPROUT_ENDIAN_LITTLE_BYTE +# define SPROUT_ENDIAN_LITTLE_BYTE_AVAILABLE +#endif +#if SPROUT_ENDIAN_LITTLE_WORD +# define SPROUT_ENDIAN_LITTLE_WORD_BYTE_AVAILABLE +#endif + +// +// SPROUT_ENDIAN_BIG_BYTE_NAME +// SPROUT_ENDIAN_BIG_WORD_NAME +// SPROUT_ENDIAN_LITTLE_BYTE_NAME +// SPROUT_ENDIAN_LITTLE_WORD_NAME +// +#define SPROUT_ENDIAN_BIG_BYTE_NAME "Byte-Swapped Big-Endian" +#define SPROUT_ENDIAN_BIG_WORD_NAME "Word-Swapped Big-Endian" +#define SPROUT_ENDIAN_LITTLE_BYTE_NAME "Byte-Swapped Little-Endian" +#define SPROUT_ENDIAN_LITTLE_WORD_NAME "Word-Swapped Little-Endian" + +#endif // #ifndef SPROUT_PREDEF_OTHER_ENDIAN_HPP diff --git a/sprout/predef/platform.hpp b/sprout/predef/platform.hpp new file mode 100644 index 00000000..bceb4b5e --- /dev/null +++ b/sprout/predef/platform.hpp @@ -0,0 +1,18 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_PLATFORM_HPP +#define SPROUT_PREDEF_PLATFORM_HPP + +#include +#include +#include +#include +#include +#include + +#endif // #ifndef SPROUT_PREDEF_PLATFORM_HPP diff --git a/sprout/predef/platform/mingw.hpp b/sprout/predef/platform/mingw.hpp new file mode 100644 index 00000000..046eb1e8 --- /dev/null +++ b/sprout/predef/platform/mingw.hpp @@ -0,0 +1,44 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_PLATFORM_MINGW_HPP +#define SPROUT_PREDEF_PLATFORM_MINGW_HPP + +#include +#include + +#define SPROUT_PLAT_MINGW 0 + +#if defined(__MINGW32__) || defined(__MINGW64__) +# include <_mingw.h> +# if !defined(SPROUT_PLAT_MINGW_DETECTION) && (defined(__MINGW64_VERSION_MAJOR) && defined(__MINGW64_VERSION_MINOR)) +# define SPROUT_PLAT_MINGW_DETECTION \ + SPROUT_VERSION_NUMBER(__MINGW64_VERSION_MAJOR, __MINGW64_VERSION_MINOR, 0) +# endif +# if !defined(SPROUT_PLAT_MINGW_DETECTION) && (defined(__MINGW32_VERSION_MAJOR) && defined(__MINGW32_VERSION_MINOR)) +# define SPROUT_PLAT_MINGW_DETECTION \ + SPROUT_VERSION_NUMBER(__MINGW32_MAJOR_VERSION, __MINGW32_MINOR_VERSION, 0) +# endif +# if !defined(SPROUT_PLAT_MINGW_DETECTION) +# define SPROUT_PLAT_MINGW_DETECTION 1 +# endif +#endif + +#ifdef SPROUT_PLAT_MINGW_DETECTION +# define SPROUT_PLAT_MINGW_AVAILABLE +# if defined(SPROUT_PREDEF_DETAIL_PLAT_DETECTED) +# define SPROUT_PLAT_MINGW_EMULATED SPROUT_PLAT_MINGW_DETECTION +# else +# undef SPROUT_PLAT_MINGW +# define SPROUT_PLAT_MINGW SPROUT_PLAT_MINGW_DETECTION +# endif +# include +#endif + +#define SPROUT_PLAT_MINGW_NAME "MinGW" + +#endif // #ifndef SPROUT_PREDEF_PLATFORM_MINGW_HPP diff --git a/sprout/predef/platform/windows_desktop.hpp b/sprout/predef/platform/windows_desktop.hpp new file mode 100644 index 00000000..41c660fc --- /dev/null +++ b/sprout/predef/platform/windows_desktop.hpp @@ -0,0 +1,28 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_PLATFORM_WINDOWS_DESKTOP_HPP +#define SPROUT_PREDEF_PLATFORM_WINDOWS_DESKTOP_HPP + +#include +#include + +#define SPROUT_PLAT_WINDOWS_DESKTOP 0 + +#if SPROUT_OS_WINDOWS && (!defined(WINAPI_FAMILY) || (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)) +# undef SPROUT_PLAT_WINDOWS_DESKTOP +# define SPROUT_PLAT_WINDOWS_DESKTOP 1 +#endif + +#if SPROUT_PLAT_WINDOWS_DESKTOP +# define SPROUT_PLAT_WINDOWS_DESKTOP_AVALIABLE +# include +#endif + +#define SPROUT_PLAT_WINDOWS_DESKTOP_NAME "Windows Desktop" + +#endif // #ifndef SPROUT_PREDEF_PLATFORM_WINDOWS_DESKTOP_HPP diff --git a/sprout/predef/platform/windows_phone.hpp b/sprout/predef/platform/windows_phone.hpp new file mode 100644 index 00000000..f20eab3f --- /dev/null +++ b/sprout/predef/platform/windows_phone.hpp @@ -0,0 +1,28 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_PLATFORM_WINDOWS_PHONE_HPP +#define SPROUT_PREDEF_PLATFORM_WINDOWS_PHONE_HPP + +#include +#include + +#define SPROUT_PLAT_WINDOWS_PHONE 0 + +#if SPROUT_OS_WINDOWS && defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP +# undef SPROUT_PLAT_WINDOWS_PHONE +# define SPROUT_PLAT_WINDOWS_PHONE 1 +#endif + +#if SPROUT_PLAT_WINDOWS_PHONE +# define SPROUT_PLAT_WINDOWS_PHONE_AVALIABLE +# include +#endif + +#define SPROUT_PLAT_WINDOWS_PHONE_NAME "Windows Phone" + +#endif // #ifndef SPROUT_PREDEF_PLATFORM_WINDOWS_PHONE_HPP diff --git a/sprout/predef/platform/windows_runtime.hpp b/sprout/predef/platform/windows_runtime.hpp new file mode 100644 index 00000000..32ddfeff --- /dev/null +++ b/sprout/predef/platform/windows_runtime.hpp @@ -0,0 +1,28 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_PLATFORM_WINDOWS_RUNTIME_HPP +#define SPROUT_PREDEF_PLATFORM_WINDOWS_RUNTIME_HPP + +#include +#include + +#define SPROUT_PLAT_WINDOWS_RUNTIME 0 + +#if SPROUT_OS_WINDOWS && defined(WINAPI_FAMILY) && (WINAPI_FAMILY == WINAPI_FAMILY_APP || WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP) +# undef SPROUT_PLAT_WINDOWS_RUNTIME +# define SPROUT_PLAT_WINDOWS_RUNTIME 1 +#endif + +#if SPROUT_PLAT_WINDOWS_RUNTIME +# define SPROUT_PLAT_WINDOWS_RUNTIME_AVALIABLE +# include +#endif + +#define SPROUT_PLAT_WINDOWS_RUNTIME_NAME "Windows Runtime" + +#endif // #ifndef SPROUT_PREDEF_PLATFORM_WINDOWS_RUNTIME_HPP diff --git a/sprout/predef/platform/windows_store.hpp b/sprout/predef/platform/windows_store.hpp new file mode 100644 index 00000000..f4a5ab40 --- /dev/null +++ b/sprout/predef/platform/windows_store.hpp @@ -0,0 +1,28 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + Distributed under the sprout Software License, Version 1.0. (See accompanying + file LICENSE_1_0.txt or copy at http://www.sprout.org/LICENSE_1_0.txt) +=============================================================================*/ +#ifndef SPROUT_PREDEF_PLATFORM_WINDOWS_STORE_HPP +#define SPROUT_PREDEF_PLATFORM_WINDOWS_STORE_HPP + +#include +#include + +#define SPROUT_PLAT_WINDOWS_STORE 0 + +#if SPROUT_OS_WINDOWS && defined(WINAPI_FAMILY) && WINAPI_FAMILY == WINAPI_FAMILY_APP +# undef SPROUT_PLAT_WINDOWS_STORE +# define SPROUT_PLAT_WINDOWS_STORE 1 +#endif + +#if SPROUT_PLAT_WINDOWS_STORE +# define SPROUT_PLAT_WINDOWS_STORE_AVALIABLE +# include +#endif + +#define SPROUT_PLAT_WINDOWS_STORE_NAME "Windows Store" + +#endif // #ifndef SPROUT_PREDEF_PLATFORM_WINDOWS_STORE_HPP diff --git a/sprout/predef/version_number.hpp b/sprout/predef/version_number.hpp new file mode 100644 index 00000000..b810e7ad --- /dev/null +++ b/sprout/predef/version_number.hpp @@ -0,0 +1,40 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + 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 SPROUT_PREDEF_VERSION_NUMBER_HPP +#define SPROUT_PREDEF_VERSION_NUMBER_HPP + +#include + +// +// SPROUT_VERSION_NUMBER +// +#define SPROUT_VERSION_NUMBER(MAJOR, MINOR, PATCH) \ + ( (((MAJOR) % 100) * 10000000) + (((MINOR) % 100) * 100000) + ((PATCH) % 100000) ) + +// +// SPROUT_VERSION_NUMBER_MAX +// SPROUT_VERSION_NUMBER_MIN +// SPROUT_VERSION_NUMBER_ZERO +// +#define SPROUT_VERSION_NUMBER_MAX \ + SPROUT_VERSION_NUMBER(99, 99, 99999) +#define SPROUT_VERSION_NUMBER_MIN \ + SPROUT_VERSION_NUMBER(0, 0, 1) +#define SPROUT_VERSION_NUMBER_ZERO \ + SPROUT_VERSION_NUMBER(0, 0, 0) + +// +// SPROUT_VERSION_NUMBER_AVAILABLE +// SPROUT_VERSION_NUMBER_NOT_AVAILABLE +// +#define SPROUT_VERSION_NUMBER_AVAILABLE \ + SPROUT_VERSION_NUMBER_MIN +#define SPROUT_VERSION_NUMBER_NOT_AVAILABLE \ + SPROUT_VERSION_NUMBER_ZERO + +#endif // #ifndef SPROUT_PREDEF_OS_BSD_BSDI_HPP diff --git a/sprout/type_traits/enable_if.hpp b/sprout/type_traits/enable_if.hpp index 5f995803..0bd85ee4 100644 --- a/sprout/type_traits/enable_if.hpp +++ b/sprout/type_traits/enable_if.hpp @@ -8,7 +8,9 @@ #ifndef SPROUT_TYPE_TRAITS_ENABLE_IF_HPP #define SPROUT_TYPE_TRAITS_ENABLE_IF_HPP +#include #include +#include namespace sprout { // diff --git a/sprout/type_traits/enable_if_has_type.hpp b/sprout/type_traits/enable_if_has_type.hpp new file mode 100644 index 00000000..d55c0aaf --- /dev/null +++ b/sprout/type_traits/enable_if_has_type.hpp @@ -0,0 +1,24 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + 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 SPROUT_TYPE_TRAITS_ENABLE_IF_HAS_TYPE_HPP +#define SPROUT_TYPE_TRAITS_ENABLE_IF_HAS_TYPE_HPP + +#include + +namespace sprout { + // + // enable_if_has_type + // + template + struct enable_if_has_type { + public: + typedef R type; + }; +} // namespace sprout + +#endif // #ifndef SPROUT_TYPE_TRAITS_ENABLE_IF_HAS_TYPE_HPP diff --git a/sprout/utility/ignore_unused.hpp b/sprout/utility/ignore_unused.hpp new file mode 100644 index 00000000..4bc3bbb6 --- /dev/null +++ b/sprout/utility/ignore_unused.hpp @@ -0,0 +1,21 @@ +/*============================================================================= + Copyright (c) 2011-2015 Bolero MURAKAMI + https://github.com/bolero-MURAKAMI/Sprout + + 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 SPROUT_UTILITY_IGNORE_UNUSED_HPP +#define SPROUT_UTILITY_IGNORE_UNUSED_HPP + +#include + +namespace sprout { + // + // ignore_unused + // + inline SPROUT_CXX14_CONSTEXPR void + ignore_unused(...) SPROUT_NOEXCEPT {} +} // namespace sprout + +#endif // #ifndef SPROUT_UTILITY_IGNORE_UNUSED_HPP diff --git a/sprout/utility/operation_ext.hpp b/sprout/utility/operation_ext.hpp index 2c28499d..ed100a02 100644 --- a/sprout/utility/operation_ext.hpp +++ b/sprout/utility/operation_ext.hpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #endif // #ifndef SPROUT_UTILITY_OPERATION_EXT_HPP diff --git a/testspr/header_all.hpp b/testspr/header_all.hpp index 741aafbb..66051358 100644 --- a/testspr/header_all.hpp +++ b/testspr/header_all.hpp @@ -58,6 +58,7 @@ #include #include #include +#include #include #include #include diff --git a/testspr/typeinfo.hpp b/testspr/typeinfo.hpp index 3ed7d951..2840c007 100644 --- a/testspr/typeinfo.hpp +++ b/testspr/typeinfo.hpp @@ -41,39 +41,53 @@ namespace testspr { // // typename_of // -#ifdef TESTSPR_HAS_CXXABI_H namespace detail { - inline SPROUT_NON_CONSTEXPR std::string - cxa_demangle(char const* mangled) { - int status; - char* demangled = abi::__cxa_demangle(mangled, 0, 0, &status); - std::string result(demangled); - std::free(demangled); - return result; +#ifdef TESTSPR_HAS_CXXABI_H + inline SPROUT_NON_CONSTEXPR char* + demangle_alloc(char const* name) { + int status = 0; + return abi::__cxa_demangle(name, 0, 0, &status); } + inline SPROUT_NON_CONSTEXPR void + demangle_free(char* demangled) { + std::free(demangled); + } + class scoped_demangled_name { + private: + char* demangled_; + public: + explicit SPROUT_NON_CONSTEXPR scoped_demangled_name(char const* name) SPROUT_NOEXCEPT + : demangled_(testspr::detail::demangle_alloc(name)) + {} + ~scoped_demangled_name() SPROUT_NOEXCEPT { + testspr::detail::demangle_free(demangled_); + } + SPROUT_NON_CONSTEXPR char const* get() const SPROUT_NOEXCEPT { + return demangled_; + } + }; + inline SPROUT_NON_CONSTEXPR std::string + demangle(char const* name) { + scoped_demangled_name demangled(name); + return demangled.get() ? demangled.get() : name; + } +#else + inline SPROUT_NON_CONSTEXPR std::string + demangle(char const* name) { + return name; + } +#endif } // namespace detail template inline SPROUT_NON_CONSTEXPR std::string typename_of() { - return testspr::detail::cxa_demangle(typeid(T).name()); + return testspr::detail::demangle(typeid(T).name()); } template inline SPROUT_NON_CONSTEXPR std::string typename_of(T&& t) { - return testspr::detail::cxa_demangle(typeid(std::forward(t)).name()); + return testspr::detail::demangle(typeid(std::forward(t)).name()); } -#else - template - inline SPROUT_NON_CONSTEXPR std::string - typename_of() { - return std::string(typeid(T).name()); - } - template - inline SPROUT_NON_CONSTEXPR std::string - typename_of(T&& t) { - return std::string(typeid(std::forward(t)).name()); - } -#endif } // namespace testspr #endif // #ifndef TESTSPR_TYPEINFO_HPP