C/C++ User's Journal STLSoft - ... Robust, Lightweight, Cross-platform, Template Software ... ATLSTL - where the Standard Template Library meets the Active Template Library COMSTL - where the Standard Template Library meets the Component Object Model
Synesis Software InetSTL - where the Standard Template Library meets the Internet UNIXSTL - Template Software for the UNIX Operating System WinSTL - where the Standard Template Library meets the Win32 API

recls/internal/compiler.h

Go to the documentation of this file.
00001 /* /////////////////////////////////////////////////////////////////////////////
00002  * File:        recls/internal/compiler.h
00003  *
00004  * Purpose:     Compiler discrimination for the recls API.
00005  *
00006  * Created:     15th August 2003
00007  * Updated:     16th June 2006
00008  *
00009  * Home:        http://recls.org/
00010  *
00011  * Copyright (c) 2003-2006, Matthew Wilson and Synesis Software
00012  * All rights reserved.
00013  *
00014  * Redistribution and use in source and binary forms, with or without 
00015  * modification, are permitted provided that the following conditions are met:
00016  *
00017  * - Redistributions of source code must retain the above copyright notice, this
00018  *   list of conditions and the following disclaimer. 
00019  * - Redistributions in binary form must reproduce the above copyright notice,
00020  *   this list of conditions and the following disclaimer in the documentation
00021  *   and/or other materials provided with the distribution.
00022  * - Neither the name(s) of Matthew Wilson and Synesis Software nor the names of
00023  *   any contributors may be used to endorse or promote products derived from
00024  *   this software without specific prior written permission.
00025  *
00026  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
00027  * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
00028  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
00029  * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
00030  * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
00031  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
00032  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
00033  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
00034  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
00035  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
00036  * POSSIBILITY OF SUCH DAMAGE.
00037  *
00038  * ////////////////////////////////////////////////////////////////////////// */
00039 
00040 
00041 #ifndef RECLS_INCL_RECLS_INTERNAL_H_COMPILER
00042 #define RECLS_INCL_RECLS_INTERNAL_H_COMPILER
00043 
00044 /* File version */
00045 #ifndef RECLS_DOCUMENTATION_SKIP_SECTION
00046 # define RECLS_VER_RECLS_INTERNAL_H_COMPILER_MAJOR      4
00047 # define RECLS_VER_RECLS_INTERNAL_H_COMPILER_MINOR      0
00048 # define RECLS_VER_RECLS_INTERNAL_H_COMPILER_REVISION   1
00049 # define RECLS_VER_RECLS_INTERNAL_H_COMPILER_EDIT       17
00050 #endif /* !RECLS_DOCUMENTATION_SKIP_SECTION */
00051 
00057 /* /////////////////////////////////////////////////////////////////////////////
00058  * Compiler detection
00059  */
00060 
00061 #if defined(__COMO__)
00062 # define RECLS_COMPILER_IS_COMO
00063 #elif defined(__BORLANDC__)
00064 # define RECLS_COMPILER_IS_BORLAND
00065 #elif defined(_CH_)
00066 # define RECLS_COMPILER_IS_CH
00067 #elif defined(__DMC__)
00068 # define RECLS_COMPILER_IS_DMC
00069 #elif defined(__GNUC__)
00070 # define RECLS_COMPILER_IS_GCC
00071 #elif defined(__INTEL_COMPILER)
00072 # define RECLS_COMPILER_IS_INTEL
00073 #elif defined(__MWERKS__)
00074 # define RECLS_COMPILER_IS_MWERKS
00075 #elif defined(__VECTORC)
00076 # define RECLS_COMPILER_IS_VECTORC
00077 #elif defined(__WATCOMC__)
00078 # define RECLS_COMPILER_IS_WATCOM
00079 #elif defined(_MSC_VER)
00080 # define RECLS_COMPILER_IS_MSVC
00081 #else
00082 # error Compiler not recognised
00083 #endif /* compiler */
00084 
00085 /* /////////////////////////////////////////////////////////////////////////////
00086  * Includes
00087  */
00088 
00089 #if defined(RECLS_COMPILER_IS_BORLAND)
00090 # include <recls/internal/compiler_borland.h>
00091 #elif defined(RECLS_COMPILER_IS_CH)
00092 # include <recls/internal/compiler_ch.h>
00093 #elif defined(RECLS_COMPILER_IS_COMO)
00094 # include <recls/internal/compiler_como.h>
00095 #elif defined(RECLS_COMPILER_IS_DMC)
00096 # include <recls/internal/compiler_dmc.h>
00097 #elif defined(RECLS_COMPILER_IS_GCC)
00098 # include <recls/internal/compiler_gcc.h>
00099 #elif defined(RECLS_COMPILER_IS_INTEL)
00100 # include <recls/internal/compiler_intel.h>
00101 #elif defined(RECLS_COMPILER_IS_MSVC)
00102 # include <recls/internal/compiler_msvc.h>
00103 #elif defined(RECLS_COMPILER_IS_MWERKS)
00104 # include <recls/internal/compiler_mwerks.h>
00105 #elif defined(RECLS_COMPILER_IS_VECTORC)
00106 # include <recls/internal/compiler_vectorc.h>
00107 #elif defined(RECLS_COMPILER_IS_WATCOM)
00108 # include <recls/internal/compiler_watcom.h>
00109 #else
00110 # error Compiler not recognised. recls recognises Borland, CodeWarrior, Digital Mars, GCC, Intel, Visual C++ and Watcom.
00111 #endif /* compiler */
00112 
00113 /* /////////////////////////////////////////////////////////////////////////////
00114  * Calling convention
00115  */
00116 
00138 #define RECLS_CALLCONV_NULL
00139 #if defined(RECLS_OVERRIDE_PLATFORM)
00140 # ifndef RECLS_CALLCONV_CDECL
00141 #  define RECLS_CALLCONV_CDECL
00142 # endif /* !RECLS_CALLCONV_CDECL */
00143 # ifndef RECLS_CALLCONV_STDDECL
00144 #  define RECLS_CALLCONV_STDDECL
00145 # endif /* !RECLS_CALLCONV_STDDECL */
00146 # ifndef RECLS_CALLCONV_FASTDECL
00147 #  define RECLS_CALLCONV_FASTDECL
00148 # endif /* !RECLS_CALLCONV_FASTDECL */
00149 # ifndef RECLS_CALLCONV_DEFAULT
00150 #  define RECLS_CALLCONV_DEFAULT
00151 # endif /* !RECLS_CALLCONV_DEFAULT */
00152 #elif defined(RECLS_DOCUMENTATION_SKIP_SECTION)
00153 # define RECLS_CALLCONV_CDECL
00154 # define RECLS_CALLCONV_STDDECL
00155 # define RECLS_CALLCONV_FASTDECL
00156 # define RECLS_CALLCONV_DEFAULT
00157 #elif defined(RECLS_PLATFORM_IS_WIN32)
00158 # define RECLS_CALLCONV_CDECL               __cdecl
00159 # define RECLS_CALLCONV_STDDECL             __stdcall
00160 # define RECLS_CALLCONV_FASTDECL            __fastcall
00161 # define RECLS_CALLCONV_DEFAULT             __cdecl
00162 #elif defined(RECLS_PLATFORM_IS_WIN16)
00163 # define RECLS_CALLCONV_CDECL               _cdecl
00164 # define RECLS_CALLCONV_STDDECL             _pascal
00165 # define RECLS_CALLCONV_FASTDECL            _pascal
00166 # define RECLS_CALLCONV_DEFAULT             _cdecl
00167 #elif defined(RECLS_PLATFORM_IS_UNIX)
00168 # define RECLS_CALLCONV_CDECL
00169 # define RECLS_CALLCONV_STDDECL
00170 # define RECLS_CALLCONV_FASTDECL
00171 # define RECLS_CALLCONV_DEFAULT
00172 #else /* ? OS */
00173 # error Platform not recognised
00174 #endif /* __SYNSOFT_VAL_OS_WIN16 */
00175 
00176 /* /////////////////////////////////////////////////////////////////////////////
00177  * Namespace
00178  */
00179 
00180 #if !defined(RECLS_NO_NAMESPACE)
00181 namespace recls
00182 {
00183 #endif /* !RECLS_NO_NAMESPACE */
00184 
00185 /* /////////////////////////////////////////////////////////////////////////////
00186  * Typedefs
00187  */
00188 
00190 typedef unsigned int        recls_bool_t;
00191 
00192 /* /////////////////////////////////////////////////////////////////////////////
00193  * Namespace typedefs
00194  */
00195 
00196 #if !defined(RECLS_NO_NAMESPACE)
00197 typedef recls_sint8_t       sint8_t;
00198 typedef recls_uint8_t       uint8_t;
00199 
00200 typedef recls_sint16_t      sint16_t;
00201 typedef recls_uint16_t      uint16_t;
00202 
00203 typedef recls_sint32_t      sint32_t;
00204 typedef recls_uint32_t      uint32_t;
00205 
00206 typedef recls_sint64_t      sint64_t;
00207 typedef recls_uint64_t      uint64_t;
00208 
00209 typedef recls_bool_t        bool_t;
00210 #endif /* !RECLS_NO_NAMESPACE */
00211 
00212 /* /////////////////////////////////////////////////////////////////////////////
00213  * Constants and definitions
00214  */
00215 
00216 /* /////////////////////////////////////////////////////////////////////////////
00217  * Namespace
00218  */
00219 
00220 #if !defined(RECLS_NO_NAMESPACE)
00221 } /* namespace recls */
00222 #endif /* !RECLS_NO_NAMESPACE */
00223 
00224 /* ////////////////////////////////////////////////////////////////////////// */
00225 
00226 #endif /* !RECLS_INCL_RECLS_INTERNAL_H_COMPILER */
00227 
00228 /* ////////////////////////////////////////////////////////////////////////// */

recls Library documentation © Synesis Software Pty Ltd, 2001-2006