Fix the issue that Web Audio test case fails on PR3.
[framework/web/webkit-efl.git] / Source / WebCore / config.h
1 /*
2  * Copyright (C) 2004, 2005, 2006 Apple Inc.
3  * Copyright (C) 2009 Google Inc. All rights reserved.
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 #if OS(WINDOWS) && !OS(WINCE) && !PLATFORM(QT) && !PLATFORM(CHROMIUM) && !PLATFORM(GTK) && !PLATFORM(WX)
33 #include <WebCore/WebCoreHeaderDetection.h>
34 #endif
35
36 #include <wtf/ExportMacros.h>
37 #include "PlatformExportMacros.h"
38
39 #include <runtime/JSExportMacros.h>
40
41 #ifdef __APPLE__
42 #define HAVE_FUNC_USLEEP 1
43 #endif /* __APPLE__ */
44
45 #if OS(WINDOWS)
46
47 #ifndef _WIN32_WINNT
48 #define _WIN32_WINNT 0x0500
49 #endif
50
51 #ifndef WINVER
52 #define WINVER 0x0500
53 #endif
54
55 // If we don't define these, they get defined in windef.h.
56 // We want to use std::min and std::max.
57 #ifndef max
58 #define max max
59 #endif
60 #ifndef min
61 #define min min
62 #endif
63
64 // CURL needs winsock, so don't prevent inclusion of it
65 #if !USE(CURL)
66 #ifndef _WINSOCKAPI_
67 #define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h
68 #endif
69 #endif
70
71 #endif /* OS(WINDOWS) */
72
73 #ifdef __cplusplus
74
75 // These undefs match up with defines in WebCorePrefix.h for Mac OS X.
76 // Helps us catch if anyone uses new or delete by accident in code and doesn't include "config.h".
77 #undef new
78 #undef delete
79 #include <wtf/FastMalloc.h>
80
81 #include <ciso646>
82
83 #endif
84
85 // On MSW, wx headers need to be included before windows.h is.
86 // The only way we can always ensure this is if we include wx here.
87 #if PLATFORM(WX)
88 #include <wx/defs.h>
89 #endif
90
91 // this breaks compilation of <QFontDatabase>, at least, so turn it off for now
92 // Also generates errors on wx on Windows, presumably because these functions
93 // are used from wx headers. On GTK+ for Mac many GTK+ files include <libintl.h>
94 // or <glib/gi18n-lib.h>, which in turn include <xlocale/_ctype.h> which uses
95 // isacii(). 
96 #if !PLATFORM(QT) && !PLATFORM(WX) && !PLATFORM(CHROMIUM) && !(OS(DARWIN) && PLATFORM(GTK)) && !OS(QNX) && !defined(_LIBCPP_VERSION)
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(WIN)
107 #if PLATFORM(WIN_CAIRO)
108 #undef WTF_USE_CG
109 #define WTF_USE_CAIRO 1
110 #define WTF_USE_CURL 1
111 #ifndef _WINSOCKAPI_
112 #define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h
113 #endif
114 #elif !OS(WINCE)
115 #define WTF_USE_CG 1
116 #undef WTF_USE_CAIRO
117 #undef WTF_USE_CURL
118 #endif
119 #endif
120
121 #if PLATFORM(MAC)
122 // New theme
123 #define WTF_USE_NEW_THEME 1
124 #endif // PLATFORM(MAC)
125
126 #if PLATFORM(CHROMIUM)
127
128 // Chromium uses this file instead of JavaScriptCore/config.h to compile
129 // JavaScriptCore/wtf (chromium doesn't compile the rest of JSC). Therefore,
130 // this define is required.
131 #define WTF_CHANGES 1
132
133 #define WTF_USE_GOOGLEURL 1
134
135 #endif /* PLATFORM(CHROMIUM) */
136
137 #if USE(CG)
138 #ifndef CGFLOAT_DEFINED
139 #ifdef __LP64__
140 typedef double CGFloat;
141 #else
142 typedef float CGFloat;
143 #endif
144 #define CGFLOAT_DEFINED 1
145 #endif
146 #endif /* USE(CG) */
147
148 #if PLATFORM(WIN) && USE(CG)
149 #define WTF_USE_SAFARI_THEME 1
150 #endif
151
152 // CoreAnimation is available to IOS, Mac and Windows if using CG
153 #if PLATFORM(MAC) || PLATFORM(IOS) || (PLATFORM(WIN) && USE(CG))
154 #define WTF_USE_CA 1
155 #endif
156
157 // FIXME: Move this to JavaScriptCore/wtf/Platform.h, which is where we define WTF_USE_AVFOUNDATION on the Mac.
158 // https://bugs.webkit.org/show_bug.cgi?id=67334
159 #if PLATFORM(WIN) && HAVE(AVCF)
160 #define WTF_USE_AVFOUNDATION 1
161 #endif
162