source: trunk/lib/config.hpp @ 3833

Last change on this file since 3833 was 2275, checked in by ksherdy, 7 years ago

Reverted previous del.

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