triodef.h revision 38ae7e4efe803ea78b6499cd05a394db32623e41
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync/*************************************************************************
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync * $Id: triodef.h 3473 2006-05-31 13:35:28Z veillard $
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync * Copyright (C) 2001 Bjorn Reese <breese@users.sourceforge.net>
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync * Permission to use, copy, modify, and distribute this software for any
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync * purpose with or without fee is hereby granted, provided that the above
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync * copyright notice and this permission notice appear in all copies.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync ************************************************************************/
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync/*************************************************************************
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync * Platform and compiler support detection
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync#elif defined(__xlC__) || defined(__IBMC__) || defined(__IBMCPP__)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# define TRIO_COMPILER_XLC /* Workaround for old xlc */
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# define TRIO_COMPILER_DECC /* Workaround for old DEC C compilers */
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync * VMS is placed first to avoid identifying the platform as Unix
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync * based on the DECC compiler later on.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync#elif defined(unix) || defined(__unix) || defined(__unix__)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync#elif defined(TRIO_COMPILER_DECC) || defined(__osf___)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync#elif defined(TRIO_COMPILER_MSVC) || defined(WIN32) || defined(_WIN32)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync#if defined(_AIX)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync#if defined(__STDC__) || defined(TRIO_COMPILER_MSVC) || defined(TRIO_COMPILER_BCB)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync/*************************************************************************
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync * Generic defines
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# define TRIO_PRIVATE static
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync#if !(defined(TRIO_COMPILER_SUPPORTS_C89) || defined(__cplusplus))
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsynctypedef char * trio_pointer_t;
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# define TRIO_PROTO(x) ()
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# define TRIO_ARGS4(list,a1,a2,a3,a4) list a1; a2; a3; a4;
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# define TRIO_ARGS5(list,a1,a2,a3,a4,a5) list a1; a2; a3; a4; a5;
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# define TRIO_ARGS6(list,a1,a2,a3,a4,a5,a6) list a1; a2; a3; a4; a5; a6;
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# define TRIO_VARGS4(list,a1,a2,a3,a4) list a1; a2; a3; a4
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# define TRIO_VARGS5(list,a1,a2,a3,a4,a5) list a1; a2; a3; a4; a5
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync#else /* ANSI C */
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# define TRIO_CONST const
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# define TRIO_VOLATILE volatile
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# define TRIO_SIGNED signed
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsynctypedef long double trio_long_double_t;
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsynctypedef void * trio_pointer_t;
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# define TRIO_SUFFIX_LONG(x) x ## L
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# define TRIO_ARGS5(list,a1,a2,a3,a4,a5) (a1,a2,a3,a4,a5)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# define TRIO_ARGS6(list,a1,a2,a3,a4,a5,a6) (a1,a2,a3,a4,a5,a6)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync#if defined(TRIO_COMPILER_SUPPORTS_C99) || defined(__cplusplus)
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync# define TRIO_INLINE inline
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync/*************************************************************************
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync * Workarounds
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync * Computations done with constants at compile time can trigger these
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync * even when compiling with IEEE enabled.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync * Although the compiler supports C99 language constructs, the C
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync * run-time library does not contain all C99 functions.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync * This was the case for 70300022. Update the 80000000 value when
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync * it has been accurately determined what version of the library
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync * supports C99.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync * Not all preprocessors supports the LL token.
38ae7e4efe803ea78b6499cd05a394db32623e41vboxsync#endif /* TRIO_TRIODEF_H */