source: trunk/lib_c/config.h @ 4051

Last change on this file since 4051 was 3391, checked in by linmengl, 6 years ago

check in IDISA C library and other support libraries. Some template features still remain.

File size: 2.3 KB
Line 
1/* Generated by cpp2c.rb from ./config.hpp
2 * Use IDISA C support
3*/
4
5#ifndef CONFIG_H_
6#define CONFIG_H_
7
8/*=============================================================================
9    config.hpp - Compiler dependent configuration.
10
11    Copyright (C) 2011, Robert D. Cameron, Kenneth S. Herdy, Hua Huang and Nigel Medforth.
12    Licensed to the public under the Open Software License 3.0.
13    Licensed to International Characters Inc.
14       under the Academic Free License version 3.0.
15=============================================================================*/
16
17#if !(defined (_MSC_VER) || (defined __GNUC__))
18        #error "Compiler not supported. Aborting compilation."
19#endif
20
21/*
22 * Eliminate definitions of max and min macros from WinDef.h or
23 * any other source.   
24*/
25#undef min
26#undef max
27
28/*
29 * IDISA_INLINE is a macro which expands to tell the compiler that the method
30 * decorated with it should be inlined.  This macro is usable from C and C++
31 * code, even though C89 does not support the |inline| keyword.  The compiler
32 * may ignore this directive if it chooses.
33 */
34#ifndef IDISA_INLINE
35        #if defined __cplusplus
36                #define IDISA_INLINE          inline
37        #elif defined _MSC_VER
38                #define IDISA_INLINE          __inline
39        //      #elif defined __INTEL_COMPILER
40        //              #define IDISA_INLINE              __inline // ICC defaults to GCC. See, Intel® C++ Compiler User and Reference Guides
41        #elif defined __GNUC__
42                #define IDISA_INLINE          __inline__
43        #else
44                #define IDISA_INLINE          inline
45        #endif
46#endif
47
48/*
49 * IDISA_INLINE is a macro which expands to tell the compiler that the
50 * method decorated with it must be inlined, even if the compiler thinks
51 * otherwise.  This is only a (much) stronger version of the IDISA_INLINE hint:
52 * compilers are not guaranteed to respect it (although they're much more likely
53 * to do so).
54 */
55#ifndef IDISA_ALWAYS_INLINE
56        #if defined IDISA_DEBUG
57                #define IDISA_ALWAYS_INLINE   IDISA_INLINE
58        #elif defined _MSC_VER
59                #define IDISA_ALWAYS_INLINE   __forceinline
60        //      #elif defined __INTEL_COMPILER
61        //              #define IDISA_ALWAYS_INLINE     __forceinline // ICC defaults to GCC. See, Intel® C++ Compiler User and Reference Guides
62        #elif defined __GNUC__
63                #define IDISA_ALWAYS_INLINE   __attribute__((always_inline)) IDISA_INLINE
64        #else
65                #define IDISA_ALWAYS_INLINE   IDISA_INLINE
66        #endif
67#endif
68
69#endif // CONFIG_H_
70
Note: See TracBrowser for help on using the repository browser.