tizen beta release
[profile/ivi/webkit-efl.git] / Source / WTF / config.h
1 /*
2  * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
3  * Copyright (C) 2006 Samuel Weinig <sam.weinig@gmail.com>
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Library General Public
7  * License as published by the Free Software Foundation; either
8  * version 2 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  * Library General Public License for more details.
14  *
15  * You should have received a copy of the GNU Library General Public License
16  * along with this library; see the file COPYING.LIB.  If not, write to
17  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18  * Boston, MA 02110-1301, USA.
19  *
20  */
21
22 #if defined(HAVE_CONFIG_H) && HAVE_CONFIG_H
23 #ifdef BUILDING_WITH_CMAKE
24 #include "cmakeconfig.h"
25 #else
26 #include "autotoolsconfig.h"
27 #endif
28 #endif
29
30 #include <wtf/Platform.h>
31
32 /* See note in wtf/Platform.h for more info on EXPORT_MACROS. */
33 #if USE(EXPORT_MACROS)
34
35 #include <wtf/ExportMacros.h>
36
37 #if defined(BUILDING_JavaScriptCore) || defined(BUILDING_WTF)
38 #define WTF_EXPORT_PRIVATE WTF_EXPORT
39 #else
40 #define WTF_EXPORT_PRIVATE WTF_IMPORT
41 #endif
42
43 #else /* !USE(EXPORT_MACROS) */
44
45 #define WTF_EXPORT_PRIVATE
46 #define JS_EXPORT_PRIVATE
47
48 #endif /* USE(EXPORT_MACROS) */
49
50 #if OS(WINDOWS)
51
52 #ifndef _WIN32_WINNT
53 #define _WIN32_WINNT 0x0500
54 #endif
55
56 #ifndef WINVER
57 #define WINVER 0x0500
58 #endif
59
60 // If we don't define these, they get defined in windef.h. 
61 // We want to use std::min and std::max
62 #define max max
63 #define min min
64
65 #if !COMPILER(MSVC7_OR_LOWER) && !OS(WINCE)
66 // We need to define this before the first #include of stdlib.h or it won't contain rand_s.
67 #ifndef _CRT_RAND_S
68 #define _CRT_RAND_S
69 #endif
70 #endif
71
72 #endif
73
74 #if OS(UNIX) || OS(WINDOWS)
75 #define WTF_USE_OS_RANDOMNESS 1
76 #endif
77
78 #if (OS(FREEBSD) || OS(OPENBSD)) && !defined(__GLIBC__)
79 #define HAVE_PTHREAD_NP_H 1
80 #endif
81
82 /* FIXME: if all platforms have these, do they really need #defines? */
83 #define HAVE_STDINT_H 1
84
85 #define WTF_CHANGES 1
86
87 #ifdef __cplusplus
88 #undef new
89 #undef delete
90 #include <wtf/FastMalloc.h>
91 #endif
92
93 // this breaks compilation of <QFontDatabase>, at least, so turn it off for now
94 // Also generates errors on wx on Windows and QNX, because these functions
95 // are used from wx and QNX headers. 
96 #if !PLATFORM(QT) && !PLATFORM(WX) && !OS(QNX)
97 #include <wtf/DisallowCType.h>
98 #endif
99
100 #if COMPILER(MSVC)
101 #define SKIP_STATIC_CONSTRUCTORS_ON_MSVC 1
102 #else
103 #define SKIP_STATIC_CONSTRUCTORS_ON_GCC 1
104 #endif
105
106 #if PLATFORM(CHROMIUM)
107 #if !defined(WTF_USE_V8)
108 #define WTF_USE_V8 1
109 #endif
110 #endif /* PLATFORM(CHROMIUM) */
111
112 #if !defined(WTF_USE_V8)
113 #define WTF_USE_V8 0
114 #endif /* !defined(WTF_USE_V8) */
115
116 /* Using V8 implies not using JSC and vice versa */
117 #define WTF_USE_JSC !WTF_USE_V8