js/src/assembler/wtf/Platform.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

michael@0 1 /*
michael@0 2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
michael@0 3 * Copyright (C) 2007-2009 Torch Mobile, Inc.
michael@0 4 * Copyright (C) Research In Motion Limited 2010. All rights reserved.
michael@0 5 *
michael@0 6 * Redistribution and use in source and binary forms, with or without
michael@0 7 * modification, are permitted provided that the following conditions
michael@0 8 * are met:
michael@0 9 * 1. Redistributions of source code must retain the above copyright
michael@0 10 * notice, this list of conditions and the following disclaimer.
michael@0 11 * 2. Redistributions in binary form must reproduce the above copyright
michael@0 12 * notice, this list of conditions and the following disclaimer in the
michael@0 13 * documentation and/or other materials provided with the distribution.
michael@0 14 *
michael@0 15 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
michael@0 16 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
michael@0 17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
michael@0 18 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
michael@0 19 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
michael@0 20 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
michael@0 21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
michael@0 22 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
michael@0 23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
michael@0 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
michael@0 25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
michael@0 26 */
michael@0 27
michael@0 28 #ifndef assembler_wtf_Platform_h
michael@0 29 #define assembler_wtf_Platform_h
michael@0 30
michael@0 31 /* ==== PLATFORM handles OS, operating environment, graphics API, and
michael@0 32 CPU. This macro will be phased out in favor of platform adaptation
michael@0 33 macros, policy decision macros, and top-level port definitions. ==== */
michael@0 34 #define PLATFORM(WTF_FEATURE) (defined WTF_PLATFORM_##WTF_FEATURE && WTF_PLATFORM_##WTF_FEATURE)
michael@0 35
michael@0 36
michael@0 37 /* ==== Platform adaptation macros: these describe properties of the target environment. ==== */
michael@0 38
michael@0 39 /* COMPILER() - the compiler being used to build the project */
michael@0 40 #define COMPILER(WTF_FEATURE) (defined WTF_COMPILER_##WTF_FEATURE && WTF_COMPILER_##WTF_FEATURE)
michael@0 41 /* CPU() - the target CPU architecture */
michael@0 42 #define CPU(WTF_FEATURE) (defined WTF_CPU_##WTF_FEATURE && WTF_CPU_##WTF_FEATURE)
michael@0 43 /* HAVE() - specific system features (headers, functions or similar) that are present or not */
michael@0 44 #define HAVE(WTF_FEATURE) (defined HAVE_##WTF_FEATURE && HAVE_##WTF_FEATURE)
michael@0 45 /* OS() - underlying operating system; only to be used for mandated low-level services like
michael@0 46 virtual memory, not to choose a GUI toolkit */
michael@0 47 #define OS(WTF_FEATURE) (defined WTF_OS_##WTF_FEATURE && WTF_OS_##WTF_FEATURE)
michael@0 48
michael@0 49
michael@0 50 /* ==== Policy decision macros: these define policy choices for a particular port. ==== */
michael@0 51
michael@0 52 /* USE() - use a particular third-party library or optional OS service */
michael@0 53 #define USE(WTF_FEATURE) (defined WTF_USE_##WTF_FEATURE && WTF_USE_##WTF_FEATURE)
michael@0 54 /* ENABLE() - turn on a specific feature of WebKit */
michael@0 55 #define ENABLE(WTF_FEATURE) (defined ENABLE_##WTF_FEATURE && ENABLE_##WTF_FEATURE)
michael@0 56
michael@0 57
michael@0 58
michael@0 59 /* ==== COMPILER() - the compiler being used to build the project ==== */
michael@0 60
michael@0 61 /* WTF_COMPILER_MSVC Microsoft Visual C++ */
michael@0 62 /* WTF_COMPILER_MSVC7_OR_LOWER Microsoft Visual C++ 2003 or lower*/
michael@0 63 /* WTF_COMPILER_MSVC9_OR_LOWER Microsoft Visual C++ 2008 or lower*/
michael@0 64 #if defined(_MSC_VER)
michael@0 65 #define WTF_COMPILER_MSVC 1
michael@0 66 #if _MSC_VER < 1400
michael@0 67 #define WTF_COMPILER_MSVC7_OR_LOWER 1
michael@0 68 #elif _MSC_VER < 1600
michael@0 69 #define WTF_COMPILER_MSVC9_OR_LOWER 1
michael@0 70 #endif
michael@0 71 #endif
michael@0 72
michael@0 73 /* WTF_COMPILER_RVCT - ARM RealView Compilation Tools */
michael@0 74 /* WTF_COMPILER_RVCT4_OR_GREATER - ARM RealView Compilation Tools 4.0 or greater */
michael@0 75 #if defined(__CC_ARM) || defined(__ARMCC__)
michael@0 76 #define WTF_COMPILER_RVCT 1
michael@0 77 #define RVCT_VERSION_AT_LEAST(major, minor, patch, build) (__ARMCC_VERSION >= (major * 100000 + minor * 10000 + patch * 1000 + build))
michael@0 78 #else
michael@0 79 /* Define this for !RVCT compilers, just so we can write things like RVCT_VERSION_AT_LEAST(3, 0, 0, 0). */
michael@0 80 #define RVCT_VERSION_AT_LEAST(major, minor, patch, build) 0
michael@0 81 #endif
michael@0 82
michael@0 83 /* WTF_COMPILER_GCC - GNU Compiler Collection */
michael@0 84 /* --gnu option of the RVCT compiler also defines __GNUC__ */
michael@0 85 #if defined(__GNUC__) && !WTF_COMPILER_RVCT
michael@0 86 #define WTF_COMPILER_GCC 1
michael@0 87 #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
michael@0 88 #define GCC_VERSION_AT_LEAST(major, minor, patch) (GCC_VERSION >= (major * 10000 + minor * 100 + patch))
michael@0 89 #else
michael@0 90 /* Define this for !GCC compilers, just so we can write things like GCC_VERSION_AT_LEAST(4, 1, 0). */
michael@0 91 #define GCC_VERSION_AT_LEAST(major, minor, patch) 0
michael@0 92 #endif
michael@0 93
michael@0 94 /* WTF_COMPILER_MINGW - MinGW GCC */
michael@0 95 /* WTF_COMPILER_MINGW64 - mingw-w64 GCC - only used as additional check to exclude mingw.org specific functions */
michael@0 96 #if defined(__MINGW32__)
michael@0 97 #define WTF_COMPILER_MINGW 1
michael@0 98 #include <_mingw.h> /* private MinGW header */
michael@0 99 #if defined(__MINGW64_VERSION_MAJOR) /* best way to check for mingw-w64 vs mingw.org */
michael@0 100 #define WTF_COMPILER_MINGW64 1
michael@0 101 #endif /* __MINGW64_VERSION_MAJOR */
michael@0 102 #endif /* __MINGW32__ */
michael@0 103
michael@0 104 /* WTF_COMPILER_WINSCW - CodeWarrior for Symbian emulator */
michael@0 105 #if defined(__WINSCW__)
michael@0 106 #define WTF_COMPILER_WINSCW 1
michael@0 107 /* cross-compiling, it is not really windows */
michael@0 108 #undef WIN32
michael@0 109 #undef _WIN32
michael@0 110 #endif
michael@0 111
michael@0 112 /* WTF_COMPILER_INTEL - Intel C++ Compiler */
michael@0 113 #if defined(__INTEL_COMPILER)
michael@0 114 #define WTF_COMPILER_INTEL 1
michael@0 115 #endif
michael@0 116
michael@0 117 /* WTF_COMPILER_SUNCC */
michael@0 118 #if defined(__SUNPRO_CC) || defined(__SUNPRO_C)
michael@0 119 #define WTF_COMPILER_SUNCC 1
michael@0 120 #endif
michael@0 121
michael@0 122 /* ==== CPU() - the target CPU architecture ==== */
michael@0 123
michael@0 124 /* This also defines WTF_CPU_BIG_ENDIAN or WTF_CPU_MIDDLE_ENDIAN or neither, as appropriate. */
michael@0 125
michael@0 126 /* WTF_CPU_ALPHA - DEC Alpha */
michael@0 127 #if defined(__alpha__)
michael@0 128 #define WTF_CPU_ALPHA 1
michael@0 129 #endif
michael@0 130
michael@0 131 /* WTF_CPU_IA64 - Itanium / IA-64 */
michael@0 132 #if defined(__ia64__)
michael@0 133 #define WTF_CPU_IA64 1
michael@0 134 /* 32-bit mode on Itanium */
michael@0 135 #if !defined(__LP64__)
michael@0 136 #define WTF_CPU_IA64_32 1
michael@0 137 #endif
michael@0 138 #endif
michael@0 139
michael@0 140 /* WTF_CPU_MIPS - MIPS 32-bit */
michael@0 141 /* Note: Only O32 ABI is tested, so we enable it for O32 ABI for now. */
michael@0 142 #if (defined(mips) || defined(__mips__) || defined(MIPS) || defined(_MIPS_)) \
michael@0 143 && defined(_ABIO32)
michael@0 144 #define WTF_CPU_MIPS 1
michael@0 145 #if defined(__MIPSEB__)
michael@0 146 #define WTF_CPU_BIG_ENDIAN 1
michael@0 147 #endif
michael@0 148 #define WTF_MIPS_PIC (defined __PIC__)
michael@0 149 #define WTF_MIPS_ARCH __mips
michael@0 150 #define WTF_MIPS_ISA(v) (defined WTF_MIPS_ARCH && WTF_MIPS_ARCH == v)
michael@0 151 #define WTF_MIPS_ISA_AT_LEAST(v) (defined WTF_MIPS_ARCH && WTF_MIPS_ARCH >= v)
michael@0 152 #define WTF_MIPS_ARCH_REV __mips_isa_rev
michael@0 153 #define WTF_MIPS_ISA_REV(v) (defined WTF_MIPS_ARCH_REV && WTF_MIPS_ARCH_REV == v)
michael@0 154 #define WTF_MIPS_DOUBLE_FLOAT (defined __mips_hard_float && !defined __mips_single_float)
michael@0 155 #define WTF_MIPS_FP64 (defined __mips_fpr && __mips_fpr == 64)
michael@0 156 /* MIPS requires allocators to use aligned memory */
michael@0 157 #define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER 1
michael@0 158 #endif /* MIPS */
michael@0 159
michael@0 160 /* WTF_CPU_PPC - PowerPC 32-bit */
michael@0 161 #if defined(__ppc__) \
michael@0 162 || defined(__PPC__) \
michael@0 163 || defined(__powerpc__) \
michael@0 164 || defined(__powerpc) \
michael@0 165 || defined(__POWERPC__) \
michael@0 166 || defined(_M_PPC) \
michael@0 167 || defined(__PPC)
michael@0 168 #if !defined(__ppc64__) && !defined(__PPC64__)
michael@0 169 #define WTF_CPU_PPC 1
michael@0 170 #endif
michael@0 171 #if !defined(__LITTLE_ENDIAN__)
michael@0 172 #define WTF_CPU_BIG_ENDIAN 1
michael@0 173 #endif
michael@0 174 #endif
michael@0 175
michael@0 176 /* WTF_CPU_PPC64 - PowerPC 64-bit */
michael@0 177 #if defined(__ppc64__) \
michael@0 178 || defined(__PPC64__)
michael@0 179 #define WTF_CPU_PPC64 1
michael@0 180 #if !defined(__LITTLE_ENDIAN__)
michael@0 181 #define WTF_CPU_BIG_ENDIAN 1
michael@0 182 #endif
michael@0 183 #endif
michael@0 184
michael@0 185 /* WTF_CPU_SH4 - SuperH SH-4 */
michael@0 186 #if defined(__SH4__)
michael@0 187 #define WTF_CPU_SH4 1
michael@0 188 #endif
michael@0 189
michael@0 190 /* WTF_CPU_SPARC32 - SPARC 32-bit */
michael@0 191 #if defined(__sparc) && !defined(__arch64__) || defined(__sparcv8)
michael@0 192 #define WTF_CPU_SPARC32 1
michael@0 193 #define WTF_CPU_BIG_ENDIAN 1
michael@0 194 #endif
michael@0 195
michael@0 196 /* WTF_CPU_SPARC64 - SPARC 64-bit */
michael@0 197 #if defined(__sparc__) && defined(__arch64__) || defined (__sparcv9)
michael@0 198 #define WTF_CPU_SPARC64 1
michael@0 199 #define WTF_CPU_BIG_ENDIAN 1
michael@0 200 #endif
michael@0 201
michael@0 202 /* WTF_CPU_SPARC - any SPARC, true for WTF_CPU_SPARC32 and WTF_CPU_SPARC64 */
michael@0 203 #if WTF_CPU_SPARC32 || WTF_CPU_SPARC64
michael@0 204 #define WTF_CPU_SPARC 1
michael@0 205 #endif
michael@0 206
michael@0 207 /* WTF_CPU_S390X - S390 64-bit */
michael@0 208 #if defined(__s390x__)
michael@0 209 #define WTF_CPU_S390X 1
michael@0 210 #define WTF_CPU_BIG_ENDIAN 1
michael@0 211 #endif
michael@0 212
michael@0 213 /* WTF_CPU_S390 - S390 32-bit */
michael@0 214 #if defined(__s390__)
michael@0 215 #define WTF_CPU_S390 1
michael@0 216 #define WTF_CPU_BIG_ENDIAN 1
michael@0 217 #endif
michael@0 218
michael@0 219 #if defined(__aarch64__)
michael@0 220 #define WTF_CPU_AARCH64 1
michael@0 221 #if defined(__AARCH64EB__)
michael@0 222 #define WTF_CPU_BIG_ENDIAN 1
michael@0 223 #endif
michael@0 224 #endif
michael@0 225
michael@0 226 /* WTF_CPU_X86 - i386 / x86 32-bit */
michael@0 227 #if defined(__i386__) \
michael@0 228 || defined(i386) \
michael@0 229 || defined(_M_IX86) \
michael@0 230 || defined(_X86_) \
michael@0 231 || defined(__THW_INTEL)
michael@0 232 #define WTF_CPU_X86 1
michael@0 233 #endif
michael@0 234
michael@0 235 /* WTF_CPU_X86_64 - AMD64 / Intel64 / x86_64 64-bit */
michael@0 236 #if defined(__x86_64__) \
michael@0 237 || defined(_M_X64)
michael@0 238 #define WTF_CPU_X86_64 1
michael@0 239 #endif
michael@0 240
michael@0 241 /* WTF_CPU_ARM - ARM, any version*/
michael@0 242 #if defined(arm) \
michael@0 243 || defined(__arm__) \
michael@0 244 || defined(ARM) \
michael@0 245 || defined(_ARM_)
michael@0 246 #define WTF_CPU_ARM 1
michael@0 247
michael@0 248 #if defined(__ARMEB__) || (WTF_COMPILER_RVCT && defined(__BIG_ENDIAN))
michael@0 249 #define WTF_CPU_BIG_ENDIAN 1
michael@0 250
michael@0 251 #elif !defined(__ARM_EABI__) \
michael@0 252 && !defined(__EABI__) \
michael@0 253 && !defined(__VFP_FP__) \
michael@0 254 && !defined(_WIN32_WCE) \
michael@0 255 && !defined(ANDROID)
michael@0 256 #define WTF_CPU_MIDDLE_ENDIAN 1
michael@0 257
michael@0 258 #endif
michael@0 259
michael@0 260 #define WTF_ARM_ARCH_AT_LEAST(N) (CPU(ARM) && WTF_ARM_ARCH_VERSION >= N)
michael@0 261 #define WTF_ARM_ARCH_AT_LEAST_5 (WTF_CPU_ARM && WTF_ARM_ARCH_VERSION >= 5)
michael@0 262
michael@0 263 /* Set WTF_ARM_ARCH_VERSION */
michael@0 264 #if defined(__ARM_ARCH_4__) \
michael@0 265 || defined(__ARM_ARCH_4T__) \
michael@0 266 || defined(__MARM_ARMV4__) \
michael@0 267 || defined(_ARMV4I_)
michael@0 268 #define WTF_ARM_ARCH_VERSION 4
michael@0 269
michael@0 270 #elif defined(__ARM_ARCH_5__) \
michael@0 271 || defined(__ARM_ARCH_5T__) \
michael@0 272 || defined(__MARM_ARMV5__)
michael@0 273 #define WTF_ARM_ARCH_VERSION 5
michael@0 274
michael@0 275 #elif defined(__ARM_ARCH_5E__) \
michael@0 276 || defined(__ARM_ARCH_5TE__) \
michael@0 277 || defined(__ARM_ARCH_5TEJ__)
michael@0 278 #define WTF_ARM_ARCH_VERSION 5
michael@0 279 /*ARMv5TE requires allocators to use aligned memory*/
michael@0 280 #define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER 1
michael@0 281
michael@0 282 #elif defined(__ARM_ARCH_6__) \
michael@0 283 || defined(__ARM_ARCH_6J__) \
michael@0 284 || defined(__ARM_ARCH_6K__) \
michael@0 285 || defined(__ARM_ARCH_6Z__) \
michael@0 286 || defined(__ARM_ARCH_6ZK__) \
michael@0 287 || defined(__ARM_ARCH_6T2__) \
michael@0 288 || defined(__ARMV6__)
michael@0 289 #define WTF_ARM_ARCH_VERSION 6
michael@0 290
michael@0 291 #elif defined(__ARM_ARCH_7A__) \
michael@0 292 || defined(__ARM_ARCH_7R__)
michael@0 293 #define WTF_ARM_ARCH_VERSION 7
michael@0 294
michael@0 295 /* RVCT sets _TARGET_ARCH_ARM */
michael@0 296 #elif defined(__TARGET_ARCH_ARM)
michael@0 297 #define WTF_ARM_ARCH_VERSION __TARGET_ARCH_ARM
michael@0 298
michael@0 299 #if defined(__TARGET_ARCH_5E) \
michael@0 300 || defined(__TARGET_ARCH_5TE) \
michael@0 301 || defined(__TARGET_ARCH_5TEJ)
michael@0 302 /*ARMv5TE requires allocators to use aligned memory*/
michael@0 303 #define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER 1
michael@0 304 #endif
michael@0 305
michael@0 306 #else
michael@0 307 #define WTF_ARM_ARCH_VERSION 0
michael@0 308
michael@0 309 #endif
michael@0 310
michael@0 311 /* Set WTF_THUMB_ARCH_VERSION */
michael@0 312 #if defined(__ARM_ARCH_4T__)
michael@0 313 #define WTF_THUMB_ARCH_VERSION 1
michael@0 314
michael@0 315 #elif defined(__ARM_ARCH_5T__) \
michael@0 316 || defined(__ARM_ARCH_5TE__) \
michael@0 317 || defined(__ARM_ARCH_5TEJ__)
michael@0 318 #define WTF_THUMB_ARCH_VERSION 2
michael@0 319
michael@0 320 #elif defined(__ARM_ARCH_6J__) \
michael@0 321 || defined(__ARM_ARCH_6K__) \
michael@0 322 || defined(__ARM_ARCH_6Z__) \
michael@0 323 || defined(__ARM_ARCH_6ZK__) \
michael@0 324 || defined(__ARM_ARCH_6M__)
michael@0 325 #define WTF_THUMB_ARCH_VERSION 3
michael@0 326
michael@0 327 #elif defined(__ARM_ARCH_6T2__) \
michael@0 328 || defined(__ARM_ARCH_7__) \
michael@0 329 || defined(__ARM_ARCH_7A__) \
michael@0 330 || defined(__ARM_ARCH_7R__) \
michael@0 331 || defined(__ARM_ARCH_7M__)
michael@0 332 #define WTF_THUMB_ARCH_VERSION 4
michael@0 333
michael@0 334 /* RVCT sets __TARGET_ARCH_THUMB */
michael@0 335 #elif defined(__TARGET_ARCH_THUMB)
michael@0 336 #define WTF_THUMB_ARCH_VERSION __TARGET_ARCH_THUMB
michael@0 337
michael@0 338 #else
michael@0 339 #define WTF_THUMB_ARCH_VERSION 0
michael@0 340 #endif
michael@0 341
michael@0 342
michael@0 343 /* WTF_CPU_ARMV5_OR_LOWER - ARM instruction set v5 or earlier */
michael@0 344 /* On ARMv5 and below the natural alignment is required.
michael@0 345 And there are some other differences for v5 or earlier. */
michael@0 346 #if !defined(ARMV5_OR_LOWER) && WTF_CPU_ARM && !(WTF_ARM_ARCH_VERSION >= 6)
michael@0 347 #define WTF_CPU_ARMV5_OR_LOWER 1
michael@0 348 #endif
michael@0 349
michael@0 350
michael@0 351 /* WTF_CPU_ARM_TRADITIONAL - Thumb2 is not available, only traditional ARM (v4 or greater) */
michael@0 352 /* WTF_CPU_ARM_THUMB2 - Thumb2 instruction set is available */
michael@0 353 /* Only one of these will be defined. */
michael@0 354 #if !defined(WTF_CPU_ARM_TRADITIONAL) && !defined(WTF_CPU_ARM_THUMB2)
michael@0 355 # if defined(thumb2) || defined(__thumb2__) \
michael@0 356 || ((defined(__thumb) || defined(__thumb__)) && WTF_THUMB_ARCH_VERSION == 4)
michael@0 357 # define WTF_CPU_ARM_TRADITIONAL 1
michael@0 358 # define WTF_CPU_ARM_THUMB2 0
michael@0 359 # elif WTF_CPU_ARM && WTF_ARM_ARCH_VERSION >= 4
michael@0 360 # define WTF_CPU_ARM_TRADITIONAL 1
michael@0 361 # define WTF_CPU_ARM_THUMB2 0
michael@0 362 # else
michael@0 363 # error "Not supported ARM architecture"
michael@0 364 # endif
michael@0 365 #elif WTF_CPU_ARM_TRADITIONAL && WTF_CPU_ARM_THUMB2 /* Sanity Check */
michael@0 366 # error "Cannot use both of WTF_CPU_ARM_TRADITIONAL and WTF_CPU_ARM_THUMB2 platforms"
michael@0 367 #endif /* !defined(WTF_CPU_ARM_TRADITIONAL) && !defined(WTF_CPU_ARM_THUMB2) */
michael@0 368
michael@0 369 #if defined(__ARM_NEON__) && !defined(WTF_CPU_ARM_NEON)
michael@0 370 #define WTF_CPU_ARM_NEON 1
michael@0 371 #endif
michael@0 372
michael@0 373 #endif /* ARM */
michael@0 374
michael@0 375 #if defined(JS_ARM_SIMULATOR)
michael@0 376 # undef WTF_CPU_X86
michael@0 377 # undef WTF_CPU_X64
michael@0 378 # define WTF_CPU_ARM_TRADITIONAL 1
michael@0 379 # define WTF_CPU_ARM 1
michael@0 380 #endif
michael@0 381
michael@0 382 #if WTF_CPU_ARM || WTF_CPU_MIPS
michael@0 383 #define WTF_CPU_NEEDS_ALIGNED_ACCESS 1
michael@0 384 #endif
michael@0 385
michael@0 386 /* ==== OS() - underlying operating system; only to be used for mandated low-level services like
michael@0 387 virtual memory, not to choose a GUI toolkit ==== */
michael@0 388
michael@0 389 /* WTF_OS_ANDROID - Android */
michael@0 390 #ifdef ANDROID
michael@0 391 #define WTF_OS_ANDROID 1
michael@0 392 #endif
michael@0 393
michael@0 394 /* WTF_OS_AIX - AIX */
michael@0 395 #ifdef _AIX
michael@0 396 #define WTF_OS_AIX 1
michael@0 397 #endif
michael@0 398
michael@0 399 /* WTF_OS_DARWIN - Any Darwin-based OS, including Mac OS X and iPhone OS */
michael@0 400 #ifdef __APPLE__
michael@0 401 #define WTF_OS_DARWIN 1
michael@0 402
michael@0 403 /* FIXME: BUILDING_ON_.., and TARGETING... macros should be folded into the OS() system */
michael@0 404 #include <AvailabilityMacros.h>
michael@0 405 #if !defined(MAC_OS_X_VERSION_10_5) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
michael@0 406 #define BUILDING_ON_TIGER 1
michael@0 407 #elif !defined(MAC_OS_X_VERSION_10_6) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
michael@0 408 #define BUILDING_ON_LEOPARD 1
michael@0 409 #elif !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
michael@0 410 #define BUILDING_ON_SNOW_LEOPARD 1
michael@0 411 #endif
michael@0 412 #if !defined(MAC_OS_X_VERSION_10_5) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
michael@0 413 #define TARGETING_TIGER 1
michael@0 414 #elif !defined(MAC_OS_X_VERSION_10_6) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6
michael@0 415 #define TARGETING_LEOPARD 1
michael@0 416 #elif !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7
michael@0 417 #define TARGETING_SNOW_LEOPARD 1
michael@0 418 #endif
michael@0 419 #include <TargetConditionals.h>
michael@0 420
michael@0 421 #endif
michael@0 422
michael@0 423 /* WTF_OS_IOS - iOS */
michael@0 424 /* WTF_OS_MAC_OS_X - Mac OS X (not including iOS) */
michael@0 425 #if WTF_OS_DARWIN && ((defined(TARGET_OS_EMBEDDED) && TARGET_OS_EMBEDDED) \
michael@0 426 || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) \
michael@0 427 || (defined(TARGET_IPHONE_SIMULATOR) && TARGET_IPHONE_SIMULATOR))
michael@0 428 #define WTF_OS_IOS 1
michael@0 429 #elif WTF_OS_DARWIN && defined(TARGET_OS_MAC) && TARGET_OS_MAC
michael@0 430 #define WTF_OS_MAC_OS_X 1
michael@0 431 #endif
michael@0 432
michael@0 433
michael@0 434 /* WTF_OS_FREEBSD - FreeBSD */
michael@0 435 #if defined(__FreeBSD__) || defined(__DragonFly__)
michael@0 436 #define WTF_OS_FREEBSD 1
michael@0 437 #endif
michael@0 438
michael@0 439 /* WTF_OS_HAIKU - Haiku */
michael@0 440 #ifdef __HAIKU__
michael@0 441 #define WTF_OS_HAIKU 1
michael@0 442 #endif
michael@0 443
michael@0 444 /* WTF_OS_LINUX - Linux */
michael@0 445 #if defined(__linux__) && !defined(ANDROID)
michael@0 446 #define WTF_OS_LINUX 1
michael@0 447 #endif
michael@0 448
michael@0 449 /* WTF_OS_NETBSD - NetBSD */
michael@0 450 #if defined(__NetBSD__)
michael@0 451 #define WTF_OS_NETBSD 1
michael@0 452 #endif
michael@0 453
michael@0 454 /* WTF_OS_OPENBSD - OpenBSD */
michael@0 455 #ifdef __OpenBSD__
michael@0 456 #define WTF_OS_OPENBSD 1
michael@0 457 #endif
michael@0 458
michael@0 459 /* WTF_OS_QNX - QNX */
michael@0 460 #if defined(__QNXNTO__)
michael@0 461 #define WTF_OS_QNX 1
michael@0 462 #endif
michael@0 463
michael@0 464 /* WTF_OS_SOLARIS - Solaris */
michael@0 465 #if defined(sun) || defined(__sun)
michael@0 466 #define WTF_OS_SOLARIS 1
michael@0 467 #endif
michael@0 468
michael@0 469 /* WTF_OS_WINCE - Windows CE; note that for this platform WTF_OS_WINDOWS is also defined */
michael@0 470 #if defined(_WIN32_WCE)
michael@0 471 #define WTF_OS_WINCE 1
michael@0 472 #endif
michael@0 473
michael@0 474 /* WTF_OS_WINDOWS - Any version of Windows */
michael@0 475 #if defined(WIN32) || defined(_WIN32)
michael@0 476 #define WTF_OS_WINDOWS 1
michael@0 477 #endif
michael@0 478
michael@0 479 /* WTF_OS_SYMBIAN - Symbian */
michael@0 480 #if defined (__SYMBIAN32__)
michael@0 481 #define WTF_OS_SYMBIAN 1
michael@0 482 #endif
michael@0 483
michael@0 484 /* WTF_OS_UNIX - Any Unix-like system */
michael@0 485 #if WTF_OS_AIX \
michael@0 486 || WTF_OS_ANDROID \
michael@0 487 || WTF_OS_DARWIN \
michael@0 488 || WTF_OS_FREEBSD \
michael@0 489 || WTF_OS_HAIKU \
michael@0 490 || WTF_OS_LINUX \
michael@0 491 || WTF_OS_NETBSD \
michael@0 492 || WTF_OS_OPENBSD \
michael@0 493 || WTF_OS_QNX \
michael@0 494 || WTF_OS_SOLARIS \
michael@0 495 || WTF_OS_SYMBIAN \
michael@0 496 || defined(unix) \
michael@0 497 || defined(__unix) \
michael@0 498 || defined(__unix__)
michael@0 499 #define WTF_OS_UNIX 1
michael@0 500 #endif
michael@0 501
michael@0 502 /* WTF_OS_OS2 - OS/2 */
michael@0 503 #if defined (__OS2__)
michael@0 504 #define WTF_OS_OS2 1
michael@0 505 #endif
michael@0 506
michael@0 507 /* Operating environments */
michael@0 508
michael@0 509 /* FIXME: these are all mixes of OS, operating environment and policy choices. */
michael@0 510 /* WTF_PLATFORM_CHROMIUM */
michael@0 511 /* WTF_PLATFORM_QT */
michael@0 512 /* WTF_PLATFORM_WX */
michael@0 513 /* WTF_PLATFORM_GTK */
michael@0 514 /* WTF_PLATFORM_HAIKU */
michael@0 515 /* WTF_PLATFORM_MAC */
michael@0 516 /* WTF_PLATFORM_WIN */
michael@0 517 #if defined(BUILDING_CHROMIUM__)
michael@0 518 #define WTF_PLATFORM_CHROMIUM 1
michael@0 519 #elif defined(BUILDING_QT__)
michael@0 520 #define WTF_PLATFORM_QT 1
michael@0 521 #elif defined(BUILDING_WX__)
michael@0 522 #define WTF_PLATFORM_WX 1
michael@0 523 #elif defined(BUILDING_GTK__)
michael@0 524 #define WTF_PLATFORM_GTK 1
michael@0 525 #elif defined(BUILDING_HAIKU__)
michael@0 526 #define WTF_PLATFORM_HAIKU 1
michael@0 527 #elif defined(BUILDING_BREWMP__)
michael@0 528 #define WTF_PLATFORM_BREWMP 1
michael@0 529 #if defined(AEE_SIMULATOR)
michael@0 530 #define WTF_PLATFORM_BREWMP_SIMULATOR 1
michael@0 531 #else
michael@0 532 #define WTF_PLATFORM_BREWMP_SIMULATOR 0
michael@0 533 #endif
michael@0 534 #undef WTF_OS_WINDOWS
michael@0 535 #undef WTF_PLATFORM_WIN
michael@0 536 #elif WTF_OS_DARWIN
michael@0 537 #define WTF_PLATFORM_MAC 1
michael@0 538 #elif WTF_OS_WINDOWS
michael@0 539 #define WTF_PLATFORM_WIN 1
michael@0 540 #endif
michael@0 541
michael@0 542 /* WTF_PLATFORM_IOS */
michael@0 543 /* FIXME: this is sometimes used as an OS switch and sometimes for higher-level things */
michael@0 544 #if (defined(TARGET_OS_EMBEDDED) && TARGET_OS_EMBEDDED) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)
michael@0 545 #define WTF_PLATFORM_IOS 1
michael@0 546 #endif
michael@0 547
michael@0 548 /* WTF_PLATFORM_IOS_SIMULATOR */
michael@0 549 #if defined(TARGET_IPHONE_SIMULATOR) && TARGET_IPHONE_SIMULATOR
michael@0 550 #define WTF_PLATFORM_IOS 1
michael@0 551 #define WTF_PLATFORM_IOS_SIMULATOR 1
michael@0 552 #else
michael@0 553 #define WTF_PLATFORM_IOS_SIMULATOR 0
michael@0 554 #endif
michael@0 555
michael@0 556 #if !defined(WTF_PLATFORM_IOS)
michael@0 557 #define WTF_PLATFORM_IOS 0
michael@0 558 #endif
michael@0 559
michael@0 560 /* WTF_PLATFORM_ANDROID */
michael@0 561 /* FIXME: this is sometimes used as an OS() switch, and other times to drive
michael@0 562 policy choices */
michael@0 563 #if defined(ANDROID)
michael@0 564 #define WTF_PLATFORM_ANDROID 1
michael@0 565 #endif
michael@0 566
michael@0 567 /* Graphics engines */
michael@0 568
michael@0 569 /* WTF_USE_CG and WTF_PLATFORM_CI */
michael@0 570 #if WTF_PLATFORM_MAC || WTF_PLATFORM_IOS
michael@0 571 #define WTF_USE_CG 1
michael@0 572 #endif
michael@0 573 #if WTF_PLATFORM_MAC || WTF_PLATFORM_IOS || (WTF_PLATFORM_WIN && WTF_USE_CG)
michael@0 574 #define WTF_USE_CA 1
michael@0 575 #endif
michael@0 576
michael@0 577 /* WTF_USE_SKIA for Win/Linux, CG for Mac */
michael@0 578 #if WTF_PLATFORM_CHROMIUM
michael@0 579 #if WTF_OS_DARWIN
michael@0 580 #define WTF_USE_CG 1
michael@0 581 #define WTF_USE_ATSUI 1
michael@0 582 #define WTF_USE_CORE_TEXT 1
michael@0 583 #define WTF_USE_ICCJPEG 1
michael@0 584 #else
michael@0 585 #define WTF_USE_SKIA 1
michael@0 586 #define WTF_USE_CHROMIUM_NET 1
michael@0 587 #endif
michael@0 588 #endif
michael@0 589
michael@0 590 #if WTF_PLATFORM_BREWMP
michael@0 591 #define WTF_USE_SKIA 1
michael@0 592 #endif
michael@0 593
michael@0 594 #if WTF_PLATFORM_GTK
michael@0 595 #define WTF_USE_CAIRO 1
michael@0 596 #endif
michael@0 597
michael@0 598
michael@0 599 #if WTF_OS_WINCE
michael@0 600 #include <ce_time.h>
michael@0 601 #define WTF_USE_MERSENNE_TWISTER_19937 1
michael@0 602 #endif
michael@0 603
michael@0 604 #if WTF_PLATFORM_QT && WTF_OS_UNIX && !WTF_OS_SYMBIAN && !WTF_OS_DARWIN
michael@0 605 #define WTF_USE_PTHREAD_BASED_QT 1
michael@0 606 #endif
michael@0 607
michael@0 608 #if (WTF_PLATFORM_GTK || WTF_PLATFORM_IOS || WTF_PLATFORM_MAC || WTF_PLATFORM_WIN || (WTF_PLATFORM_QT && (WTF_OS_DARWIN || WTF_USE_PTHREAD_BASED_QT) && !ENABLE_SINGLE_THREADED)) && !defined(ENABLE_JSC_MULTIPLE_THREADS)
michael@0 609 #define ENABLE_JSC_MULTIPLE_THREADS 1
michael@0 610 #endif
michael@0 611
michael@0 612 #if ENABLE_JSC_MULTIPLE_THREADS
michael@0 613 #define ENABLE_WTF_MULTIPLE_THREADS 1
michael@0 614 #endif
michael@0 615
michael@0 616 /* On Windows, use QueryPerformanceCounter by default */
michael@0 617 #if WTF_OS_WINDOWS
michael@0 618 #define WTF_USE_QUERY_PERFORMANCE_COUNTER 1
michael@0 619 #endif
michael@0 620
michael@0 621 #if WTF_OS_WINCE && !WTF_PLATFORM_QT
michael@0 622 #define NOMINMAX /* Windows min and max conflict with standard macros */
michael@0 623 #define NOSHLWAPI /* shlwapi.h not available on WinCe */
michael@0 624
michael@0 625 /* MSDN documentation says these functions are provided with uspce.lib. But we cannot find this file. */
michael@0 626 #define __usp10__ /* disable "usp10.h" */
michael@0 627
michael@0 628 #define _INC_ASSERT /* disable "assert.h" */
michael@0 629 #define assert(x)
michael@0 630
michael@0 631 #endif /* WTF_OS_WINCE && !WTF_PLATFORM_QT */
michael@0 632
michael@0 633 #if WTF_PLATFORM_QT
michael@0 634 #define WTF_USE_QT4_UNICODE 1
michael@0 635 #elif WTF_OS_WINCE
michael@0 636 #define WTF_USE_WINCE_UNICODE 1
michael@0 637 #elif WTF_PLATFORM_BREWMP
michael@0 638 #define WTF_USE_BREWMP_UNICODE 1
michael@0 639 #elif WTF_PLATFORM_GTK
michael@0 640 /* The GTK+ Unicode backend is configurable */
michael@0 641 #else
michael@0 642 #define WTF_USE_ICU_UNICODE 1
michael@0 643 #endif
michael@0 644
michael@0 645 #if WTF_PLATFORM_MAC && !WTF_PLATFORM_IOS
michael@0 646 #if !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_TIGER) && WTF_CPU_X86_64
michael@0 647 #define WTF_USE_PLUGIN_HOST_PROCESS 1
michael@0 648 #endif
michael@0 649 #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
michael@0 650 #define ENABLE_GESTURE_EVENTS 1
michael@0 651 #define ENABLE_RUBBER_BANDING 1
michael@0 652 #define WTF_USE_WK_SCROLLBAR_PAINTER 1
michael@0 653 #endif
michael@0 654 #if !defined(ENABLE_JAVA_BRIDGE)
michael@0 655 #define ENABLE_JAVA_BRIDGE 1
michael@0 656 #endif
michael@0 657 #if !defined(ENABLE_DASHBOARD_SUPPORT)
michael@0 658 #define ENABLE_DASHBOARD_SUPPORT 1
michael@0 659 #endif
michael@0 660 #define WTF_USE_CF 1
michael@0 661 #define WTF_USE_PTHREADS 1
michael@0 662 #define HAVE_PTHREAD_RWLOCK 1
michael@0 663 #define HAVE_READLINE 1
michael@0 664 #define HAVE_RUNLOOP_TIMER 1
michael@0 665 #define ENABLE_FULLSCREEN_API 1
michael@0 666 #define ENABLE_SMOOTH_SCROLLING 1
michael@0 667 #define ENABLE_WEB_ARCHIVE 1
michael@0 668 #endif /* WTF_PLATFORM_MAC && !WTF_PLATFORM_IOS */
michael@0 669
michael@0 670 #if WTF_PLATFORM_CHROMIUM && WTF_OS_DARWIN
michael@0 671 #define WTF_USE_CF 1
michael@0 672 #define WTF_USE_PTHREADS 1
michael@0 673 #define HAVE_PTHREAD_RWLOCK 1
michael@0 674 #endif
michael@0 675
michael@0 676 #if WTF_PLATFORM_BREWMP
michael@0 677 #define ENABLE_SINGLE_THREADED 1
michael@0 678 #endif
michael@0 679
michael@0 680 #if WTF_PLATFORM_QT && WTF_OS_DARWIN
michael@0 681 #define WTF_USE_CF 1
michael@0 682 #endif
michael@0 683
michael@0 684 #if WTF_OS_DARWIN && !defined(BUILDING_ON_TIGER) && !WTF_PLATFORM_GTK && !WTF_PLATFORM_QT
michael@0 685 #define ENABLE_PURGEABLE_MEMORY 1
michael@0 686 #endif
michael@0 687
michael@0 688 #if WTF_PLATFORM_IOS
michael@0 689 #define ENABLE_CONTEXT_MENUS 0
michael@0 690 #define ENABLE_DRAG_SUPPORT 0
michael@0 691 #define ENABLE_DATA_TRANSFER_ITEMS 0
michael@0 692 #define ENABLE_FTPDIR 1
michael@0 693 #define ENABLE_GEOLOCATION 1
michael@0 694 #define ENABLE_ICONDATABASE 0
michael@0 695 #define ENABLE_INSPECTOR 0
michael@0 696 #define ENABLE_JAVA_BRIDGE 0
michael@0 697 #define ENABLE_NETSCAPE_PLUGIN_API 0
michael@0 698 #define ENABLE_ORIENTATION_EVENTS 1
michael@0 699 #define ENABLE_REPAINT_THROTTLING 1
michael@0 700 #define HAVE_READLINE 1
michael@0 701 #define WTF_USE_CF 1
michael@0 702 #define WTF_USE_PTHREADS 1
michael@0 703 #define HAVE_PTHREAD_RWLOCK 1
michael@0 704 #define ENABLE_WEB_ARCHIVE 1
michael@0 705 #endif
michael@0 706
michael@0 707 #if WTF_PLATFORM_ANDROID
michael@0 708 #define WTF_USE_PTHREADS 1
michael@0 709 #define USE_SYSTEM_MALLOC 1
michael@0 710 #define ENABLE_JAVA_BRIDGE 1
michael@0 711 #define LOG_DISABLED 1
michael@0 712 /* Prevents Webkit from drawing the caret in textfields and textareas
michael@0 713 This prevents unnecessary invals. */
michael@0 714 #define ENABLE_TEXT_CARET 1
michael@0 715 #define ENABLE_JAVASCRIPT_DEBUGGER 0
michael@0 716 #endif
michael@0 717
michael@0 718 #if WTF_PLATFORM_WIN && !WTF_OS_WINCE
michael@0 719 #define WTF_USE_CF 1
michael@0 720 #define WTF_USE_PTHREADS 0
michael@0 721 #endif
michael@0 722
michael@0 723 #if WTF_PLATFORM_WIN && !WTF_OS_WINCE && !WTF_PLATFORM_CHROMIUM && !defined(WIN_CAIRO)
michael@0 724 #define WTF_USE_CFNETWORK 1
michael@0 725 #endif
michael@0 726
michael@0 727 #if WTF_USE_CFNETWORK || WTF_PLATFORM_MAC
michael@0 728 #define WTF_USE_CFURLCACHE 1
michael@0 729 #define WTF_USE_CFURLSTORAGESESSIONS 1
michael@0 730 #endif
michael@0 731
michael@0 732 #if WTF_PLATFORM_WIN && !WTF_OS_WINCE && !WTF_PLATFORM_CHROMIUM && !WTF_PLATFORM_QT
michael@0 733 #define ENABLE_WEB_ARCHIVE 1
michael@0 734 #endif
michael@0 735
michael@0 736 #if WTF_PLATFORM_WX
michael@0 737 #define ENABLE_ASSEMBLER 1
michael@0 738 #define ENABLE_GLOBAL_FASTMALLOC_NEW 0
michael@0 739 #if WTF_OS_DARWIN
michael@0 740 #define WTF_USE_CF 1
michael@0 741 #ifndef BUILDING_ON_TIGER
michael@0 742 #define WTF_USE_CORE_TEXT 1
michael@0 743 #define ENABLE_WEB_ARCHIVE 1
michael@0 744 #else
michael@0 745 #define WTF_USE_ATSUI 1
michael@0 746 #endif
michael@0 747 #endif
michael@0 748 #endif
michael@0 749
michael@0 750 #if WTF_PLATFORM_GTK
michael@0 751 #if HAVE_PTHREAD_H
michael@0 752 #define WTF_USE_PTHREADS 1
michael@0 753 #define HAVE_PTHREAD_RWLOCK 1
michael@0 754 #endif
michael@0 755 #endif
michael@0 756
michael@0 757 #if WTF_PLATFORM_HAIKU
michael@0 758 #define HAVE_POSIX_MEMALIGN 1
michael@0 759 #define WTF_USE_CURL 1
michael@0 760 #define WTF_USE_PTHREADS 1
michael@0 761 #define HAVE_PTHREAD_RWLOCK 1
michael@0 762 #define USE_SYSTEM_MALLOC 1
michael@0 763 #define ENABLE_NETSCAPE_PLUGIN_API 0
michael@0 764 #endif
michael@0 765
michael@0 766 #if WTF_PLATFORM_BREWMP
michael@0 767 #define USE_SYSTEM_MALLOC 1
michael@0 768 #endif
michael@0 769
michael@0 770 #if WTF_PLATFORM_BREWMP_SIMULATOR
michael@0 771 #define ENABLE_JIT 0
michael@0 772 #endif
michael@0 773
michael@0 774 #if !defined(HAVE_ACCESSIBILITY)
michael@0 775 #if WTF_PLATFORM_IOS || WTF_PLATFORM_MAC || WTF_PLATFORM_WIN || WTF_PLATFORM_GTK || WTF_PLATFORM_CHROMIUM
michael@0 776 #define HAVE_ACCESSIBILITY 1
michael@0 777 #endif
michael@0 778 #endif /* !defined(HAVE_ACCESSIBILITY) */
michael@0 779
michael@0 780 #if WTF_OS_UNIX && !WTF_OS_SYMBIAN
michael@0 781 #define HAVE_SIGNAL_H 1
michael@0 782 #endif
michael@0 783
michael@0 784 #if !defined(HAVE_STRNSTR)
michael@0 785 #if WTF_OS_DARWIN || WTF_OS_FREEBSD
michael@0 786 #define HAVE_STRNSTR 1
michael@0 787 #endif
michael@0 788 #endif
michael@0 789
michael@0 790 #if !WTF_OS_WINDOWS && !WTF_OS_SOLARIS && !WTF_OS_QNX \
michael@0 791 && !WTF_OS_SYMBIAN && !WTF_OS_HAIKU && !WTF_OS_RVCT \
michael@0 792 && !WTF_OS_ANDROID && !WTF_PLATFORM_BREWMP
michael@0 793 #define HAVE_TM_GMTOFF 1
michael@0 794 #define HAVE_TM_ZONE 1
michael@0 795 #define HAVE_TIMEGM 1
michael@0 796 #endif
michael@0 797
michael@0 798 #if WTF_OS_DARWIN
michael@0 799
michael@0 800 #define HAVE_ERRNO_H 1
michael@0 801 #define HAVE_LANGINFO_H 1
michael@0 802 #define HAVE_MMAP 1
michael@0 803 #define HAVE_MERGESORT 1
michael@0 804 #define HAVE_SBRK 1
michael@0 805 #define HAVE_STRINGS_H 1
michael@0 806 #define HAVE_SYS_PARAM_H 1
michael@0 807 #define HAVE_SYS_TIME_H 1
michael@0 808 #define HAVE_SYS_TIMEB_H 1
michael@0 809 #define WTF_USE_ACCELERATE 1
michael@0 810
michael@0 811 #if !defined(TARGETING_TIGER) && !defined(TARGETING_LEOPARD)
michael@0 812
michael@0 813 #define HAVE_DISPATCH_H 1
michael@0 814 #define HAVE_HOSTED_CORE_ANIMATION 1
michael@0 815
michael@0 816 #if !WTF_PLATFORM_IOS
michael@0 817 #define HAVE_MADV_FREE_REUSE 1
michael@0 818 #define HAVE_MADV_FREE 1
michael@0 819 #define HAVE_PTHREAD_SETNAME_NP 1
michael@0 820 #endif
michael@0 821
michael@0 822 #endif
michael@0 823
michael@0 824 #if WTF_PLATFORM_IOS
michael@0 825 #define HAVE_MADV_FREE 1
michael@0 826 #endif
michael@0 827
michael@0 828 #elif WTF_OS_WINDOWS
michael@0 829
michael@0 830 #if WTF_OS_WINCE
michael@0 831 #define HAVE_ERRNO_H 0
michael@0 832 #else
michael@0 833 #define HAVE_SYS_TIMEB_H 1
michael@0 834 #define HAVE_ALIGNED_MALLOC 1
michael@0 835 #define HAVE_ISDEBUGGERPRESENT 1
michael@0 836 #endif
michael@0 837 #define HAVE_VIRTUALALLOC 1
michael@0 838
michael@0 839 #elif WTF_OS_SYMBIAN
michael@0 840
michael@0 841 #define HAVE_ERRNO_H 1
michael@0 842 #define HAVE_MMAP 0
michael@0 843 #define HAVE_SBRK 1
michael@0 844
michael@0 845 #define HAVE_SYS_TIME_H 1
michael@0 846 #define HAVE_STRINGS_H 1
michael@0 847
michael@0 848 #if !WTF_COMPILER_RVCT
michael@0 849 #define HAVE_SYS_PARAM_H 1
michael@0 850 #endif
michael@0 851
michael@0 852 #elif WTF_PLATFORM_BREWMP
michael@0 853
michael@0 854 #define HAVE_ERRNO_H 1
michael@0 855
michael@0 856 #elif WTF_OS_QNX
michael@0 857
michael@0 858 #define HAVE_ERRNO_H 1
michael@0 859 #define HAVE_MMAP 1
michael@0 860 #define HAVE_SBRK 1
michael@0 861 #define HAVE_STRINGS_H 1
michael@0 862 #define HAVE_SYS_PARAM_H 1
michael@0 863 #define HAVE_SYS_TIME_H 1
michael@0 864
michael@0 865 #elif WTF_OS_ANDROID
michael@0 866
michael@0 867 #define HAVE_ERRNO_H 1
michael@0 868 #define HAVE_LANGINFO_H 0
michael@0 869 #define HAVE_MMAP 1
michael@0 870 #define HAVE_SBRK 1
michael@0 871 #define HAVE_STRINGS_H 1
michael@0 872 #define HAVE_SYS_PARAM_H 1
michael@0 873 #define HAVE_SYS_TIME_H 1
michael@0 874
michael@0 875 #elif WTF_OS_OS2
michael@0 876
michael@0 877 #define USE_SYSTEM_MALLOC 1
michael@0 878 #define HAVE_ERRNO_H 1
michael@0 879 #define HAVE_LANGINFO_H 1
michael@0 880 #define HAVE_MMAP 0
michael@0 881 #define HAVE_POSIX_MEMALIGN 1
michael@0 882 #define HAVE_SBRK 1
michael@0 883 #define HAVE_SYS_PARAM_H 1
michael@0 884 #define HAVE_SYS_TIME_H 1
michael@0 885 #define HAVE_STRINGS_H 1
michael@0 886
michael@0 887 #else
michael@0 888
michael@0 889 /* FIXME: is this actually used or do other platforms generate their own config.h? */
michael@0 890
michael@0 891 #define HAVE_ERRNO_H 1
michael@0 892 /* As long as Haiku doesn't have a complete support of locale this will be disabled. */
michael@0 893 #if !WTF_OS_HAIKU
michael@0 894 #define HAVE_LANGINFO_H 1
michael@0 895 #endif
michael@0 896 #define HAVE_MMAP 1
michael@0 897 #define HAVE_SBRK 1
michael@0 898 #define HAVE_STRINGS_H 1
michael@0 899 #define HAVE_SYS_PARAM_H 1
michael@0 900 #define HAVE_SYS_TIME_H 1
michael@0 901
michael@0 902 #endif
michael@0 903
michael@0 904 /* ENABLE macro defaults */
michael@0 905
michael@0 906 #if WTF_PLATFORM_QT
michael@0 907 /* We must not customize the global operator new and delete for the Qt port. */
michael@0 908 #define ENABLE_GLOBAL_FASTMALLOC_NEW 0
michael@0 909 #if !WTF_OS_UNIX || WTF_OS_SYMBIAN
michael@0 910 #define USE_SYSTEM_MALLOC 1
michael@0 911 #endif
michael@0 912 #endif
michael@0 913
michael@0 914 /* fastMalloc match validation allows for runtime verification that
michael@0 915 new is matched by delete, fastMalloc is matched by fastFree, etc. */
michael@0 916 #if !defined(ENABLE_FAST_MALLOC_MATCH_VALIDATION)
michael@0 917 #define ENABLE_FAST_MALLOC_MATCH_VALIDATION 0
michael@0 918 #endif
michael@0 919
michael@0 920 #if !defined(ENABLE_ICONDATABASE)
michael@0 921 #define ENABLE_ICONDATABASE 1
michael@0 922 #endif
michael@0 923
michael@0 924 #if !defined(ENABLE_DATABASE)
michael@0 925 #define ENABLE_DATABASE 1
michael@0 926 #endif
michael@0 927
michael@0 928 #if !defined(ENABLE_JAVASCRIPT_DEBUGGER)
michael@0 929 #define ENABLE_JAVASCRIPT_DEBUGGER 1
michael@0 930 #endif
michael@0 931
michael@0 932 #if !defined(ENABLE_FTPDIR)
michael@0 933 #define ENABLE_FTPDIR 1
michael@0 934 #endif
michael@0 935
michael@0 936 #if !defined(ENABLE_CONTEXT_MENUS)
michael@0 937 #define ENABLE_CONTEXT_MENUS 1
michael@0 938 #endif
michael@0 939
michael@0 940 #if !defined(ENABLE_DRAG_SUPPORT)
michael@0 941 #define ENABLE_DRAG_SUPPORT 1
michael@0 942 #endif
michael@0 943
michael@0 944 #if !defined(ENABLE_DATA_TRANSFER_ITEMS)
michael@0 945 #define ENABLE_DATA_TRANSFER_ITEMS 0
michael@0 946 #endif
michael@0 947
michael@0 948 #if !defined(ENABLE_DASHBOARD_SUPPORT)
michael@0 949 #define ENABLE_DASHBOARD_SUPPORT 0
michael@0 950 #endif
michael@0 951
michael@0 952 #if !defined(ENABLE_INSPECTOR)
michael@0 953 #define ENABLE_INSPECTOR 1
michael@0 954 #endif
michael@0 955
michael@0 956 #if !defined(ENABLE_JAVA_BRIDGE)
michael@0 957 #define ENABLE_JAVA_BRIDGE 0
michael@0 958 #endif
michael@0 959
michael@0 960 #if !defined(ENABLE_NETSCAPE_PLUGIN_API)
michael@0 961 #define ENABLE_NETSCAPE_PLUGIN_API 1
michael@0 962 #endif
michael@0 963
michael@0 964 #if !defined(ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE)
michael@0 965 #define ENABLE_NETSCAPE_PLUGIN_METADATA_CACHE 0
michael@0 966 #endif
michael@0 967
michael@0 968 #if !defined(ENABLE_PURGEABLE_MEMORY)
michael@0 969 #define ENABLE_PURGEABLE_MEMORY 0
michael@0 970 #endif
michael@0 971
michael@0 972 #if !defined(WTF_USE_PLUGIN_HOST_PROCESS)
michael@0 973 #define WTF_USE_PLUGIN_HOST_PROCESS 0
michael@0 974 #endif
michael@0 975
michael@0 976 #if !defined(ENABLE_ORIENTATION_EVENTS)
michael@0 977 #define ENABLE_ORIENTATION_EVENTS 0
michael@0 978 #endif
michael@0 979
michael@0 980 #if !defined(ENABLE_OPCODE_STATS)
michael@0 981 #define ENABLE_OPCODE_STATS 0
michael@0 982 #endif
michael@0 983
michael@0 984 #if !defined(ENABLE_GLOBAL_FASTMALLOC_NEW)
michael@0 985 #define ENABLE_GLOBAL_FASTMALLOC_NEW 1
michael@0 986 #endif
michael@0 987
michael@0 988 #define ENABLE_DEBUG_WITH_BREAKPOINT 0
michael@0 989 #define ENABLE_SAMPLING_COUNTERS 0
michael@0 990 #define ENABLE_SAMPLING_FLAGS 0
michael@0 991 #define ENABLE_OPCODE_SAMPLING 0
michael@0 992 #define ENABLE_CODEBLOCK_SAMPLING 0
michael@0 993 #if ENABLE_CODEBLOCK_SAMPLING && !ENABLE_OPCODE_SAMPLING
michael@0 994 #error "CODEBLOCK_SAMPLING requires OPCODE_SAMPLING"
michael@0 995 #endif
michael@0 996 #if ENABLE_OPCODE_SAMPLING || ENABLE_SAMPLING_FLAGS
michael@0 997 #define ENABLE_SAMPLING_THREAD 1
michael@0 998 #endif
michael@0 999
michael@0 1000 #if !defined(ENABLE_GEOLOCATION)
michael@0 1001 #define ENABLE_GEOLOCATION 0
michael@0 1002 #endif
michael@0 1003
michael@0 1004 #if !defined(ENABLE_GESTURE_RECOGNIZER)
michael@0 1005 #define ENABLE_GESTURE_RECOGNIZER 0
michael@0 1006 #endif
michael@0 1007
michael@0 1008 #if !defined(ENABLE_NOTIFICATIONS)
michael@0 1009 #define ENABLE_NOTIFICATIONS 0
michael@0 1010 #endif
michael@0 1011
michael@0 1012 #if WTF_PLATFORM_IOS
michael@0 1013 #define ENABLE_TEXT_CARET 0
michael@0 1014 #endif
michael@0 1015
michael@0 1016 #if !defined(ENABLE_TEXT_CARET)
michael@0 1017 #define ENABLE_TEXT_CARET 1
michael@0 1018 #endif
michael@0 1019
michael@0 1020 #if !defined(ENABLE_ON_FIRST_TEXTAREA_FOCUS_SELECT_ALL)
michael@0 1021 #define ENABLE_ON_FIRST_TEXTAREA_FOCUS_SELECT_ALL 0
michael@0 1022 #endif
michael@0 1023
michael@0 1024 #if !defined(ENABLE_FULLSCREEN_API)
michael@0 1025 #define ENABLE_FULLSCREEN_API 0
michael@0 1026 #endif
michael@0 1027
michael@0 1028 #if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32_64)
michael@0 1029 #if (WTF_CPU_X86_64 && (WTF_OS_UNIX || WTF_OS_WINDOWS)) \
michael@0 1030 || (WTF_CPU_IA64 && !WTF_CPU_IA64_32) \
michael@0 1031 || WTF_CPU_ALPHA \
michael@0 1032 || WTF_CPU_SPARC64 \
michael@0 1033 || WTF_CPU_S390X \
michael@0 1034 || WTF_CPU_PPC64
michael@0 1035 #define WTF_USE_JSVALUE64 1
michael@0 1036 #else
michael@0 1037 #define WTF_USE_JSVALUE32_64 1
michael@0 1038 #endif
michael@0 1039 #endif /* !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32_64) */
michael@0 1040
michael@0 1041 #if !defined(ENABLE_REPAINT_THROTTLING)
michael@0 1042 #define ENABLE_REPAINT_THROTTLING 0
michael@0 1043 #endif
michael@0 1044
michael@0 1045 /* Disable the JIT on versions of GCC prior to 4.1 */
michael@0 1046 #if !defined(ENABLE_JIT) && WTF_COMPILER_GCC && !GCC_VERSION_AT_LEAST(4, 1, 0)
michael@0 1047 #define ENABLE_JIT 0
michael@0 1048 #endif
michael@0 1049
michael@0 1050 /* The JIT is enabled by default on all x86, x64-64, ARM platforms. */
michael@0 1051 #if !defined(ENABLE_JIT) \
michael@0 1052 && (WTF_CPU_X86 || WTF_CPU_X86_64 || WTF_CPU_ARM || WTF_CPU_SPARC32 || WTF_CPU_MIPS) \
michael@0 1053 && (WTF_OS_DARWIN || !WTF_COMPILER_GCC || GCC_VERSION_AT_LEAST(4, 1, 0)) \
michael@0 1054 && !WTF_OS_WINCE
michael@0 1055 #define ENABLE_JIT 1
michael@0 1056 #endif
michael@0 1057
michael@0 1058 /* Currently only implemented for JSVALUE64, only tested on WTF_PLATFORM_MAC */
michael@0 1059 #if ENABLE_JIT && WTF_USE_JSVALUE64 && WTF_PLATFORM_MAC
michael@0 1060 #define ENABLE_DFG_JIT 1
michael@0 1061 /* Enabled with restrictions to circumvent known performance regressions. */
michael@0 1062 #define ENABLE_DFG_JIT_RESTRICTIONS 1
michael@0 1063 #endif
michael@0 1064
michael@0 1065 /* Ensure that either the JIT or the interpreter has been enabled. */
michael@0 1066 #if !defined(ENABLE_INTERPRETER) && !ENABLE_JIT
michael@0 1067 #define ENABLE_INTERPRETER 1
michael@0 1068 #endif
michael@0 1069 #if !(ENABLE_JIT || ENABLE_INTERPRETER)
michael@0 1070 #error You have to have at least one execution model enabled to build JSC
michael@0 1071 #endif
michael@0 1072
michael@0 1073 #if WTF_CPU_SH4 && WTF_PLATFORM_QT
michael@0 1074 #define ENABLE_JIT 1
michael@0 1075 #define ENABLE_YARR 1
michael@0 1076 #define ENABLE_YARR_JIT 1
michael@0 1077 #define WTF_USE_JIT_STUB_ARGUMENT_REGISTER 1
michael@0 1078 #define ENABLE_ASSEMBLER 1
michael@0 1079 #endif
michael@0 1080
michael@0 1081 /* Configure the JIT */
michael@0 1082 #if ENABLE_JIT
michael@0 1083 #if WTF_CPU_ARM
michael@0 1084 #if !defined(ENABLE_JIT_USE_SOFT_MODULO) && WTF_CPU_ARM && WTF_ARM_ARCH_VERSION >= 5
michael@0 1085 #define ENABLE_JIT_USE_SOFT_MODULO 1
michael@0 1086 #endif
michael@0 1087 #endif
michael@0 1088
michael@0 1089 #ifndef ENABLE_JIT_OPTIMIZE_CALL
michael@0 1090 #define ENABLE_JIT_OPTIMIZE_CALL 1
michael@0 1091 #endif
michael@0 1092 #ifndef ENABLE_JIT_OPTIMIZE_NATIVE_CALL
michael@0 1093 #define ENABLE_JIT_OPTIMIZE_NATIVE_CALL 1
michael@0 1094 #endif
michael@0 1095 #ifndef ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS
michael@0 1096 #define ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS 1
michael@0 1097 #endif
michael@0 1098 #ifndef ENABLE_JIT_OPTIMIZE_METHOD_CALLS
michael@0 1099 #define ENABLE_JIT_OPTIMIZE_METHOD_CALLS 1
michael@0 1100 #endif
michael@0 1101 #endif
michael@0 1102
michael@0 1103 #if WTF_CPU_X86 && WTF_COMPILER_MSVC
michael@0 1104 #define JSC_HOST_CALL __fastcall
michael@0 1105 #elif WTF_CPU_X86 && WTF_COMPILER_GCC
michael@0 1106 #define JSC_HOST_CALL __attribute__ ((fastcall))
michael@0 1107 #else
michael@0 1108 #define JSC_HOST_CALL
michael@0 1109 #endif
michael@0 1110
michael@0 1111 /* Configure the interpreter */
michael@0 1112 #if WTF_COMPILER_GCC || (RVCT_VERSION_AT_LEAST(4, 0, 0, 0) && defined(__GNUC__))
michael@0 1113 #define HAVE_COMPUTED_GOTO 1
michael@0 1114 #endif
michael@0 1115 #if HAVE_COMPUTED_GOTO && ENABLE_INTERPRETER
michael@0 1116 #define ENABLE_COMPUTED_GOTO_INTERPRETER 1
michael@0 1117 #endif
michael@0 1118
michael@0 1119 /* Regular Expression Tracing - Set to 1 to trace RegExp's in jsc. Results dumped at exit */
michael@0 1120 #define ENABLE_REGEXP_TRACING 0
michael@0 1121
michael@0 1122 /* Yet Another Regex Runtime - turned on by default for JIT enabled ports. */
michael@0 1123 #if WTF_PLATFORM_CHROMIUM
michael@0 1124 #define ENABLE_YARR_JIT 0
michael@0 1125
michael@0 1126 #elif ENABLE_YARR_JIT
michael@0 1127 /* Setting this flag compares JIT results with interpreter results. */
michael@0 1128 #define ENABLE_YARR_JIT_DEBUG 0
michael@0 1129 #endif
michael@0 1130
michael@0 1131 #if ENABLE_JIT || ENABLE_YARR_JIT
michael@0 1132 #define ENABLE_ASSEMBLER 1
michael@0 1133 #endif
michael@0 1134 /* Setting this flag prevents the assembler from using RWX memory; this may improve
michael@0 1135 security but currectly comes at a significant performance cost. */
michael@0 1136 #if WTF_PLATFORM_IOS
michael@0 1137 //XXX: this doesn't currently compile in the spidermonkey build
michael@0 1138 #define ENABLE_ASSEMBLER_WX_EXCLUSIVE 0
michael@0 1139 #endif
michael@0 1140
michael@0 1141 /* Pick which allocator to use; we only need an executable allocator if the assembler is compiled in.
michael@0 1142 On x86-64 we use a single fixed mmap, on other platforms we mmap on demand. */
michael@0 1143 #if ENABLE_ASSEMBLER
michael@0 1144 #if WTF_CPU_X86_64
michael@0 1145 #define ENABLE_EXECUTABLE_ALLOCATOR_FIXED 1
michael@0 1146 #else
michael@0 1147 #define ENABLE_EXECUTABLE_ALLOCATOR_DEMAND 1
michael@0 1148 #endif
michael@0 1149 #endif
michael@0 1150
michael@0 1151 #if !defined(ENABLE_PAN_SCROLLING) && WTF_OS_WINDOWS
michael@0 1152 #define ENABLE_PAN_SCROLLING 1
michael@0 1153 #endif
michael@0 1154
michael@0 1155 #if !defined(ENABLE_SMOOTH_SCROLLING)
michael@0 1156 #define ENABLE_SMOOTH_SCROLLING 0
michael@0 1157 #endif
michael@0 1158
michael@0 1159 #if !defined(ENABLE_WEB_ARCHIVE)
michael@0 1160 #define ENABLE_WEB_ARCHIVE 0
michael@0 1161 #endif
michael@0 1162
michael@0 1163 /* Use the QXmlStreamReader implementation for XMLDocumentParser */
michael@0 1164 /* Use the QXmlQuery implementation for XSLTProcessor */
michael@0 1165 #if WTF_PLATFORM_QT
michael@0 1166 #define WTF_USE_QXMLSTREAM 1
michael@0 1167 #define WTF_USE_QXMLQUERY 1
michael@0 1168 #endif
michael@0 1169
michael@0 1170 #if WTF_PLATFORM_MAC
michael@0 1171 /* Complex text framework */
michael@0 1172 #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
michael@0 1173 #define WTF_USE_ATSUI 0
michael@0 1174 #define WTF_USE_CORE_TEXT 1
michael@0 1175 #else
michael@0 1176 #define WTF_USE_ATSUI 1
michael@0 1177 #define WTF_USE_CORE_TEXT 0
michael@0 1178 #endif
michael@0 1179 #endif
michael@0 1180
michael@0 1181 /* Accelerated compositing */
michael@0 1182 #if (WTF_PLATFORM_MAC && !defined(BUILDING_ON_TIGER)) || WTF_PLATFORM_IOS || WTF_PLATFORM_QT || (WTF_PLATFORM_WIN && !WTF_OS_WINCE &&!defined(WIN_CAIRO))
michael@0 1183 #define WTF_USE_ACCELERATED_COMPOSITING 1
michael@0 1184 #endif
michael@0 1185
michael@0 1186 #if (WTF_PLATFORM_MAC && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)) || WTF_PLATFORM_IOS
michael@0 1187 #define WTF_USE_PROTECTION_SPACE_AUTH_CALLBACK 1
michael@0 1188 #endif
michael@0 1189
michael@0 1190 #if WTF_PLATFORM_MAC && !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD) && !defined(BUILDING_ON_SNOW_LEOPARD)
michael@0 1191 #define WTF_USE_AVFOUNDATION 1
michael@0 1192 #endif
michael@0 1193
michael@0 1194 #if WTF_COMPILER_GCC
michael@0 1195 #define WARN_UNUSED_RETURN __attribute__ ((warn_unused_result))
michael@0 1196 #else
michael@0 1197 #define WARN_UNUSED_RETURN
michael@0 1198 #endif
michael@0 1199
michael@0 1200 /* COMPILER(CLANG) - Clang */
michael@0 1201 #if defined(__clang__)
michael@0 1202 #define WTF_COMPILER_CLANG 1
michael@0 1203 #endif
michael@0 1204
michael@0 1205 #if !ENABLE_NETSCAPE_PLUGIN_API || (ENABLE_NETSCAPE_PLUGIN_API && ((WTF_OS_UNIX && (WTF_PLATFORM_QT || WTF_PLATFORM_WX)) || WTF_PLATFORM_GTK))
michael@0 1206 #define ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH 1
michael@0 1207 #endif
michael@0 1208
michael@0 1209 /* Set up a define for a common error that is intended to cause a build error -- thus the space after Error. */
michael@0 1210 #define WTF_PLATFORM_CFNETWORK Error USE_macro_should_be_used_with_CFNETWORK
michael@0 1211
michael@0 1212 #define ENABLE_JSC_ZOMBIES 0
michael@0 1213
michael@0 1214 /* FIXME: Eventually we should enable this for all platforms and get rid of the define. */
michael@0 1215 #if WTF_PLATFORM_MAC || WTF_PLATFORM_WIN || WTF_PLATFORM_QT
michael@0 1216 #define WTF_USE_PLATFORM_STRATEGIES 1
michael@0 1217 #endif
michael@0 1218
michael@0 1219 #if WTF_PLATFORM_WIN
michael@0 1220 #define WTF_USE_CROSS_PLATFORM_CONTEXT_MENUS 1
michael@0 1221 #endif
michael@0 1222
michael@0 1223 /* Geolocation request policy. pre-emptive policy is to acquire user permission before acquiring location.
michael@0 1224 Client based implementations will have option to choose between pre-emptive and nonpre-emptive permission policy.
michael@0 1225 pre-emptive permission policy is enabled by default for all client-based implementations. */
michael@0 1226 #if ENABLE_CLIENT_BASED_GEOLOCATION
michael@0 1227 #define WTF_USE_PREEMPT_GEOLOCATION_PERMISSION 1
michael@0 1228 #endif
michael@0 1229
michael@0 1230 #if WTF_CPU_ARM_THUMB2
michael@0 1231 #define ENABLE_BRANCH_COMPACTION 1
michael@0 1232 #endif
michael@0 1233
michael@0 1234 #if !defined(ENABLE_THREADING_OPENMP) && defined(_OPENMP)
michael@0 1235 #define ENABLE_THREADING_OPENMP 1
michael@0 1236 #endif
michael@0 1237
michael@0 1238 #if !defined(ENABLE_PARALLEL_JOBS) && !ENABLE_SINGLE_THREADED && (ENABLE_THREADING_GENERIC || ENABLE_THREADING_LIBDISPATCH || ENABLE_THREADING_OPENMP)
michael@0 1239 #define ENABLE_PARALLEL_JOBS 1
michael@0 1240 #endif
michael@0 1241
michael@0 1242 #if ENABLE_GLIB_SUPPORT
michael@0 1243 //#include "GTypedefs.h"
michael@0 1244 #endif
michael@0 1245
michael@0 1246 /* FIXME: This define won't be needed once #27551 is fully landed. However,
michael@0 1247 since most ports try to support sub-project independence, adding new headers
michael@0 1248 to WTF causes many ports to break, and so this way we can address the build
michael@0 1249 breakages one port at a time. */
michael@0 1250 #define WTF_USE_EXPORT_MACROS 0
michael@0 1251
michael@0 1252 #if WTF_PLATFORM_QT || WTF_PLATFORM_GTK
michael@0 1253 #define WTF_USE_UNIX_DOMAIN_SOCKETS 1
michael@0 1254 #endif
michael@0 1255
michael@0 1256 #endif /* assembler_wtf_Platform_h */

mercurial