//============================================================================= // drt/sys/sport.hpp // DRT C++ porting definitions. // // Usage // This file must be supplied by the programmer when porting to a new // platform. // It contains definitions for controlling the porting of the source code. // Most of the definitions are determined by testing macros that are // predefined by the compiler (such as '_unix'). // // The 'DRT_HAS_XXX' macros must be #defined to 0 or 1. // Each macro controls a specific aspect of the C++ language or library, // and must be #defined to reflect the capabilities of the local compiler // and library. // // This file is #included by "sdefs.hpp". // This file is not explicitly #included by any source file; rather, the // "sdefs.hpp" file is #included everywhere, and it in turn #includes this // file. // // Definitions // The following control macros are defined in each "s_xxx.hpp" header // file that is #included by this file: // DRT_OS_xxx 1 Indicates the platform type // Examples: // DRT_OS_UNIX Unix (POSIX) // DRT_OS_LINIX Linix // DRT_OS_WIN32 Microsoft Windows (Win32) // // DRT_CXX_xxx 1 Indicates the compiler type // Examples: // DRT_CXX_GCC Gnu C++ (gcc) // DRT_CXX_MSVC Microsoft Visual C++ // // DRT_HAS_AND 0 or 1 Has 'and' keyword // DRT_HAS_ARRAY_CTOR 0 or 1 Allows member array init in ctor // DRT_HAS_ARRAY_NEW 0 or 1 Has 'new[]' operator // DRT_HAS_BOOL 0 or 1 Has 'bool' type // DRT_HAS_CAST 0 or 1 Has 'static_cast' keyword // DRT_HAS_EXPLICIT 0 or 1 Has 'explicit' keyword // DRT_HAS_MUTABLE 0 or 1 Has 'mutable' keyword // DRT_HAS_NAMESPACE 0 or 1 Has namespaces // DRT_HAS_NEW 0 or 1 Has standard header // DRT_HAS_NOTHROW 0 or 1 Has 'new(nothrow)' // DRT_HAS_STD 0 or 1 Has 'std::' namespace // DRT_HAS_STL 0 or 1 Has standard template lib // DRT_HAS_THROW 0 or 1 Has exceptions // // See also // sdefs.hpp // s_xxx.hpp // // History // 1.01, 1998-04-23, David R Tribble. // First cut. // // 1.02, 1998-05-30, David R Tribble. // Changed filename prefix from "j" to "s". // // 1.03, 1998-06-17, David R Tribble. // Documented the control macro names. // // 1.04, 1999-02-26, David R Tribble. // Moved to drt/sys/. // // Copyright ©1998-1999, by David R. Tribble, all rights reserved. // See "drt/sys/copyr.txt" for more information. //----------------------------------------------------------------------------- #ifndef drt_sys_sport_hpp #define drt_sys_sport_hpp 104 // Verify include order #ifndef drt_sys_sdefs_hpp #error Include "sys/sdefs.hpp" instead of this header #endif // Identification #ifndef NO_H_IDENT static const char drt_sys_sport_hpp_id[] = "@(#)drt/sys/sport.hpp 1.04"; #endif // Include the control file appropriate to the local platform #if defined(unix) || defined(_unix) || defined(__unix) || defined(__unix__) // Generic Unix (POSIX) #include "s_unix.hpp" #elif defined(_MSC_VER) // Microsloth Visual C++, Win32 #include "s_msc.hpp" //#elif {your_platform_macro_goes_here} // #include "s_{platform}.hpp" #else #error Cannot determine the platform type from predefined macros #endif #endif // drt_sys_sport_hpp // End sport.hpp