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

context.h

00001 
00002 #ifndef __UPF_CONTEXT_H__
00003 #define __UPF_CONTEXT_H__
00004 
00005 /*
00006     NB: Some (many) checks in this file were taken from the Boost library.
00007         Relevant copyright notice is bellow:
00008   
00009         (C) Copyright Boost.org 2001. Permission to copy, use, modify, sell and
00010         distribute this software is granted provided this copyright notice appears
00011         in all copies. This software is provided "as is" without express or implied
00012         warranty, and with no claim as to its suitability for any purpose.
00013   
00014         See http://www.boost.org for most recent version.
00015  */
00016 
00017 #define _UPF_STRINGIZE(x)     _UPF_DO_STRINGIZE(x)
00018 #define _UPF_DO_STRINGIZE(x)  #x
00019 
00020 /*****************************************************************************
00021  *                          Check for the compiler:                          *
00022  *****************************************************************************/
00023 
00024 /* GNU C++ compiler: */
00025 #if defined(__GNUC__)
00026     #ifdef __GNUC_PATCHLEVEL__
00027       #define _UPF_COMPILER \
00028         "GNU C++ " _UPF_STRINGIZE(__GNUC__) "." _UPF_STRINGIZE(__GNUC_MINOR__) "." _UPF_STRINGIZE(__GNUC_PATCHLEVEL__)
00029     #else
00030       #define _UPF_COMPILER \
00031         "GNU C++ " _UPF_STRINGIZE(__GNUC__) "." _UPF_STRINGIZE(__GNUC_MINOR__)
00032     #endif
00033 
00034 /* Intel C++ compiler: */
00035 #elif defined(__INTEL_COMPILER)
00036     #define _UPF_COMPILER \
00037         "Intel C++ " _UPF_STRINGIZE(__INTEL_COMPILER)
00038 
00039 /* Microsoft Visual C++ compiler: */
00040 #elif defined(_MSC_VER) && !defined(__MWERKS__)
00041     #define _UPF_COMPILER \
00042         "Microsoft Visual C++ " _UPF_STRINGIZE(_MSC_VER)
00043 
00044 /* Borland C++: */
00045 #elif defined(__BORLANDC__)
00046     #define _UPF_COMPILER \
00047         "Borland C++ " _UPF_STRINGIZE(__BORLANDC__)
00048 
00049 #endif
00050 
00051 
00052 /*****************************************************************************
00053  *                      Check for the standard library:                      *
00054  *****************************************************************************/
00055 
00056 #include <utility>
00057 
00058 /* STLport: */
00059 #if defined(__SGI_STL_PORT) || defined(_STLPORT_VERSION)
00060     /* STLport typically sits on top of some other library => MUST be first */
00061     #define _UPF_STDLIB \
00062         "STLport " _UPF_STRINGIZE(__SGI_STL_PORT)
00063 
00064 /* Rogue Wave library: */
00065 #elif defined(_RWSTD_VER)
00066     #define _UPF_STDLIB \
00067         "Rogue Wave " _UPF_STRINGIZE(_RWSTD_VER)
00068 
00069 /* Dinkumware Library: */
00070 #elif defined(_CPPLIB_VER)
00071     #define _UPF_STDLIB \
00072         "Dinkumware " _UPF_STRINGIZE(_CPPLIB_VER)
00073 
00074 /* GNU libstdc++ 3: */
00075 #elif defined(__GLIBCPP__)
00076     #define _UPF_STDLIB \
00077         "GNU libstdc++ " _UPF_STRINGIZE(__GLIBCPP__)
00078 
00079 #endif
00080 
00081 
00082 
00083 
00084 
00085 /*****************************************************************************
00086  *               Define runtime context and compiler string:                 *
00087  *****************************************************************************/
00088 
00089 /* Define human-readable compiler description (_not_ for context-detection): */
00090 #if !defined(_UPF_COMPILER)
00091     #define _UPF_COMPILER_STRING ""
00092 #else
00093     #if !defined(_UPF_STDLIB)
00094         #define _UPF_COMPILER_STRING _UPF_COMPILER
00095     #else
00096         #define _UPF_COMPILER_STRING _UPF_COMPILER " with " _UPF_STDLIB
00097     #endif
00098 #endif
00099 
00100 #if !defined(UPF_DISABLE_CONTEXTS) && defined(_UPF_COMPILER) && defined(_UPF_STDLIB)
00101     #ifdef UPF_VENDOR
00102         #define UPF_RUNTIME_CONTEXT \
00103             "upf " UPF_VERSION_STRING ", " _UPF_COMPILER_STRING " (" UPF_VENDOR ")"
00104     #else
00105         #define UPF_RUNTIME_CONTEXT \
00106             "upf " UPF_VERSION_STRING ", " _UPF_COMPILER_STRING
00107     #endif
00108 #else
00109     #define UPF_RUNTIME_CONTEXT     NULL
00110 #endif
00111 
00112 
00113 #endif /* __UPF_CONTEXT_H__ */

Generated on Wed Jan 15 23:10:55 2003 for Universal Plugins Framework by doxygen1.2.18