Main Page Modules Namespace List Class Hierarchy Alphabetical List Compound List File List Namespace Members Compound Members File Members Related Pages

# deOS.hpp

Go to the documentation of this file.

    00001 ///////////////////////////////////////////////////////////////////////////////
    00002 /// @file deOS.hpp
    00003 ///
    00004 /// @Header containing various things to help the porting to multiple platforms
    00005 ///
    00006 /// @author CILCoder
    00007 ///
    00008 /// This file is the intellectual property of Novus Delta, LLC.. Usage of the
    00009 /// contents of this file is subject to the Destiny3D Member License which
    00010 /// can be found at http://www.destiny3d.com.  Any other usage is prohibited.
    00011 ///
    00012 /// This file is distributed "AS IS" without warranty of any kind.  Novus
    00013 /// Delta, LLC. does not guarantee the fitness of the contents of this file
    00014 /// for any particular purpose.
    00015 ///
    00016 /// Copyright (C) 2001-2003 Novus Delta, LLC. All Rights Reserved.
    00017 ///
    00018 /// <hr>
    00019 ///                                 Change History
    00020 /// <hr>
    00021 ///
    00022 /// @date May 2003
    00023 /// @author JesusFreak
    00024 /// @remarks Creation
    00025 ///
    00026 ///////////////////////////////////////////////////////////////////////////////
    00027 #ifndef DE_OS_HPP
    00028 #define DE_OS_HPP
    00029
    00030 // platforms
    00031
    00032 #if defined(linux)
    00033 #   undef _WIN32
    00034 #   undef WIN32
    00035 #   undef DESTINY3D_PLATFORM_WIN32
    00036 #   define DESTINY3D_PLATFORM_LINUX
    00037 #   define DE3D_HANDLES_ARE_VOID
    00038 #   define DEDLL_EXPORT
    00039 #   define DEDLL_IMPORT
    00040 #   define strcmpi strcasecmp
    00041
    00042 #elif defined(_WIN32)
    00043 #   undef linux
    00044 #   undef LINUX
    00045 #   undef DESTINY3D_PLATFORM_LINUX
    00046 #   define DESTINY3D_PLATFORM_WIN32
    00047 #   define DEDLL_EXPORT __declspec(dllexport)
    00048 #   define DEDLL_IMPORT __declspec(dllimport)
    00049
    00050 #else
    00051 #   error "Unsupported Platform - please notify Novus Delta"
    00052 #endif
    00053
    00054
    00055
    00056 // CPU's
    00057 #if (defined(__i386__)) || (defined(_M_IX86) && _M_IX86 >= 500)
    00058 #   define DE3D_CPU_LITTLE_ENDIAN (1)
    00059 #   define DE3D_CPU_BIG_ENDIAN (0)
    00060 #   define DE3D_CPU_I386
    00061 #   define DE3D_CPU "I386"
    00062 #else
    00063 #   error "Unsupported CPU type - please notify Novus Delta"
    00064 #endif
    00065
    00066
    00067
    00068 // compilers
    00069 #if defined (__GNUC__)
    00070     // GCC
    00071 #   if (__GNUC__ == 2) && (__GNUC_MINOR__ < 90)
    00072 #       error "gcc version unsupported"
    00073 #   endif
    00074 #   define DESTINY3D_COMPILER "GNU C++ version " __VERSION__
    00075 #   define DE3D_INT64_IS_LONG_LONG
    00076 #   define DE3D_INTERFACE(iface,baseiface) class iface : virtual public baseiface
    00077 #   define DE3D_INTERFACE_(iface) class iface
    00078
    00079 #elif defined (__BORLANDC__)
    00080     // Borland
    00081 #   define DESTINY3D_COMPILER "Borland C++ version " DESTRINGIZE_VALUE(__BORLANDC__)
    00082 #   if (__BORLANDC__ >= 0x561)
    00083 #       define DE3D_INT64_IS_LONG_LONG
    00084 #   elif (__BORLANDC__ >= 0x530)
    00085 #       define DE3D_INT64_IS_MS_INT64
    00086 #   endif
    00087
    00088 #elif defined (__INTEL_COMPILER) || defined(__ICL) || defined(__ICC) || defined(__ECC)
    00089     // Intel
    00090 #   if (defined (_MSC_VER) && (_MSC_VER >= 1200))
    00091 #       define DE3D_INT64_IS_MS_INT64
    00092 #   endif
    00093
    00094 #elif defined (_MSC_VER)
    00095     // Microsoft Visual C++ (only if tested last, other compilers define it also)
    00096 #   if (_MSC_VER >= 1200) // MSVC 6
    00097 #       define DE3D_INT64_IS_MS_INT64
    00098 #       define DESTINY3D_COMPILER "Microsoft Visual C++ version 6.0"
    00099 #       define DE3D_NOVTABLE __declspec(novtable)
    00100 #       define DE3D_INTERFACE(iface,baseiface) class DE3D_NOVTABLE iface : virtual public baseiface
    00101 #       define DE3D_INTERFACE_(iface) class DE3D_NOVTABLE iface
    00102 #       pragma warning (disable : 4514) // unreferenced inline discarded. Lots of them. that's nice, now shut up.
    00103 #       pragma warning (disable : 4251) // base class needs to have dll-interface to be used by clients of class - gives endless pain on templated classes
    00104 #       pragma warning (disable : 4710) // function not inlined - another pain on templated classes
    00105 #       pragma warning (disable : 4127) // conditional expression is constant
    00106 #       pragma warning (disable : 4505) // unreferenced local function removed
    00107 #       pragma warning (disable : 4250) // x inherits y via dominance
    00108 #       pragma warning (disable : 4201) // nameless struct or union
    00109 #       if (NDEBUG)
    00110 #           pragma warning (disable : 4390) // empty controlled statement (such as in asserts)
    00111 #       endif
    00112 #   else
    00113 #       error "Unsupported MSVC Compiler - please notify Novus Delta"
    00114 #   endif
    00115
    00116 #   if (_MSC_VER >= 1300) // MSVC 7 (.NET)
    00117 #       undef DESTINY3D_COMPILER
    00118 #       define DESTINY3D_COMPILER "Microsoft Visual C++ version 7.0"
    00119 #   endif
    00120
    00121 #   if (_MSC_VER >= 1310) // MSVC 7.1 (.NET)
    00122 #       define DE3D_INT64_IS_LONG_LONG
    00123 #       undef DESTINY3D_COMPILER
    00124 #       define DESTINY3D_COMPILER "Microsoft Visual C++ version 7.1"
    00125 #   endif
    00126
    00127 #else
    00128 #   error "Unsupported Compiler - please notify Novus Delta"
    00129 #endif
    00130
    00131
    00132 #endif // DE_OS_HPP