2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2007-2009 Torch Mobile, Inc.
4 * Copyright (C) 2010, 2011 Research In Motion Limited. All rights reserved.
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions
9 * 1. Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * 2. Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
15 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
16 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
18 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
19 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
20 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
22 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
23 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
25 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 #ifndef WTF_Platform_h
29 #define WTF_Platform_h
31 /* Include compiler specific macros */
32 #include <wtf/Compiler.h>
34 /* ==== PLATFORM handles OS, operating environment, graphics API, and
35 CPU. This macro will be phased out in favor of platform adaptation
36 macros, policy decision macros, and top-level port definitions. ==== */
37 #define PLATFORM(WTF_FEATURE) (defined WTF_PLATFORM_##WTF_FEATURE && WTF_PLATFORM_##WTF_FEATURE)
40 /* ==== Platform adaptation macros: these describe properties of the target environment. ==== */
42 /* CPU() - the target CPU architecture */
43 #define CPU(WTF_FEATURE) (defined WTF_CPU_##WTF_FEATURE && WTF_CPU_##WTF_FEATURE)
44 /* HAVE() - specific system features (headers, functions or similar) that are present or not */
45 #define HAVE(WTF_FEATURE) (defined HAVE_##WTF_FEATURE && HAVE_##WTF_FEATURE)
46 /* OS() - underlying operating system; only to be used for mandated low-level services like
47 virtual memory, not to choose a GUI toolkit */
48 #define OS(WTF_FEATURE) (defined WTF_OS_##WTF_FEATURE && WTF_OS_##WTF_FEATURE)
51 /* ==== Policy decision macros: these define policy choices for a particular port. ==== */
53 /* USE() - use a particular third-party library or optional OS service */
54 #define USE(WTF_FEATURE) (defined WTF_USE_##WTF_FEATURE && WTF_USE_##WTF_FEATURE)
55 /* ENABLE() - turn on a specific feature of WebKit */
56 #define ENABLE(WTF_FEATURE) (defined ENABLE_##WTF_FEATURE && ENABLE_##WTF_FEATURE)
59 /* ==== CPU() - the target CPU architecture ==== */
61 /* This also defines CPU(BIG_ENDIAN) or CPU(MIDDLE_ENDIAN) or neither, as appropriate. */
63 /* CPU(ALPHA) - DEC Alpha */
64 #if defined(__alpha__)
65 #define WTF_CPU_ALPHA 1
68 /* CPU(IA64) - Itanium / IA-64 */
70 #define WTF_CPU_IA64 1
71 /* 32-bit mode on Itanium */
72 #if !defined(__LP64__)
73 #define WTF_CPU_IA64_32 1
77 /* CPU(MIPS) - MIPS 32-bit */
78 /* Note: Only O32 ABI is tested, so we enable it for O32 ABI for now. */
79 #if (defined(mips) || defined(__mips__) || defined(MIPS) || defined(_MIPS_)) \
81 #define WTF_CPU_MIPS 1
82 #if defined(__MIPSEB__)
83 #define WTF_CPU_BIG_ENDIAN 1
85 #define WTF_MIPS_PIC (defined __PIC__)
86 #define WTF_MIPS_ARCH __mips
87 #define WTF_MIPS_ISA(v) (defined WTF_MIPS_ARCH && WTF_MIPS_ARCH == v)
88 #define WTF_MIPS_ISA_AT_LEAST(v) (defined WTF_MIPS_ARCH && WTF_MIPS_ARCH >= v)
89 #define WTF_MIPS_ARCH_REV __mips_isa_rev
90 #define WTF_MIPS_ISA_REV(v) (defined WTF_MIPS_ARCH_REV && WTF_MIPS_ARCH_REV == v)
91 #define WTF_MIPS_DOUBLE_FLOAT (defined __mips_hard_float && !defined __mips_single_float)
92 #define WTF_MIPS_FP64 (defined __mips_fpr && __mips_fpr == 64)
93 /* MIPS requires allocators to use aligned memory */
94 #define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER 1
97 /* CPU(PPC) - PowerPC 32-bit */
98 #if defined(__ppc__) \
100 || defined(__powerpc__) \
101 || defined(__powerpc) \
102 || defined(__POWERPC__) \
105 #define WTF_CPU_PPC 1
106 #define WTF_CPU_BIG_ENDIAN 1
109 /* CPU(PPC64) - PowerPC 64-bit */
110 #if defined(__ppc64__) \
111 || defined(__PPC64__)
112 #define WTF_CPU_PPC64 1
113 #define WTF_CPU_BIG_ENDIAN 1
116 /* CPU(SH4) - SuperH SH-4 */
118 #define WTF_CPU_SH4 1
121 /* CPU(SPARC32) - SPARC 32-bit */
122 #if defined(__sparc) && !defined(__arch64__) || defined(__sparcv8)
123 #define WTF_CPU_SPARC32 1
124 #define WTF_CPU_BIG_ENDIAN 1
127 /* CPU(SPARC64) - SPARC 64-bit */
128 #if defined(__sparc__) && defined(__arch64__) || defined (__sparcv9)
129 #define WTF_CPU_SPARC64 1
130 #define WTF_CPU_BIG_ENDIAN 1
133 /* CPU(SPARC) - any SPARC, true for CPU(SPARC32) and CPU(SPARC64) */
134 #if CPU(SPARC32) || CPU(SPARC64)
135 #define WTF_CPU_SPARC 1
138 /* CPU(S390X) - S390 64-bit */
139 #if defined(__s390x__)
140 #define WTF_CPU_S390X 1
141 #define WTF_CPU_BIG_ENDIAN 1
144 /* CPU(S390) - S390 32-bit */
145 #if defined(__s390__)
146 #define WTF_CPU_S390 1
147 #define WTF_CPU_BIG_ENDIAN 1
150 /* CPU(X86) - i386 / x86 32-bit */
151 #if defined(__i386__) \
153 || defined(_M_IX86) \
155 || defined(__THW_INTEL)
156 #define WTF_CPU_X86 1
159 /* CPU(X86_64) - AMD64 / Intel64 / x86_64 64-bit */
160 #if defined(__x86_64__) \
162 #define WTF_CPU_X86_64 1
165 /* CPU(ARM) - ARM, any version*/
167 || defined(__arm__) \
170 #define WTF_CPU_ARM 1
172 #if defined(__ARM_PCS_VFP)
173 #define WTF_CPU_ARM_HARDFP 1
176 #if defined(__ARMEB__) || (COMPILER(RVCT) && defined(__BIG_ENDIAN))
177 #define WTF_CPU_BIG_ENDIAN 1
179 #elif !defined(__ARM_EABI__) \
180 && !defined(__EABI__) \
181 && !defined(__VFP_FP__) \
182 && !defined(_WIN32_WCE) \
184 #define WTF_CPU_MIDDLE_ENDIAN 1
188 #define WTF_ARM_ARCH_AT_LEAST(N) (CPU(ARM) && WTF_ARM_ARCH_VERSION >= N)
190 /* Set WTF_ARM_ARCH_VERSION */
191 #if defined(__ARM_ARCH_4__) \
192 || defined(__ARM_ARCH_4T__) \
193 || defined(__MARM_ARMV4__) \
195 #define WTF_ARM_ARCH_VERSION 4
197 #elif defined(__ARM_ARCH_5__) \
198 || defined(__ARM_ARCH_5T__) \
199 || defined(__MARM_ARMV5__)
200 #define WTF_ARM_ARCH_VERSION 5
202 #elif defined(__ARM_ARCH_5E__) \
203 || defined(__ARM_ARCH_5TE__) \
204 || defined(__ARM_ARCH_5TEJ__)
205 #define WTF_ARM_ARCH_VERSION 5
206 /*ARMv5TE requires allocators to use aligned memory*/
207 #define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER 1
209 #elif defined(__ARM_ARCH_6__) \
210 || defined(__ARM_ARCH_6J__) \
211 || defined(__ARM_ARCH_6K__) \
212 || defined(__ARM_ARCH_6Z__) \
213 || defined(__ARM_ARCH_6ZK__) \
214 || defined(__ARM_ARCH_6T2__) \
215 || defined(__ARMV6__)
216 #define WTF_ARM_ARCH_VERSION 6
218 #elif defined(__ARM_ARCH_7A__) \
219 || defined(__ARM_ARCH_7R__)
220 #define WTF_ARM_ARCH_VERSION 7
222 /* RVCT sets _TARGET_ARCH_ARM */
223 #elif defined(__TARGET_ARCH_ARM)
224 #define WTF_ARM_ARCH_VERSION __TARGET_ARCH_ARM
226 #if defined(__TARGET_ARCH_5E) \
227 || defined(__TARGET_ARCH_5TE) \
228 || defined(__TARGET_ARCH_5TEJ)
229 /*ARMv5TE requires allocators to use aligned memory*/
230 #define WTF_USE_ARENA_ALLOC_ALIGNMENT_INTEGER 1
234 #define WTF_ARM_ARCH_VERSION 0
238 /* Set WTF_THUMB_ARCH_VERSION */
239 #if defined(__ARM_ARCH_4T__)
240 #define WTF_THUMB_ARCH_VERSION 1
242 #elif defined(__ARM_ARCH_5T__) \
243 || defined(__ARM_ARCH_5TE__) \
244 || defined(__ARM_ARCH_5TEJ__)
245 #define WTF_THUMB_ARCH_VERSION 2
247 #elif defined(__ARM_ARCH_6J__) \
248 || defined(__ARM_ARCH_6K__) \
249 || defined(__ARM_ARCH_6Z__) \
250 || defined(__ARM_ARCH_6ZK__) \
251 || defined(__ARM_ARCH_6M__)
252 #define WTF_THUMB_ARCH_VERSION 3
254 #elif defined(__ARM_ARCH_6T2__) \
255 || defined(__ARM_ARCH_7__) \
256 || defined(__ARM_ARCH_7A__) \
257 || defined(__ARM_ARCH_7R__) \
258 || defined(__ARM_ARCH_7M__)
259 #define WTF_THUMB_ARCH_VERSION 4
261 /* RVCT sets __TARGET_ARCH_THUMB */
262 #elif defined(__TARGET_ARCH_THUMB)
263 #define WTF_THUMB_ARCH_VERSION __TARGET_ARCH_THUMB
266 #define WTF_THUMB_ARCH_VERSION 0
270 /* CPU(ARMV5_OR_LOWER) - ARM instruction set v5 or earlier */
271 /* On ARMv5 and below the natural alignment is required.
272 And there are some other differences for v5 or earlier. */
273 #if !defined(ARMV5_OR_LOWER) && !WTF_ARM_ARCH_AT_LEAST(6)
274 #define WTF_CPU_ARMV5_OR_LOWER 1
278 /* CPU(ARM_TRADITIONAL) - Thumb2 is not available, only traditional ARM (v4 or greater) */
279 /* CPU(ARM_THUMB2) - Thumb2 instruction set is available */
280 /* Only one of these will be defined. */
281 #if !defined(WTF_CPU_ARM_TRADITIONAL) && !defined(WTF_CPU_ARM_THUMB2)
282 # if defined(thumb2) || defined(__thumb2__) \
283 || ((defined(__thumb) || defined(__thumb__)) && WTF_THUMB_ARCH_VERSION == 4)
284 # define WTF_CPU_ARM_TRADITIONAL 0
285 # define WTF_CPU_ARM_THUMB2 1
286 # elif WTF_ARM_ARCH_AT_LEAST(4)
287 # define WTF_CPU_ARM_TRADITIONAL 1
288 # define WTF_CPU_ARM_THUMB2 0
290 # error "Not supported ARM architecture"
292 #elif CPU(ARM_TRADITIONAL) && CPU(ARM_THUMB2) /* Sanity Check */
293 # error "Cannot use both of WTF_CPU_ARM_TRADITIONAL and WTF_CPU_ARM_THUMB2 platforms"
294 #endif /* !defined(WTF_CPU_ARM_TRADITIONAL) && !defined(WTF_CPU_ARM_THUMB2) */
296 #if defined(__ARM_NEON__) && !defined(WTF_CPU_ARM_NEON)
297 #define WTF_CPU_ARM_NEON 1
300 #if CPU(ARM_NEON) && (!COMPILER(GCC) || GCC_VERSION_AT_LEAST(4, 7, 0))
301 // All NEON intrinsics usage can be disabled by this macro.
302 #define HAVE_ARM_NEON_INTRINSICS 1
305 #if (defined(__VFP_FP__) && !defined(__SOFTFP__))
306 #define WTF_CPU_ARM_VFP 1
309 #if defined(__ARM_ARCH_7S__)
310 #define WTF_CPU_APPLE_ARMV7S 1
315 #if CPU(ARM) || CPU(MIPS) || CPU(SH4) || CPU(SPARC)
316 #define WTF_CPU_NEEDS_ALIGNED_ACCESS 1
319 /* ==== OS() - underlying operating system; only to be used for mandated low-level services like
320 virtual memory, not to choose a GUI toolkit ==== */
322 /* OS(ANDROID) - Android */
324 #define WTF_OS_ANDROID 1
332 /* OS(DARWIN) - Any Darwin-based OS, including Mac OS X and iPhone OS */
334 #define WTF_OS_DARWIN 1
336 #include <Availability.h>
337 #include <AvailabilityMacros.h>
338 #include <TargetConditionals.h>
342 /* OS(MAC_OS_X) - Mac OS X (not including iOS) */
343 #if OS(DARWIN) && ((defined(TARGET_OS_EMBEDDED) && TARGET_OS_EMBEDDED) \
344 || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) \
345 || (defined(TARGET_IPHONE_SIMULATOR) && TARGET_IPHONE_SIMULATOR))
347 #elif OS(DARWIN) && defined(TARGET_OS_MAC) && TARGET_OS_MAC
348 #define WTF_OS_MAC_OS_X 1
350 /* FIXME: These can be removed after sufficient time has passed since the removal of BUILDING_ON / TARGETING macros. */
352 #define ERROR_PLEASE_COMPARE_WITH_MAC_OS_X_VERSION_MIN_REQUIRED 0 / 0
353 #define ERROR_PLEASE_COMPARE_WITH_MAC_OS_X_VERSION_MAX_ALLOWED 0 / 0
355 #define BUILDING_ON_LEOPARD ERROR_PLEASE_COMPARE_WITH_MAC_OS_X_VERSION_MIN_REQUIRED
356 #define BUILDING_ON_SNOW_LEOPARD ERROR_PLEASE_COMPARE_WITH_MAC_OS_X_VERSION_MIN_REQUIRED
357 #define BUILDING_ON_LION ERROR_PLEASE_COMPARE_WITH_MAC_OS_X_VERSION_MIN_REQUIRED
359 #define TARGETING_LEOPARD ERROR_PLEASE_COMPARE_WITH_MAC_OS_X_VERSION_MAX_ALLOWED
360 #define TARGETING_SNOW_LEOPARD ERROR_PLEASE_COMPARE_WITH_MAC_OS_X_VERSION_MAX_ALLOWED
361 #define TARGETING_LION ERROR_PLEASE_COMPARE_WITH_MAC_OS_X_VERSION_MAX_ALLOWED
364 /* OS(FREEBSD) - FreeBSD */
365 #if defined(__FreeBSD__) || defined(__DragonFly__) || defined(__FreeBSD_kernel__)
366 #define WTF_OS_FREEBSD 1
369 /* OS(HURD) - GNU/Hurd */
371 #define WTF_OS_HURD 1
374 /* OS(LINUX) - Linux */
376 #define WTF_OS_LINUX 1
379 /* OS(NETBSD) - NetBSD */
380 #if defined(__NetBSD__)
381 #define WTF_OS_NETBSD 1
384 /* OS(OPENBSD) - OpenBSD */
386 #define WTF_OS_OPENBSD 1
390 #if defined(__QNXNTO__)
394 /* OS(SOLARIS) - Solaris */
395 #if defined(sun) || defined(__sun)
396 #define WTF_OS_SOLARIS 1
399 /* OS(WINCE) - Windows CE; note that for this platform OS(WINDOWS) is also defined */
400 #if defined(_WIN32_WCE)
401 #define WTF_OS_WINCE 1
404 /* OS(WINDOWS) - Any version of Windows */
405 #if defined(WIN32) || defined(_WIN32)
406 #define WTF_OS_WINDOWS 1
409 #define WTF_OS_WIN ERROR "USE WINDOWS WITH OS NOT WIN"
410 #define WTF_OS_MAC ERROR "USE MAC_OS_X WITH OS NOT MAC"
412 /* OS(UNIX) - Any Unix-like system */
426 #define WTF_OS_UNIX 1
429 /* Operating environments */
431 /* FIXME: these are all mixes of OS, operating environment and policy choices. */
432 /* PLATFORM(CHROMIUM) */
437 /* PLATFORM(BLACKBERRY) */
440 #if defined(BUILDING_CHROMIUM__)
441 #define WTF_PLATFORM_CHROMIUM 1
442 #elif defined(BUILDING_QT__)
443 #define WTF_PLATFORM_QT 1
444 #elif defined(BUILDING_WX__)
445 #define WTF_PLATFORM_WX 1
446 #elif defined(BUILDING_EFL__)
447 #define WTF_PLATFORM_EFL 1
448 #elif defined(BUILDING_GTK__)
449 #define WTF_PLATFORM_GTK 1
450 #elif defined(BUILDING_BLACKBERRY__)
451 #define WTF_PLATFORM_BLACKBERRY 1
453 #define WTF_PLATFORM_MAC 1
455 #define WTF_PLATFORM_WIN 1
459 /* FIXME: this is sometimes used as an OS switch and sometimes for higher-level things */
460 #if (defined(TARGET_OS_EMBEDDED) && TARGET_OS_EMBEDDED) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)
461 #define WTF_PLATFORM_IOS 1
464 /* PLATFORM(IOS_SIMULATOR) */
465 #if defined(TARGET_IPHONE_SIMULATOR) && TARGET_IPHONE_SIMULATOR
466 #define WTF_PLATFORM_IOS 1
467 #define WTF_PLATFORM_IOS_SIMULATOR 1
470 /* Graphics engines */
472 /* USE(CG) and PLATFORM(CI) */
473 #if PLATFORM(MAC) || PLATFORM(IOS)
476 #if PLATFORM(MAC) || PLATFORM(IOS) || (PLATFORM(WIN) && USE(CG))
480 /* USE(SKIA) for Win/Linux/Mac/Android */
481 #if PLATFORM(CHROMIUM)
483 #define WTF_USE_SKIA 1
484 #define WTF_USE_ICCJPEG 1
485 #define WTF_USE_QCMSLIB 1
487 #define WTF_USE_SKIA 1
488 #define WTF_USE_LOW_QUALITY_IMAGE_INTERPOLATION 1
489 #define WTF_USE_LOW_QUALITY_IMAGE_NO_JPEG_DITHERING 1
490 #define WTF_USE_LOW_QUALITY_IMAGE_NO_JPEG_FANCY_UPSAMPLING 1
492 #define WTF_USE_SKIA 1
493 #define WTF_USE_ICCJPEG 1
494 #define WTF_USE_QCMSLIB 1
499 #define USE_SYSTEM_MALLOC 1
502 #if PLATFORM(BLACKBERRY)
503 #define WTF_USE_MERSENNE_TWISTER_19937 1
504 #define WTF_USE_SKIA 1
505 #define WTF_USE_LOW_QUALITY_IMAGE_INTERPOLATION 1
506 #define WTF_USE_LOW_QUALITY_IMAGE_NO_JPEG_DITHERING 1
507 #define WTF_USE_LOW_QUALITY_IMAGE_NO_JPEG_FANCY_UPSAMPLING 1
511 #define WTF_USE_CAIRO 1
512 #define ENABLE_GLOBAL_FASTMALLOC_NEW 0
517 #define WTF_USE_MERSENNE_TWISTER_19937 1
520 /* On Windows, use QueryPerformanceCounter by default */
522 #define WTF_USE_QUERY_PERFORMANCE_COUNTER 1
525 #if OS(WINCE) && !PLATFORM(QT)
526 #define NOSHLWAPI /* shlwapi.h not available on WinCe */
528 /* MSDN documentation says these functions are provided with uspce.lib. But we cannot find this file. */
529 #define __usp10__ /* disable "usp10.h" */
531 #define _INC_ASSERT /* disable "assert.h" */
534 #endif /* OS(WINCE) && !PLATFORM(QT) */
536 #if OS(WINCE) && !PLATFORM(QT)
537 #define WTF_USE_WCHAR_UNICODE 1
539 /* The GTK+ Unicode backend is configurable */
541 #define WTF_USE_ICU_UNICODE 1
544 #if PLATFORM(MAC) && !PLATFORM(IOS)
546 #define WTF_USE_PLUGIN_HOST_PROCESS 1
548 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
549 #define ENABLE_GESTURE_EVENTS 1
550 #define ENABLE_RUBBER_BANDING 1
551 #define WTF_USE_SCROLLBAR_PAINTER 1
554 #if !defined(ENABLE_DASHBOARD_SUPPORT)
555 #define ENABLE_DASHBOARD_SUPPORT 1
558 #define WTF_USE_PTHREADS 1
559 #define HAVE_READLINE 1
560 #define HAVE_RUNLOOP_TIMER 1
561 #define ENABLE_FULLSCREEN_API 1
562 #define ENABLE_SMOOTH_SCROLLING 1
563 #define ENABLE_WEB_ARCHIVE 1
564 #define ENABLE_WEB_AUDIO 1
565 #if defined(ENABLE_VIDEO)
566 #define ENABLE_VIDEO_TRACK 1
568 #if __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
569 #define HAVE_LAYER_HOSTING_IN_WINDOW_SERVER 1
571 #define WTF_USE_APPKIT 1
572 #define WTF_USE_SECURITY_FRAMEWORK 1
573 #endif /* PLATFORM(MAC) && !PLATFORM(IOS) */
575 #if PLATFORM(CHROMIUM) && OS(DARWIN)
577 #define WTF_USE_PTHREADS 1
578 #define WTF_USE_WK_SCROLLBAR_PAINTER 1
581 #if PLATFORM(CHROMIUM)
583 /* We can't override the global operator new and delete on OS(DARWIN) because
584 * some object are allocated by WebKit and deallocated by the embedder. */
585 #define ENABLE_GLOBAL_FASTMALLOC_NEW 0
586 #else /* !OS(DARWIN) */
587 /* On non-OS(DARWIN), the "system malloc" is actually TCMalloc anyway, so there's
588 * no need to use WebKit's copy of TCMalloc. */
589 #define USE_SYSTEM_MALLOC 1
590 #endif /* OS(DARWIN) */
591 #endif /* PLATFORM(CHROMIUM) */
594 #define DONT_FINALIZE_ON_MAIN_THREAD 1
597 #if PLATFORM(QT) && OS(DARWIN)
601 #if OS(DARWIN) && !PLATFORM(GTK) && !PLATFORM(QT)
602 #define ENABLE_PURGEABLE_MEMORY 1
606 #define ENABLE_CONTEXT_MENUS 0
607 #define ENABLE_DRAG_SUPPORT 0
608 #define ENABLE_GEOLOCATION 1
609 #define ENABLE_ICONDATABASE 0
610 #define ENABLE_INSPECTOR 1
611 #define ENABLE_NETSCAPE_PLUGIN_API 0
612 #define ENABLE_ORIENTATION_EVENTS 1
613 #define ENABLE_REPAINT_THROTTLING 1
614 #define ENABLE_WEB_ARCHIVE 1
615 #define HAVE_READLINE 1
617 #define WTF_USE_CFNETWORK 1
618 #define WTF_USE_NETWORK_CFDATA_ARRAY_CALLBACK 1
619 #define WTF_USE_PTHREADS 1
620 #define WTF_USE_WEB_THREAD 1
622 #if PLATFORM(IOS_SIMULATOR)
624 #define ENABLE_YARR_JIT 0
627 #define ENABLE_LLINT 1
628 #define ENABLE_YARR_JIT 1
631 #define WTF_USE_APPKIT 0
632 #define WTF_USE_SECURITY_FRAMEWORK 0
635 #if PLATFORM(WIN) && !OS(WINCE)
639 #if PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(WIN_CAIRO)
640 #define WTF_USE_CFNETWORK 1
643 #if USE(CFNETWORK) || PLATFORM(MAC) || PLATFORM(IOS)
644 #define WTF_USE_CFURLCACHE 1
647 #if PLATFORM(WIN) && !OS(WINCE)
648 #define ENABLE_WEB_ARCHIVE 1
651 #if PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(WIN_CAIRO)
652 #define ENABLE_FULLSCREEN_API 1
657 #if !defined(ENABLE_ASSEMBLER)
658 #define ENABLE_ASSEMBLER 1
662 #define ENABLE_GLOBAL_FASTMALLOC_NEW 0
663 #define ENABLE_LLINT 0
666 #define ENABLE_WEB_ARCHIVE 1
670 #if OS(UNIX) && (PLATFORM(GTK) || PLATFORM(QT))
671 #define WTF_USE_PTHREADS 1
674 #if !defined(HAVE_ACCESSIBILITY)
675 #if PLATFORM(IOS) || PLATFORM(MAC) || PLATFORM(WIN) || PLATFORM(GTK) || (PLATFORM(CHROMIUM) && !OS(ANDROID)) || PLATFORM(EFL)
676 #define HAVE_ACCESSIBILITY 1
678 #endif /* !defined(HAVE_ACCESSIBILITY) */
681 #define HAVE_ERRNO_H 1
683 #define HAVE_SIGNAL_H 1
684 #define HAVE_STRINGS_H 1
685 #define HAVE_SYS_PARAM_H 1
686 #define HAVE_SYS_TIME_H 1
687 #define WTF_USE_OS_RANDOMNESS 1
688 #endif /* OS(UNIX) */
690 #if OS(UNIX) && !OS(ANDROID) && !OS(QNX)
691 #define HAVE_LANGINFO_H 1
694 #if (OS(FREEBSD) || OS(OPENBSD)) && !defined(__GLIBC__)
695 #define HAVE_PTHREAD_NP_H 1
698 #if !defined(HAVE_VASPRINTF)
699 #if !COMPILER(MSVC) && !COMPILER(RVCT) && !COMPILER(MINGW) && !(COMPILER(GCC) && OS(QNX))
700 #define HAVE_VASPRINTF 1
704 #if !defined(HAVE_STRNSTR)
705 #if OS(DARWIN) || (OS(FREEBSD) && !defined(__GLIBC__))
706 #define HAVE_STRNSTR 1
710 #if !OS(WINDOWS) && !OS(SOLARIS) \
713 #define HAVE_TM_GMTOFF 1
714 #define HAVE_TM_ZONE 1
715 #define HAVE_TIMEGM 1
720 #define HAVE_MERGESORT 1
721 #define HAVE_SYS_TIMEB_H 1
722 #define WTF_USE_ACCELERATE 1
724 #if PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060
726 #define HAVE_DISPATCH_H 1
727 #define HAVE_HOSTED_CORE_ANIMATION 1
728 #define HAVE_MADV_FREE 1
729 #define HAVE_PTHREAD_SETNAME_NP 1
732 #define HAVE_MADV_FREE_REUSE 1
733 #endif /* !PLATFORM(IOS) */
735 #endif /* PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1060 */
737 #endif /* OS(DARWIN) */
739 #if OS(WINDOWS) && !OS(WINCE)
740 #define HAVE_SYS_TIMEB_H 1
741 #define HAVE_ALIGNED_MALLOC 1
742 #define HAVE_ISDEBUGGERPRESENT 1
746 #define HAVE_VIRTUALALLOC 1
747 #define WTF_USE_OS_RANDOMNESS 1
751 #define HAVE_MADV_FREE_REUSE 1
752 #define HAVE_MADV_FREE 1
753 #define WTF_USE_PTHREADS 1
756 /* ENABLE macro defaults */
759 /* We must not customize the global operator new and delete for the Qt port. */
760 #define ENABLE_GLOBAL_FASTMALLOC_NEW 0
762 #define USE_SYSTEM_MALLOC 1
766 #if !defined(ENABLE_ICONDATABASE)
767 #define ENABLE_ICONDATABASE 1
770 #if !defined(ENABLE_SQL_DATABASE)
771 #define ENABLE_SQL_DATABASE 1
774 #if !defined(ENABLE_JAVASCRIPT_DEBUGGER)
775 #define ENABLE_JAVASCRIPT_DEBUGGER 1
778 #if !defined(ENABLE_FTPDIR)
779 #define ENABLE_FTPDIR 1
782 #if !defined(ENABLE_CONTEXT_MENUS)
783 #define ENABLE_CONTEXT_MENUS 1
786 #if !defined(ENABLE_DRAG_SUPPORT)
787 #define ENABLE_DRAG_SUPPORT 1
790 #if !defined(ENABLE_INSPECTOR)
791 #define ENABLE_INSPECTOR 1
794 #if !defined(ENABLE_NETSCAPE_PLUGIN_API)
795 #define ENABLE_NETSCAPE_PLUGIN_API 1
798 #if !defined(ENABLE_GLOBAL_FASTMALLOC_NEW)
799 #define ENABLE_GLOBAL_FASTMALLOC_NEW 1
802 #if !defined(ENABLE_PARSED_STYLE_SHEET_CACHING)
803 #define ENABLE_PARSED_STYLE_SHEET_CACHING 1
806 #if !defined(ENABLE_SUBPIXEL_LAYOUT)
807 #if PLATFORM(CHROMIUM) || PLATFORM(EFL)
808 #define ENABLE_SUBPIXEL_LAYOUT 1
810 #define ENABLE_SUBPIXEL_LAYOUT 0
814 #if !defined(ENABLE_SATURATED_LAYOUT_ARITHMETIC)
815 #define ENABLE_SATURATED_LAYOUT_ARITHMETIC 0
818 #if ENABLE(ENABLE_SATURATED_LAYOUT_ARITHMETIC) && !ENABLE(ENABLE_SUBPIXEL_LAYOUT)
819 #error "ENABLE_SATURATED_LAYOUT_ARITHMETIC requires ENABLE_SUBPIXEL_LAYOUT"
822 #if ENABLE(INPUT_TYPE_DATE) || ENABLE(INPUT_TYPE_DATETIME) || ENABLE(INPUT_TYPE_DATETIMELOCAL) || ENABLE(INPUT_TYPE_MONTH) || ENABLE(INPUT_TYPE_TIME) || ENABLE(INPUT_TYPE_WEEK)
823 #define ENABLE_DATE_AND_TIME_INPUT_TYPES 1
826 #define ENABLE_DEBUG_WITH_BREAKPOINT 0
827 #define ENABLE_SAMPLING_COUNTERS 0
828 #define ENABLE_SAMPLING_FLAGS 0
829 #define ENABLE_SAMPLING_REGIONS 0
830 #define ENABLE_OPCODE_SAMPLING 0
831 #define ENABLE_CODEBLOCK_SAMPLING 0
832 #if ENABLE(CODEBLOCK_SAMPLING) && !ENABLE(OPCODE_SAMPLING)
833 #error "CODEBLOCK_SAMPLING requires OPCODE_SAMPLING"
835 #if ENABLE(OPCODE_SAMPLING) || ENABLE(SAMPLING_FLAGS) || ENABLE(SAMPLING_REGIONS)
836 #define ENABLE_SAMPLING_THREAD 1
839 #if !defined(ENABLE_TEXT_CARET) && !PLATFORM(IOS)
840 #define ENABLE_TEXT_CARET 1
843 #if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32_64)
844 #if (CPU(X86_64) && (OS(UNIX) || OS(WINDOWS))) \
845 || (CPU(IA64) && !CPU(IA64_32)) \
850 #define WTF_USE_JSVALUE64 1
852 #define WTF_USE_JSVALUE32_64 1
854 #endif /* !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32_64) */
856 /* Disable the JIT on versions of GCC prior to 4.1 */
857 #if !defined(ENABLE_JIT) && COMPILER(GCC) && !GCC_VERSION_AT_LEAST(4, 1, 0)
861 /* JIT is not implemented for Windows 64-bit */
862 #if !defined(ENABLE_JIT) && OS(WINDOWS) && CPU(X86_64)
864 #define ENABLE_YARR_JIT 0
867 #if !defined(ENABLE_JIT) && CPU(SH4) && PLATFORM(QT)
871 /* The JIT is enabled by default on all x86, x86-64, ARM & MIPS platforms. */
872 #if !defined(ENABLE_JIT) \
873 && (CPU(X86) || CPU(X86_64) || CPU(ARM) || CPU(MIPS)) \
874 && (OS(DARWIN) || !COMPILER(GCC) || GCC_VERSION_AT_LEAST(4, 1, 0)) \
876 && !(OS(QNX) && !PLATFORM(QT)) /* We use JIT in QNX Qt */
880 /* If possible, try to enable a disassembler. This is optional. We proceed in two
881 steps: first we try to find some disassembler that we can use, and then we
882 decide if the high-level disassembler API can be enabled. */
883 #if !defined(WTF_USE_UDIS86) && ENABLE(JIT) && (PLATFORM(MAC) || (PLATFORM(QT) && OS(LINUX))) \
884 && (CPU(X86) || CPU(X86_64))
885 #define WTF_USE_UDIS86 1
888 #if !defined(ENABLE_DISASSEMBLER) && USE(UDIS86)
889 #define ENABLE_DISASSEMBLER 1
892 /* On the GTK+ port we take an extra precaution for LLINT support:
893 * We disable it on x86 builds if the build target doesn't support SSE2
894 * instructions (LLINT requires SSE2 on this platform). */
895 #if !defined(ENABLE_LLINT) && PLATFORM(GTK) && CPU(X86) && COMPILER(GCC) \
896 && !defined(__SSE2__)
897 #define ENABLE_LLINT 0
900 /* On some of the platforms where we have a JIT, we want to also have the
901 low-level interpreter. */
902 #if !defined(ENABLE_LLINT) \
904 && (OS(DARWIN) || OS(LINUX)) \
905 && (PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(GTK) || PLATFORM(QT)) \
906 && (CPU(X86) || CPU(X86_64) || CPU(ARM_THUMB2) || CPU(MIPS))
907 #define ENABLE_LLINT 1
910 #if !defined(ENABLE_DFG_JIT) && ENABLE(JIT) && !COMPILER(MSVC)
911 /* Enable the DFG JIT on X86 and X86_64. Only tested on Mac and GNU/Linux. */
912 #if (CPU(X86) || CPU(X86_64)) && (PLATFORM(MAC) || OS(LINUX))
913 #define ENABLE_DFG_JIT 1
915 /* Enable the DFG JIT on ARMv7. Only tested on iOS and Qt Linux. */
916 #if CPU(ARM_THUMB2) && (PLATFORM(IOS) || PLATFORM(BLACKBERRY) || PLATFORM(QT))
917 #define ENABLE_DFG_JIT 1
919 /* Enable the DFG JIT on ARM. */
920 #if CPU(ARM_TRADITIONAL)
921 #define ENABLE_DFG_JIT 1
925 /* If the jit is not available, enable the LLInt C Loop: */
927 #undef ENABLE_LLINT /* Undef so that we can redefine it. */
928 #undef ENABLE_LLINT_C_LOOP /* Undef so that we can redefine it. */
929 #undef ENABLE_DFG_JIT /* Undef so that we can redefine it. */
930 #define ENABLE_LLINT 1
931 #define ENABLE_LLINT_C_LOOP 1
932 #define ENABLE_DFG_JIT 0
935 /* Do a sanity check to make sure that we at least have one execution engine in
937 #if !(ENABLE(JIT) || ENABLE(LLINT))
938 #error You have to have at least one execution model enabled to build JSC
941 /* Profiling of types and values used by JIT code. DFG_JIT depends on it, but you
942 can enable it manually with DFG turned off if you want to use it as a standalone
943 profiler. In that case, you probably want to also enable VERBOSE_VALUE_PROFILE
945 #if !defined(ENABLE_VALUE_PROFILER) && ENABLE(DFG_JIT)
946 #define ENABLE_VALUE_PROFILER 1
949 #if !defined(ENABLE_VERBOSE_VALUE_PROFILE) && ENABLE(VALUE_PROFILER)
950 #define ENABLE_VERBOSE_VALUE_PROFILE 0
953 #if !defined(ENABLE_SIMPLE_HEAP_PROFILING)
954 #define ENABLE_SIMPLE_HEAP_PROFILING 0
957 /* Counts uses of write barriers using sampling counters. Be sure to also
958 set ENABLE_SAMPLING_COUNTERS to 1. */
959 #if !defined(ENABLE_WRITE_BARRIER_PROFILING)
960 #define ENABLE_WRITE_BARRIER_PROFILING 0
963 /* Configure the JIT */
964 #if CPU(X86) && COMPILER(MSVC)
965 #define JSC_HOST_CALL __fastcall
966 #elif CPU(X86) && COMPILER(GCC)
967 #define JSC_HOST_CALL __attribute__ ((fastcall))
969 #define JSC_HOST_CALL
972 /* Configure the interpreter */
973 #if COMPILER(GCC) || (RVCT_VERSION_AT_LEAST(4, 0, 0, 0) && defined(__GNUC__))
974 #define HAVE_COMPUTED_GOTO 1
977 /* Determine if we need to enable Computed Goto Opcodes or not: */
978 #if HAVE(COMPUTED_GOTO) && ENABLE(LLINT)
979 #define ENABLE_COMPUTED_GOTO_OPCODES 1
982 /* Regular Expression Tracing - Set to 1 to trace RegExp's in jsc. Results dumped at exit */
983 #define ENABLE_REGEXP_TRACING 0
985 /* Yet Another Regex Runtime - turned on by default for JIT enabled ports. */
986 #if !defined(ENABLE_YARR_JIT) && (ENABLE(JIT) || ENABLE(LLINT_C_LOOP)) && !PLATFORM(CHROMIUM) && !(OS(QNX) && PLATFORM(QT))
987 #define ENABLE_YARR_JIT 1
989 /* Setting this flag compares JIT results with interpreter results. */
990 #define ENABLE_YARR_JIT_DEBUG 0
993 /* If either the JIT or the RegExp JIT is enabled, then the Assembler must be
995 #if ENABLE(JIT) || ENABLE(YARR_JIT)
996 #if defined(ENABLE_ASSEMBLER) && !ENABLE_ASSEMBLER
997 #error "Cannot enable the JIT or RegExp JIT without enabling the Assembler"
999 #undef ENABLE_ASSEMBLER
1000 #define ENABLE_ASSEMBLER 1
1004 /* Pick which allocator to use; we only need an executable allocator if the assembler is compiled in.
1005 On x86-64 we use a single fixed mmap, on other platforms we mmap on demand. */
1006 #if ENABLE(ASSEMBLER)
1007 #if CPU(X86_64) || PLATFORM(IOS)
1008 #define ENABLE_EXECUTABLE_ALLOCATOR_FIXED 1
1010 #define ENABLE_EXECUTABLE_ALLOCATOR_DEMAND 1
1014 #if !defined(ENABLE_PAN_SCROLLING) && OS(WINDOWS)
1015 #define ENABLE_PAN_SCROLLING 1
1018 /*Add other platforms as they update their platfrom specific code to handle TextRun's with 8 bit data. */
1020 #define ENABLE_8BIT_TEXTRUN 1
1023 /* Use the QXmlStreamReader implementation for XMLDocumentParser */
1024 /* Use the QXmlQuery implementation for XSLTProcessor */
1027 #define WTF_USE_QXMLSTREAM 1
1028 #define WTF_USE_QXMLQUERY 1
1032 /* Accelerated compositing */
1033 #if PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(QT) || (PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(WIN_CAIRO))
1034 #define WTF_USE_ACCELERATED_COMPOSITING 1
1037 #if PLATFORM(MAC) || PLATFORM(IOS)
1038 #define ENABLE_CSS_IMAGE_SET 1
1041 #if ENABLE(WEBGL) && !defined(WTF_USE_3D_GRAPHICS)
1042 #define WTF_USE_3D_GRAPHICS 1
1045 /* Qt always uses Texture Mapper */
1047 #define WTF_USE_TEXTURE_MAPPER 1
1050 #if USE(TEXTURE_MAPPER) && USE(3D_GRAPHICS) && !defined(WTF_USE_TEXTURE_MAPPER_GL)
1051 #define WTF_USE_TEXTURE_MAPPER_GL 1
1054 /* Compositing on the UI-process in WebKit2 */
1055 #if USE(3D_GRAPHICS) && PLATFORM(QT)
1056 #define WTF_USE_COORDINATED_GRAPHICS 1
1059 #if PLATFORM(MAC) || PLATFORM(IOS)
1060 #define WTF_USE_PROTECTION_SPACE_AUTH_CALLBACK 1
1063 #if !ENABLE(NETSCAPE_PLUGIN_API) || (ENABLE(NETSCAPE_PLUGIN_API) && ((OS(UNIX) && (PLATFORM(GTK) || PLATFORM(QT) || PLATFORM(WX))) || PLATFORM(EFL)))
1064 #define ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH 1
1067 #if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
1068 #define ENABLE_THREADED_SCROLLING 1
1071 /* Set up a define for a common error that is intended to cause a build error -- thus the space after Error. */
1072 #define WTF_PLATFORM_CFNETWORK Error USE_macro_should_be_used_with_CFNETWORK
1074 /* FIXME: Eventually we should enable this for all platforms and get rid of the define. */
1075 #if PLATFORM(IOS) || PLATFORM(MAC) || PLATFORM(WIN) || PLATFORM(QT) || PLATFORM(GTK) || PLATFORM(EFL)
1076 #define WTF_USE_PLATFORM_STRATEGIES 1
1080 #define WTF_USE_CROSS_PLATFORM_CONTEXT_MENUS 1
1083 #if PLATFORM(MAC) && HAVE(ACCESSIBILITY)
1084 #define WTF_USE_ACCESSIBILITY_CONTEXT_MENUS 1
1088 #define ENABLE_BRANCH_COMPACTION 1
1091 #if !defined(ENABLE_THREADING_LIBDISPATCH) && HAVE(DISPATCH_H)
1092 #define ENABLE_THREADING_LIBDISPATCH 1
1093 #elif !defined(ENABLE_THREADING_OPENMP) && defined(_OPENMP)
1094 #define ENABLE_THREADING_OPENMP 1
1095 #elif !defined(THREADING_GENERIC)
1096 #define ENABLE_THREADING_GENERIC 1
1100 #include <wtf/gobject/GTypedefs.h>
1103 /* FIXME: This define won't be needed once #27551 is fully landed. However,
1104 since most ports try to support sub-project independence, adding new headers
1105 to WTF causes many ports to break, and so this way we can address the build
1106 breakages one port at a time. */
1107 #if !defined(WTF_USE_EXPORT_MACROS) && (PLATFORM(MAC) || PLATFORM(QT) || PLATFORM(WX))
1108 #define WTF_USE_EXPORT_MACROS 1
1111 #if !defined(WTF_USE_EXPORT_MACROS_FOR_TESTING) && (PLATFORM(GTK) || PLATFORM(WIN))
1112 #define WTF_USE_EXPORT_MACROS_FOR_TESTING 1
1115 #if (PLATFORM(QT) && !OS(DARWIN) && !OS(WINDOWS)) || PLATFORM(GTK) || PLATFORM(EFL)
1116 #define WTF_USE_UNIX_DOMAIN_SOCKETS 1
1119 #if !defined(ENABLE_COMPARE_AND_SWAP) && (OS(WINDOWS) || (COMPILER(GCC) && (CPU(X86) || CPU(X86_64) || CPU(ARM_THUMB2))))
1120 #define ENABLE_COMPARE_AND_SWAP 1
1123 #define ENABLE_OBJECT_MARK_LOGGING 0
1125 #if !defined(ENABLE_PARALLEL_GC) && !ENABLE(OBJECT_MARK_LOGGING) && (PLATFORM(MAC) || PLATFORM(IOS) || PLATFORM(BLACKBERRY) || PLATFORM(GTK)) && ENABLE(COMPARE_AND_SWAP)
1126 #define ENABLE_PARALLEL_GC 1
1128 // Parallel GC is temporarily disabled on Qt because of regular crashes, see https://bugs.webkit.org/show_bug.cgi?id=90957 for details
1129 #define ENABLE_PARALLEL_GC 0
1132 #if !defined(ENABLE_GC_VALIDATION) && !defined(NDEBUG)
1133 #define ENABLE_GC_VALIDATION 1
1136 #if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
1137 #define WTF_USE_AVFOUNDATION 1
1140 #if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
1141 #define WTF_USE_COREMEDIA 1
1144 #if PLATFORM(MAC) && !PLATFORM(IOS) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1090
1145 #define HAVE_AVFOUNDATION_TEXT_TRACK_SUPPORT 1
1146 #define ENABLE_ENCRYPTED_MEDIA_V2 1
1149 #if PLATFORM(MAC) || PLATFORM(GTK) || PLATFORM(EFL) || (PLATFORM(WIN) && !OS(WINCE) && !PLATFORM(WIN_CAIRO)) || PLATFORM(BLACKBERRY)
1150 #define WTF_USE_REQUEST_ANIMATION_FRAME_TIMER 1
1153 #if PLATFORM(MAC) || PLATFORM(BLACKBERRY)
1154 #define WTF_USE_REQUEST_ANIMATION_FRAME_DISPLAY_MONITOR 1
1157 #if PLATFORM(MAC) && (PLATFORM(IOS) || __MAC_OS_X_VERSION_MIN_REQUIRED >= 1070)
1158 #define HAVE_INVERTED_WHEEL_EVENTS 1
1162 #define WTF_USE_COREAUDIO 1
1165 #if !defined(WTF_USE_V8) && PLATFORM(CHROMIUM)
1166 #define WTF_USE_V8 1
1169 /* Not using V8 implies using JSC and vice versa */
1171 #define WTF_USE_JSC 1
1174 #if ENABLE(NOTIFICATIONS) && PLATFORM(MAC)
1175 #define ENABLE_TEXT_NOTIFICATIONS_ONLY 1
1178 #if !defined(WTF_USE_ZLIB) && !PLATFORM(QT)
1179 #define WTF_USE_ZLIB 1
1183 #include <qglobal.h>
1184 #if defined(QT_OPENGL_ES_2) && !defined(WTF_USE_OPENGL_ES_2)
1185 #define WTF_USE_OPENGL_ES_2 1
1189 #if !PLATFORM(IOS) && PLATFORM(MAC) && __MAC_OS_X_VERSION_MIN_REQUIRED >= 1080
1190 #define WTF_USE_CONTENT_FILTERING 1
1193 #endif /* WTF_Platform_h */