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