Fixed warning because of wrong type.
[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
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_UNUSED(x)   x
47 #define LC_LONGLONG    __int64
48 #define LC_LONGDOUBLE  long double
49
50 /* disable warning: 'foo' was declared deprecated, use 'bla' instead */
51 /* of course MS had to make 'bla' incompatible to 'foo', so a simple */
52 /* define will not work :-((( */
53 #pragma warning( disable : 4996 )
54
55 #ifdef _WIN32
56 #define snprintf _snprintf
57 #endif /* _WIN32 */
58
59 #if _MSC_VER <= 1200
60 typedef __int16         int16;
61 typedef __int32         int32;
62 typedef __int64         int64;
63 typedef unsigned __int16                uint16;
64 typedef unsigned __int32                uint32;
65 typedef unsigned __int64                uint64;
66 #endif /* _MSC_VER <= 1200 */
67
68 /* default definitions */
69 #else /* defined(_MSC_VER) */
70
71 #define inline
72 #define LC_FUNCNAME "<unknown>"
73 #define LC_UNUSED(x)
74 #define LC_LONGLONG long
75 #define LC_LONGDOUBLE double
76
77 #endif
78
79 #endif /* _LC_CONFIG_H */