author | Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com> |
Mon, 03 May 2010 13:17:34 +0300 | |
changeset 19 | fcece45ef507 |
parent 0 | 1918ee327afb |
child 30 | 5dc02b23752f |
permissions | -rw-r--r-- |
0 | 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 |
#include "autotoolsconfig.h" |
|
24 |
#endif |
|
25 |
||
26 |
#include <wtf/Platform.h> |
|
27 |
||
28 |
#if PLATFORM(WIN_OS) && !defined(BUILDING_WX__) && !COMPILER(GCC) |
|
29 |
#if defined(BUILDING_JavaScriptCore) || defined(BUILDING_WTF) |
|
30 |
#define JS_EXPORTDATA __declspec(dllexport) |
|
31 |
#else |
|
32 |
#define JS_EXPORTDATA __declspec(dllimport) |
|
33 |
#endif |
|
34 |
#if defined(BUILDING_WebCore) || defined(BUILDING_WebKit) |
|
35 |
#define WEBKIT_EXPORTDATA __declspec(dllexport) |
|
36 |
#else |
|
37 |
#define WEBKIT_EXPORTDATA __declspec(dllimport) |
|
38 |
#endif |
|
39 |
#else |
|
40 |
#define JS_EXPORTDATA |
|
41 |
#define WEBKIT_EXPORTDATA |
|
42 |
#endif |
|
43 |
||
44 |
#define MOBILE 0 |
|
45 |
||
46 |
#ifdef __APPLE__ |
|
47 |
#define HAVE_FUNC_USLEEP 1 |
|
48 |
#endif /* __APPLE__ */ |
|
49 |
||
50 |
#if PLATFORM(WIN_OS) |
|
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 |
#ifndef max |
|
63 |
#define max max |
|
64 |
#endif |
|
65 |
#ifndef min |
|
66 |
#define min min |
|
67 |
#endif |
|
68 |
||
69 |
// CURL needs winsock, so don't prevent inclusion of it |
|
70 |
#if !USE(CURL) |
|
71 |
#ifndef _WINSOCKAPI_ |
|
72 |
#define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h |
|
73 |
#endif |
|
74 |
#endif |
|
75 |
||
76 |
#endif /* PLATFORM(WIN_OS) */ |
|
77 |
||
78 |
#ifdef __cplusplus |
|
79 |
||
80 |
// These undefs match up with defines in WebCorePrefix.h for Mac OS X. |
|
81 |
// Helps us catch if anyone uses new or delete by accident in code and doesn't include "config.h". |
|
82 |
#undef new |
|
83 |
#undef delete |
|
84 |
#include <wtf/FastMalloc.h> |
|
85 |
||
86 |
#endif |
|
87 |
||
88 |
// On MSW, wx headers need to be included before windows.h is. |
|
89 |
// The only way we can always ensure this is if we include wx here. |
|
90 |
#if PLATFORM(WX) |
|
91 |
// The defines in KeyboardCodes.h conflict with Windows as well, and the only way I've found |
|
92 |
// to address the problem is include KeyboarddCodes.h before windows.h, so do it here. |
|
93 |
#include "KeyboardCodes.h" |
|
94 |
#include <wx/defs.h> |
|
95 |
#endif |
|
96 |
||
97 |
// this breaks compilation of <QFontDatabase>, at least, so turn it off for now |
|
98 |
// Also generates errors on wx on Windows, presumably because these functions |
|
99 |
// are used from wx headers. |
|
100 |
#if !PLATFORM(QT) && !PLATFORM(WX) && !PLATFORM(CHROMIUM) |
|
101 |
#include <wtf/DisallowCType.h> |
|
102 |
#endif |
|
103 |
||
104 |
#if COMPILER(MSVC) |
|
105 |
#define SKIP_STATIC_CONSTRUCTORS_ON_MSVC 1 |
|
106 |
#else |
|
107 |
#define SKIP_STATIC_CONSTRUCTORS_ON_GCC 1 |
|
108 |
#endif |
|
109 |
||
110 |
#if PLATFORM(WIN) |
|
111 |
#if defined(WIN_CAIRO) |
|
112 |
#undef WTF_PLATFORM_CG |
|
113 |
#define WTF_PLATFORM_CAIRO 1 |
|
114 |
#undef WTF_USE_CFNETWORK |
|
115 |
#define WTF_USE_CURL 1 |
|
116 |
#ifndef _WINSOCKAPI_ |
|
117 |
#define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h |
|
118 |
#endif |
|
119 |
#else |
|
120 |
#define WTF_PLATFORM_CG 1 |
|
121 |
#undef WTF_PLATFORM_CAIRO |
|
122 |
#define WTF_USE_CFNETWORK 1 |
|
123 |
#undef WTF_USE_CURL |
|
124 |
#endif |
|
125 |
#undef WTF_USE_WININET |
|
126 |
#define WTF_PLATFORM_CF 1 |
|
127 |
#define WTF_USE_PTHREADS 0 |
|
128 |
#endif |
|
129 |
||
130 |
#if PLATFORM(MAC) |
|
131 |
// ATSUI vs. CoreText |
|
132 |
#if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) |
|
133 |
#define WTF_USE_ATSUI 0 |
|
134 |
#define WTF_USE_CORE_TEXT 1 |
|
135 |
#else |
|
136 |
#define WTF_USE_ATSUI 1 |
|
137 |
#define WTF_USE_CORE_TEXT 0 |
|
138 |
#endif |
|
139 |
||
140 |
// New theme |
|
141 |
#define WTF_USE_NEW_THEME 1 |
|
142 |
#endif // PLATFORM(MAC) |
|
143 |
||
144 |
#if PLATFORM(SYMBIAN) |
|
145 |
#undef WIN32 |
|
146 |
#undef _WIN32 |
|
19
fcece45ef507
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
147 |
#if COMPILER(WINSCW) |
0 | 148 |
#undef SKIP_STATIC_CONSTRUCTORS_ON_GCC |
19
fcece45ef507
Revision: 201015
Dremov Kirill (Nokia-D-MSW/Tampere) <kirill.dremov@nokia.com>
parents:
0
diff
changeset
|
149 |
#endif |
0 | 150 |
#define USE_SYSTEM_MALLOC 1 |
151 |
#define U_HAVE_INT8_T 0 |
|
152 |
#define U_HAVE_INT16_T 0 |
|
153 |
#define U_HAVE_INT32_T 0 |
|
154 |
#define U_HAVE_INT64_T 0 |
|
155 |
#define U_HAVE_INTTYPES_H 0 |
|
156 |
||
157 |
#include <stdio.h> |
|
158 |
#include <limits.h> |
|
159 |
#include <wtf/MathExtras.h> |
|
160 |
#endif |
|
161 |
||
162 |
#if PLATFORM(CHROMIUM) |
|
163 |
||
164 |
#if !PLATFORM(DARWIN) |
|
165 |
// Define SKIA on non-Mac. |
|
166 |
#define WTF_PLATFORM_SKIA 1 |
|
167 |
#endif /* !PLATFORM(DARWIN) */ |
|
168 |
||
169 |
// Chromium uses this file instead of JavaScriptCore/config.h to compile |
|
170 |
// JavaScriptCore/wtf (chromium doesn't compile the rest of JSC). Therefore, |
|
171 |
// this define is required. |
|
172 |
#define WTF_CHANGES 1 |
|
173 |
||
174 |
#define WTF_USE_GOOGLEURL 1 |
|
175 |
||
176 |
#if !defined(WTF_USE_V8) |
|
177 |
#define WTF_USE_V8 1 |
|
178 |
#endif |
|
179 |
||
180 |
#undef WTF_USE_CFNETWORK |
|
181 |
||
182 |
#endif /* PLATFORM(CHROMIUM) */ |
|
183 |
||
184 |
#if !defined(WTF_USE_V8) |
|
185 |
#define WTF_USE_V8 0 |
|
186 |
#endif /* !defined(WTF_USE_V8) */ |
|
187 |
||
188 |
/* Using V8 implies not using JSC and vice versa */ |
|
189 |
#define WTF_USE_JSC !WTF_USE_V8 |
|
190 |
||
191 |
#if PLATFORM(CG) |
|
192 |
#ifndef CGFLOAT_DEFINED |
|
193 |
#ifdef __LP64__ |
|
194 |
typedef double CGFloat; |
|
195 |
#else |
|
196 |
typedef float CGFloat; |
|
197 |
#endif |
|
198 |
#define CGFLOAT_DEFINED 1 |
|
199 |
#endif |
|
200 |
#endif /* PLATFORM(CG) */ |
|
201 |
||
202 |
#ifdef BUILDING_ON_TIGER |
|
203 |
#undef ENABLE_FTPDIR |
|
204 |
#define ENABLE_FTPDIR 0 |
|
205 |
#endif |
|
206 |
||
207 |
#if PLATFORM(WIN) && PLATFORM(CG) |
|
208 |
#define WTF_USE_SAFARI_THEME 1 |
|
209 |
#endif |