Do not split string literals.
[libfirm] / ir / libcore / lc_config.h
1 /*
2   libcore: library for basic data structures and algorithms.
3   Copyright (C) 2005  IPD Goos, Universit"at Karlsruhe, Germany
4
5   This library is free software; you can redistribute it and/or
6   modify it under the terms of the GNU Lesser General Public
7   License as published by the Free Software Foundation; either
8   version 2.1 of the License, or (at your option) any later version.
9
10   This library is distributed in the hope that it will be useful,
11   but WITHOUT ANY WARRANTY; without even the implied warranty of
12   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13   Lesser General Public License for more details.
14
15   You should have received a copy of the GNU Lesser General Public
16   License along with this library; if not, write to the Free Software
17   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
18 */
19
20
21 /**
22  * Central definitions for the libcore.
23  * @author Sebastian Hack
24  * @date 22.12.2004
25  */
26
27 #ifndef _LC_CONFIG_H
28 #define _LC_CONFIG_H
29
30 #if defined(__STD_VERSION__) && __STD_VERSION >= 199901L
31 #define LC_HAVE_C99 1
32 #endif
33
34 /* ISO C99 Standard stuff */
35 #ifdef LC_HAVE_C99
36 #define LC_INLINE      inline
37 #define LC_FUNCNAME    __func__
38 #define LC_UNUSED(x)   x
39 #define LC_LONGLONG    long long
40 #define LC_LONGDOUBLE  long double
41
42 /* definitions using GCC */
43 #elif defined(__GNUC__)
44
45 #define LC_INLINE      __inline__
46 #define LC_FUNCNAME    __FUNCTION__
47 #define LC_UNUSED(x)   x __attribute__((__unused__))
48
49 #ifdef __STRICT_ANSI__
50 #define LC_LONGLONG    long
51 #define LC_LONGDOUBLE  double
52 #else
53 #define LC_LONGLONG    long long
54 #define LC_LONGDOUBLE  long double
55 #endif
56
57 #elif defined(_MSC_VER)
58
59 #define LC_INLINE      __inline
60 #define LC_FUNCNAME    "<unknown>"
61 #define LC_UNUSED(x)   x
62 #define LC_LONGLONG    __int64
63 #define LC_LONGDOUBLE  long double
64
65 /* disable warning: 'foo' was declared deprecated, use 'bla' instead */
66 /* of course MS had to make 'bla' incompatible to 'foo', so a simple */
67 /* define will not work :-((( */
68 #pragma warning( disable : 4996 )
69
70 #ifdef _WIN32
71 #define snprintf _snprintf
72 #endif /* _WIN32 */
73
74 #if _MSC_VER <= 1200
75 typedef __int16         int16;
76 typedef __int32         int32;
77 typedef __int64         int64;
78 typedef unsigned __int16                uint16;
79 typedef unsigned __int32                uint32;
80 typedef unsigned __int64                uint64;
81 #endif /* _MSC_VER <= 1200 */
82
83 /* default definitions */
84 #else /* defined(_MSC_VER) */
85
86 #define LC_INLINE
87 #define LC_FUNCNAME "<unknown>"
88 #define LC_UNUSED(x)
89 #define LC_LONGLONG long
90 #define LC_LONGDOUBLE double
91
92 #endif
93
94 #endif /* _LC_CONFIG_H */