Merge Fix: Spills have ProjMs now
[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 #ifndef _LC_CONFIG_H
27 #define _LC_CONFIG_H
28
29 #if defined(__GNUC__)
30
31 #define inline         __inline__
32 #define LC_FUNCNAME    __FUNCTION__
33 #define LC_PRINTF(m) __attribute__((format(printf,m,(m)+1)))
34
35 #ifdef __STRICT_ANSI__
36 #define LC_LONGLONG    long
37 #define LC_LONGDOUBLE  double
38 #else
39 #define LC_LONGLONG    long long
40 #define LC_LONGDOUBLE  long double
41 #endif
42
43 #elif defined(_MSC_VER)
44
45 #define LC_FUNCNAME    "<unknown>"
46 #define LC_PRINTF(m)
47
48 #define LC_LONGLONG    __int64
49 #define LC_LONGDOUBLE  long double
50
51 /* disable warning: 'foo' was declared deprecated, use 'bla' instead */
52 /* of course MS had to make 'bla' incompatible to 'foo', so a simple */
53 /* define will not work :-((( */
54 #pragma warning( disable : 4996 )
55
56 #ifdef _WIN32
57 #define snprintf _snprintf
58 #endif /* _WIN32 */
59
60 #if _MSC_VER <= 1200
61 typedef __int16            int16;
62 typedef __int32            int32;
63 typedef __int64            int64;
64 typedef unsigned __int16   uint16;
65 typedef unsigned __int32   uint32;
66 typedef unsigned __int64   uint64;
67 #endif /* _MSC_VER <= 1200 */
68
69 /* default definitions */
70 #else /* !defined(__GNUC__) && !defined(_MSC_VER) */
71
72 #define inline
73 #define LC_FUNCNAME "<unknown>"
74 #define LC_LONGLONG long
75 #define LC_LONGDOUBLE double
76 #define LC_PRINTF(m)
77
78 #endif
79
80 #endif /* _LC_CONFIG_H */