/************************************************************************* * * $Id: triodef.h,v 1.35 2009/09/20 11:37:14 breese Exp $ * * Copyright (C) 2001 Bjorn Reese * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. * ************************************************************************/ #ifndef TRIO_TRIODEF_H #define TRIO_TRIODEF_H /************************************************************************* * Compiler support detection */ #if defined(__GNUC__) # define TRIO_COMPILER_GCC #endif #if defined(__SUNPRO_CC) # define TRIO_COMPILER_SUNPRO __SUNPRO_CC #else # if defined(__SUNPRO_C) # define TRIO_COMPILER_SUNPRO __SUNPRO_C # endif #endif #if defined(__xlC__) || defined(__IBMC__) || defined(__IBMCPP__) # define TRIO_COMPILER_XLC #else # if defined(_AIX) && !defined(__GNUC__) # define TRIO_COMPILER_XLC /* Workaround for old xlc */ # endif #endif #if defined(__DECC) || defined(__DECCXX) # define TRIO_COMPILER_DECC #else # if defined(__osf__) && defined(__LANGUAGE_C__) && !defined(__GNUC__) # define TRIO_COMPILER_DECC /* Workaround for old DEC C compilers */ # endif #endif #if defined(__HP_aCC) || defined(__HP_cc) # define TRIO_COMPILER_HP #endif #if defined(sgi) || defined(__sgi) # define TRIO_COMPILER_MIPSPRO #endif #if defined(_MSC_VER) # define TRIO_COMPILER_MSVC #endif #if defined(__BORLANDC__) # define TRIO_COMPILER_BCB #endif /************************************************************************* * Platform support detection */ #if defined(VMS) || defined(__VMS) # define TRIO_PLATFORM_VMS #endif #if defined(unix) || defined(__unix) || defined(__unix__) # define TRIO_PLATFORM_UNIX #endif #if defined(TRIO_COMPILER_XLC) || defined(_AIX) # define TRIO_PLATFORM_UNIX #endif #if defined(TRIO_COMPILER_DECC) || defined(__osf___) # if !defined(TRIO_PLATFORM_VMS) # define TRIO_PLATFORM_UNIX # endif #endif #if defined(__NetBSD__) # define TRIO_PLATFORM_UNIX #endif #if defined(__Lynx__) # define TRIO_PLATFORM_UNIX # define TRIO_PLATFORM_LYNX #endif #if defined(__APPLE__) && defined(__MACH__) # define TRIO_PLATFORM_UNIX #endif #if defined(__QNX__) # define TRIO_PLATFORM_UNIX # define TRIO_PLATFORM_QNX #endif #if defined(__CYGWIN__) # define TRIO_PLATFORM_UNIX #endif #if defined(AMIGA) && defined(TRIO_COMPILER_GCC) # define TRIO_PLATFORM_UNIX #endif #if defined(TRIO_COMPILER_MSVC) || defined(WIN32) || defined(_WIN32) # define TRIO_PLATFORM_WIN32 #endif #if defined(_WIN32_WCE) # define TRIO_PLATFORM_WINCE #endif #if defined(mpeix) || defined(__mpexl) # define TRIO_PLATFORM_MPEIX #endif #if defined(_AIX) # define TRIO_PLATFORM_AIX #endif #if defined(__hpux) # define TRIO_PLATFORM_HPUX #endif #if defined(sun) || defined(__sun__) # if defined(__SVR4) || defined(__svr4__) # define TRIO_PLATFORM_SOLARIS # else # define TRIO_PLATFORM_SUNOS # endif #endif /************************************************************************* * Standards support detection */ #if defined(__STDC__) \ || defined(_MSC_EXTENSIONS) \ || defined(TRIO_COMPILER_BCB) # define PREDEF_STANDARD_C89 #endif #if defined(__STDC_VERSION__) # define PREDEF_STANDARD_C90 #endif #if (__STDC_VERSION__ - 0 >= 199409L) # define PREDEF_STANDARD_C94 #endif #if (__STDC_VERSION__ - 0 >= 199901L) # define PREDEF_STANDARD_C99 #endif #if defined(TRIO_COMPILER_SUNPRO) && (TRIO_COMPILER_SUNPRO >= 0x420) # if !defined(PREDEF_STANDARD_C94) # define PREDEF_STANDARD_C94 # endif #endif #if defined(__cplusplus) # define PREDEF_STANDARD_CXX #endif #if __cplusplus - 0 >= 199711L #