]>
git.saurik.com Git - apple/javascriptcore.git/blob - wtf/Platform.h
2 * Copyright (C) 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 * Copyright (C) 2007-2009 Torch Mobile, Inc.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
14 * THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY
15 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
17 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR
18 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27 #ifndef WTF_Platform_h
28 #define WTF_Platform_h
30 /* ==== PLATFORM handles OS, operating environment, graphics API, and
31 CPU. This macro will be phased out in favor of platform adaptation
32 macros, policy decision macros, and top-level port definitions. ==== */
33 #define PLATFORM(WTF_FEATURE) (defined WTF_PLATFORM_##WTF_FEATURE && WTF_PLATFORM_##WTF_FEATURE)
36 /* ==== Platform adaptation macros: these describe properties of the target environment. ==== */
38 /* COMPILER() - the compiler being used to build the project */
39 #define COMPILER(WTF_FEATURE) (defined WTF_COMPILER_##WTF_FEATURE && WTF_COMPILER_##WTF_FEATURE)
40 /* CPU() - the target CPU architecture */
41 #define CPU(WTF_FEATURE) (defined WTF_CPU_##WTF_FEATURE && WTF_CPU_##WTF_FEATURE)
42 /* HAVE() - specific system features (headers, functions or similar) that are present or not */
43 #define HAVE(WTF_FEATURE) (defined HAVE_##WTF_FEATURE && HAVE_##WTF_FEATURE)
44 /* OS() - underlying operating system; only to be used for mandated low-level services like
45 virtual memory, not to choose a GUI toolkit */
46 #define OS(WTF_FEATURE) (defined WTF_OS_##WTF_FEATURE && WTF_OS_##WTF_FEATURE)
49 /* ==== Policy decision macros: these define policy choices for a particular port. ==== */
51 /* USE() - use a particular third-party library or optional OS service */
52 #define USE(WTF_FEATURE) (defined WTF_USE_##WTF_FEATURE && WTF_USE_##WTF_FEATURE)
53 /* ENABLE() - turn on a specific feature of WebKit */
54 #define ENABLE(WTF_FEATURE) (defined ENABLE_##WTF_FEATURE && ENABLE_##WTF_FEATURE)
58 /* ==== COMPILER() - the compiler being used to build the project ==== */
60 /* COMPILER(MSVC) Microsoft Visual C++ */
61 /* COMPILER(MSVC7) Microsoft Visual C++ v7 or lower*/
63 #define WTF_COMPILER_MSVC 1
65 #define WTF_COMPILER_MSVC7 1
69 /* COMPILER(RVCT) - ARM RealView Compilation Tools */
70 #if defined(__CC_ARM) || defined(__ARMCC__)
71 #define WTF_COMPILER_RVCT 1
74 /* COMPILER(GCC) - GNU Compiler Collection */
75 /* --gnu option of the RVCT compiler also defines __GNUC__ */
76 #if defined(__GNUC__) && !COMPILER(RVCT)
77 #define WTF_COMPILER_GCC 1
78 #define GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
81 /* COMPILER(MINGW) - MinGW GCC */
82 #if defined(MINGW) || defined(__MINGW32__)
83 #define WTF_COMPILER_MINGW 1
86 /* COMPILER(WINSCW) - CodeWarrior for Symbian emulator */
87 #if defined(__WINSCW__)
88 #define WTF_COMPILER_WINSCW 1
93 /* ==== CPU() - the target CPU architecture ==== */
95 /* This also defines CPU(BIG_ENDIAN) or CPU(MIDDLE_ENDIAN) or neither, as appropriate. */
97 /* CPU(ALPHA) - DEC Alpha */
98 #if defined(__alpha__)
99 #define WTF_CPU_ALPHA 1
102 /* CPU(IA64) - Itanium / IA-64 */
103 #if defined(__ia64__)
104 #define WTF_CPU_IA64 1
107 /* CPU(PPC) - PowerPC 32-bit */
108 #if defined(__ppc__) \
109 || defined(__PPC__) \
110 || defined(__powerpc__) \
111 || defined(__powerpc) \
112 || defined(__POWERPC__) \
115 #define WTF_CPU_PPC 1
116 #define WTF_CPU_BIG_ENDIAN 1
119 /* CPU(PPC64) - PowerPC 64-bit */
120 #if defined(__ppc64__) \
121 || defined(__PPC64__)
122 #define WTF_CPU_PPC64 1
123 #define WTF_CPU_BIG_ENDIAN 1
126 /* CPU(SH4) - SuperH SH-4 */
128 #define WTF_CPU_SH4 1
131 /* CPU(SPARC32) - SPARC 32-bit */
132 #if defined(__sparc) && !defined(__arch64__) || defined(__sparcv8)
133 #define WTF_CPU_SPARC32 1
134 #define WTF_CPU_BIG_ENDIAN 1
137 /* CPU(SPARC64) - SPARC 64-bit */
138 #if defined(__sparc__) && defined(__arch64__) || defined (__sparcv9)
139 #define WTF_CPU_SPARC64 1
140 #define WTF_CPU_BIG_ENDIAN 1
143 /* CPU(SPARC) - any SPARC, true for CPU(SPARC32) and CPU(SPARC64) */
144 #if CPU(SPARC32) || CPU(SPARC64)
145 #define WTF_CPU_SPARC
148 /* CPU(X86) - i386 / x86 32-bit */
149 #if defined(__i386__) \
151 || defined(_M_IX86) \
153 || defined(__THW_INTEL)
154 #define WTF_CPU_X86 1
157 /* CPU(X86_64) - AMD64 / Intel64 / x86_64 64-bit */
158 #if defined(__x86_64__) \
160 #define WTF_CPU_X86_64 1
163 /* CPU(ARM) - ARM, any version*/
166 #define WTF_CPU_ARM 1
168 #if defined(__ARMEB__)
169 #define WTF_CPU_BIG_ENDIAN 1
171 #elif !defined(__ARM_EABI__) \
172 && !defined(__EABI__) \
173 && !defined(__VFP_FP__) \
175 #define WTF_CPU_MIDDLE_ENDIAN 1
179 #define WTF_ARM_ARCH_AT_LEAST(N) (CPU(ARM) && WTF_ARM_ARCH_VERSION >= N)
181 /* Set WTF_ARM_ARCH_VERSION */
182 #if defined(__ARM_ARCH_4__) \
183 || defined(__ARM_ARCH_4T__) \
184 || defined(__MARM_ARMV4__) \
186 #define WTF_ARM_ARCH_VERSION 4
188 #elif defined(__ARM_ARCH_5__) \
189 || defined(__ARM_ARCH_5T__) \
190 || defined(__ARM_ARCH_5E__) \
191 || defined(__ARM_ARCH_5TE__) \
192 || defined(__ARM_ARCH_5TEJ__) \
193 || defined(__MARM_ARMV5__)
194 #define WTF_ARM_ARCH_VERSION 5
196 #elif defined(__ARM_ARCH_6__) \
197 || defined(__ARM_ARCH_6J__) \
198 || defined(__ARM_ARCH_6K__) \
199 || defined(__ARM_ARCH_6Z__) \
200 || defined(__ARM_ARCH_6ZK__) \
201 || defined(__ARM_ARCH_6T2__) \
202 || defined(__ARMV6__)
203 #define WTF_ARM_ARCH_VERSION 6
205 #elif defined(__ARM_ARCH_7A__) \
206 || defined(__ARM_ARCH_7R__)
207 #define WTF_ARM_ARCH_VERSION 7
209 /* RVCT sets _TARGET_ARCH_ARM */
210 #elif defined(__TARGET_ARCH_ARM)
211 #define WTF_ARM_ARCH_VERSION __TARGET_ARCH_ARM
214 #define WTF_ARM_ARCH_VERSION 0
218 /* Set WTF_THUMB_ARCH_VERSION */
219 #if defined(__ARM_ARCH_4T__)
220 #define WTF_THUMB_ARCH_VERSION 1
222 #elif defined(__ARM_ARCH_5T__) \
223 || defined(__ARM_ARCH_5TE__) \
224 || defined(__ARM_ARCH_5TEJ__)
225 #define WTF_THUMB_ARCH_VERSION 2
227 #elif defined(__ARM_ARCH_6J__) \
228 || defined(__ARM_ARCH_6K__) \
229 || defined(__ARM_ARCH_6Z__) \
230 || defined(__ARM_ARCH_6ZK__) \
231 || defined(__ARM_ARCH_6M__)
232 #define WTF_THUMB_ARCH_VERSION 3
234 #elif defined(__ARM_ARCH_6T2__) \
235 || defined(__ARM_ARCH_7__) \
236 || defined(__ARM_ARCH_7A__) \
237 || defined(__ARM_ARCH_7R__) \
238 || defined(__ARM_ARCH_7M__)
239 #define WTF_THUMB_ARCH_VERSION 4
241 /* RVCT sets __TARGET_ARCH_THUMB */
242 #elif defined(__TARGET_ARCH_THUMB)
243 #define WTF_THUMB_ARCH_VERSION __TARGET_ARCH_THUMB
246 #define WTF_THUMB_ARCH_VERSION 0
250 /* CPU(ARMV5_OR_LOWER) - ARM instruction set v5 or earlier */
251 /* On ARMv5 and below the natural alignment is required.
252 And there are some other differences for v5 or earlier. */
253 #if !defined(ARMV5_OR_LOWER) && !WTF_ARM_ARCH_AT_LEAST(6)
254 #define WTF_CPU_ARMV5_OR_LOWER 1
258 /* CPU(ARM_TRADITIONAL) - Thumb2 is not available, only traditional ARM (v4 or greater) */
259 /* CPU(ARM_THUMB2) - Thumb2 instruction set is available */
260 /* Only one of these will be defined. */
261 #if !defined(WTF_CPU_ARM_TRADITIONAL) && !defined(WTF_CPU_ARM_THUMB2)
262 # if defined(thumb2) || defined(__thumb2__) \
263 || ((defined(__thumb) || defined(__thumb__)) && WTF_THUMB_ARCH_VERSION == 4)
264 # define WTF_CPU_ARM_TRADITIONAL 0
265 # define WTF_CPU_ARM_THUMB2 1
266 # elif WTF_ARM_ARCH_AT_LEAST(4)
267 # define WTF_CPU_ARM_TRADITIONAL 1
268 # define WTF_CPU_ARM_THUMB2 0
270 # error "Not supported ARM architecture"
272 #elif CPU(ARM_TRADITIONAL) && CPU(ARM_THUMB2) /* Sanity Check */
273 # error "Cannot use both of WTF_CPU_ARM_TRADITIONAL and WTF_CPU_ARM_THUMB2 platforms"
274 #endif /* !defined(WTF_CPU_ARM_TRADITIONAL) && !defined(WTF_CPU_ARM_THUMB2) */
280 /* ==== OS() - underlying operating system; only to be used for mandated low-level services like
281 virtual memory, not to choose a GUI toolkit ==== */
283 /* OS(ANDROID) - Android */
285 #define WTF_OS_ANDROID 1
293 /* OS(DARWIN) - Any Darwin-based OS, including Mac OS X and iPhone OS */
295 #define WTF_OS_DARWIN 1
297 /* FIXME: BUILDING_ON_.., and TARGETING... macros should be folded into the OS() system */
298 #include <AvailabilityMacros.h>
299 #if !defined(MAC_OS_X_VERSION_10_5) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
300 #define BUILDING_ON_TIGER 1
301 #elif !defined(MAC_OS_X_VERSION_10_6) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
302 #define BUILDING_ON_LEOPARD 1
303 #elif !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_7
304 #define BUILDING_ON_SNOW_LEOPARD 1
306 #if !defined(MAC_OS_X_VERSION_10_5) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_5
307 #define TARGETING_TIGER 1
308 #elif !defined(MAC_OS_X_VERSION_10_6) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_6
309 #define TARGETING_LEOPARD 1
310 #elif !defined(MAC_OS_X_VERSION_10_7) || MAC_OS_X_VERSION_MIN_REQUIRED < MAC_OS_X_VERSION_10_7
311 #define TARGETING_SNOW_LEOPARD 1
313 #include <Availability.h>
314 #include <TargetConditionals.h>
318 /* OS(IPHONE_OS) - iPhone OS */
319 /* OS(MAC_OS_X) - Mac OS X (not including iPhone OS) */
320 #if OS(DARWIN) && ((defined(TARGET_OS_EMBEDDED) && TARGET_OS_EMBEDDED) \
321 || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE) \
322 || (defined(TARGET_IPHONE_SIMULATOR) && TARGET_IPHONE_SIMULATOR))
323 #define WTF_OS_IPHONE_OS 1
324 #elif OS(DARWIN) && defined(TARGET_OS_MAC) && TARGET_OS_MAC
325 #define WTF_OS_MAC_OS_X 1
328 /* OS(FREEBSD) - FreeBSD */
330 #define WTF_OS_FREEBSD 1
333 /* OS(HAIKU) - Haiku */
335 #define WTF_OS_HAIKU 1
338 /* OS(LINUX) - Linux */
340 #define WTF_OS_LINUX 1
343 /* OS(NETBSD) - NetBSD */
344 #if defined(__NetBSD__)
345 #define WTF_PLATFORM_NETBSD 1
348 /* OS(OPENBSD) - OpenBSD */
350 #define WTF_OS_OPENBSD 1
354 #if defined(__QNXNTO__)
358 /* OS(SOLARIS) - Solaris */
359 #if defined(sun) || defined(__sun)
360 #define WTF_OS_SOLARIS 1
363 /* OS(WINCE) - Windows CE; note that for this platform OS(WINDOWS) is also defined */
364 #if defined(_WIN32_WCE)
365 #define WTF_OS_WINCE 1
368 /* OS(WINDOWS) - Any version of Windows */
369 #if defined(WIN32) || defined(_WIN32)
370 #define WTF_OS_WINDOWS 1
373 /* OS(SYMBIAN) - Symbian */
374 #if defined (__SYMBIAN32__)
375 /* we are cross-compiling, it is not really windows */
376 #undef WTF_OS_WINDOWS
377 #undef WTF_PLATFORM_WIN
378 #define WTF_OS_SYMBIAN 1
381 /* OS(UNIX) - Any Unix-like system */
396 #define WTF_OS_UNIX 1
399 /* Operating environments */
401 /* FIXME: these are all mixes of OS, operating environment and policy choices. */
402 /* PLATFORM(CHROMIUM) */
406 /* PLATFORM(HAIKU) */
409 #if defined(BUILDING_CHROMIUM__)
410 #define WTF_PLATFORM_CHROMIUM 1
411 #elif defined(BUILDING_QT__)
412 #define WTF_PLATFORM_QT 1
413 #elif defined(BUILDING_WX__)
414 #define WTF_PLATFORM_WX 1
415 #elif defined(BUILDING_GTK__)
416 #define WTF_PLATFORM_GTK 1
417 #elif defined(BUILDING_HAIKU__)
418 #define WTF_PLATFORM_HAIKU 1
420 #define WTF_PLATFORM_MAC 1
422 #define WTF_PLATFORM_WIN 1
425 /* PLATFORM(IPHONE) */
426 /* FIXME: this is sometimes used as an OS switch and sometimes for higher-level things */
427 #if (defined(TARGET_OS_EMBEDDED) && TARGET_OS_EMBEDDED) || (defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE)
428 #define WTF_PLATFORM_IPHONE 1
431 /* PLATFORM(IPHONE_SIMULATOR) */
432 #if defined(TARGET_IPHONE_SIMULATOR) && TARGET_IPHONE_SIMULATOR
433 #define WTF_PLATFORM_IPHONE 1
434 #define WTF_PLATFORM_IPHONE_SIMULATOR 1
436 #define WTF_PLATFORM_IPHONE_SIMULATOR 0
439 #if !defined(WTF_PLATFORM_IPHONE)
440 #define WTF_PLATFORM_IPHONE 0
443 /* PLATFORM(ANDROID) */
444 /* FIXME: this is sometimes used as an OS() switch, and other times to drive
447 #define WTF_PLATFORM_ANDROID 1
450 /* Graphics engines */
452 /* PLATFORM(CG) and PLATFORM(CI) */
453 #define WTF_PLATFORM_CG 1
455 /* PLATFORM(SKIA) for Win/Linux, CG/CI for Mac */
456 #if PLATFORM(CHROMIUM)
457 #define ENABLE_HISTORY_ALWAYS_ASYNC 1
459 #define WTF_PLATFORM_CG 1
460 #define WTF_PLATFORM_CI 1
461 #define WTF_USE_ATSUI 1
462 #define WTF_USE_CORE_TEXT 1
464 #define WTF_PLATFORM_SKIA 1
469 #define WTF_PLATFORM_CAIRO 1
473 /* OS(WINCE) && PLATFORM(QT)
474 We can not determine the endianess at compile time. For
475 Qt for Windows CE the endianess is specified in the
476 device specific makespec
478 #if OS(WINCE) && PLATFORM(QT)
480 # undef WTF_PLATFORM_BIG_ENDIAN
481 # undef WTF_PLATFORM_MIDDLE_ENDIAN
482 # if Q_BYTE_ORDER == Q_BIG_EDIAN
483 # define WTF_PLATFORM_BIG_ENDIAN 1
486 # include <ce_time.h>
489 #if (PLATFORM(IPHONE) || PLATFORM(MAC) || PLATFORM(WIN) || (PLATFORM(QT) && OS(DARWIN) && !ENABLE(SINGLE_THREADED))) && !defined(ENABLE_JSC_MULTIPLE_THREADS)
490 #define ENABLE_JSC_MULTIPLE_THREADS 1
493 /* On Windows, use QueryPerformanceCounter by default */
495 #define WTF_USE_QUERY_PERFORMANCE_COUNTER 1
498 #if OS(WINCE) && !PLATFORM(QT)
499 #undef ENABLE_JSC_MULTIPLE_THREADS
500 #define ENABLE_JSC_MULTIPLE_THREADS 0
501 #define USE_SYSTEM_MALLOC 0
502 #define ENABLE_ICONDATABASE 0
503 #define ENABLE_JAVASCRIPT_DEBUGGER 0
504 #define ENABLE_FTPDIR 0
505 #define ENABLE_PAN_SCROLLING 0
507 #define HAVE_ACCESSIBILITY 0
509 #define NOMINMAX /* Windows min and max conflict with standard macros */
510 #define NOSHLWAPI /* shlwapi.h not available on WinCe */
512 /* MSDN documentation says these functions are provided with uspce.lib. But we cannot find this file. */
513 #define __usp10__ /* disable "usp10.h" */
515 #define _INC_ASSERT /* disable "assert.h" */
518 /* _countof is only included in CE6; for CE5 we need to define it ourself */
520 #define _countof(x) (sizeof(x) / sizeof((x)[0]))
523 #endif /* OS(WINCE) && !PLATFORM(QT) */
526 #define WTF_USE_QT4_UNICODE 1
528 #define WTF_USE_WINCE_UNICODE 1
530 /* The GTK+ Unicode backend is configurable */
532 #define WTF_USE_ICU_UNICODE 1
536 #if PLATFORM(CHROMIUM) && OS(DARWIN)
537 #define WTF_PLATFORM_CF 1
538 #define WTF_USE_PTHREADS 1
539 #define HAVE_PTHREAD_RWLOCK 1
542 #define DONT_FINALIZE_ON_MAIN_THREAD 1
544 #if PLATFORM(QT) && OS(DARWIN)
545 #define WTF_PLATFORM_CF 1
548 #define ENABLE_CONTEXT_MENUS 0
549 #define ENABLE_DRAG_SUPPORT 0
550 #define ENABLE_FTPDIR 1
551 #define ENABLE_GEOLOCATION 1
552 #define ENABLE_ICONDATABASE 0
553 #define ENABLE_INSPECTOR 0
555 #define ENABLE_MAC_JAVA_BRIDGE 0
556 #define ENABLE_NETSCAPE_PLUGIN_API 0
557 #define ENABLE_ORIENTATION_EVENTS 1
558 #define ENABLE_RANGETYPE_AS_TEXT 1
559 #define ENABLE_REPAINT_THROTTLING 1
560 #define ENABLE_RESPECT_EXIF_ORIENTATION 1
561 #define ENABLE_YARR 0
562 #define ENABLE_YARR_JIT 0
563 #define HAVE_PTHREAD_RWLOCK 1
564 #define HAVE_READLINE 1
565 #define HAVE_RUNLOOP_TIMER 0
566 #define WTF_PLATFORM_CF 1
567 #define WTF_USE_PTHREADS 1
568 #define WTF_USE_WEB_THREAD 1
570 #if PLATFORM(ANDROID)
571 #define WTF_USE_PTHREADS 1
572 #define WTF_PLATFORM_SGL 1
573 #define USE_SYSTEM_MALLOC 1
574 #define ENABLE_MAC_JAVA_BRIDGE 1
575 #define LOG_DISABLED 1
576 /* Prevents Webkit from drawing the caret in textfields and textareas
577 This prevents unnecessary invals. */
578 #define ENABLE_TEXT_CARET 1
579 #define ENABLE_JAVASCRIPT_DEBUGGER 0
583 #define WTF_USE_WININET 1
587 #define ENABLE_ASSEMBLER 1
589 #define WTF_PLATFORM_CF 1
595 #define WTF_USE_PTHREADS 1
596 #define HAVE_PTHREAD_RWLOCK 1
601 #define HAVE_POSIX_MEMALIGN 1
602 #define WTF_USE_CURL 1
603 #define WTF_USE_PTHREADS 1
604 #define HAVE_PTHREAD_RWLOCK 1
605 #define USE_SYSTEM_MALLOC 1
606 #define ENABLE_NETSCAPE_PLUGIN_API 0
609 #if !defined(HAVE_ACCESSIBILITY)
610 #define HAVE_ACCESSIBILITY 1
611 #endif /* !defined(HAVE_ACCESSIBILITY) */
613 #if OS(UNIX) && !OS(SYMBIAN)
614 #define HAVE_SIGNAL_H 1
617 #if !OS(WINDOWS) && !OS(SOLARIS) && !OS(QNX) \
618 && !OS(SYMBIAN) && !OS(HAIKU) && !OS(RVCT) \
620 #define HAVE_TM_GMTOFF 1
621 #define HAVE_TM_ZONE 1
622 #define HAVE_TIMEGM 1
627 #define HAVE_ERRNO_H 1
628 #define HAVE_LANGINFO_H 1
630 #define HAVE_MERGESORT 1
632 #define HAVE_STRINGS_H 1
633 #define HAVE_SYS_PARAM_H 1
634 #define HAVE_SYS_TIME_H 1
635 #define HAVE_SYS_TIMEB_H 1
637 #if !defined(BUILDING_ON_TIGER) && !defined(BUILDING_ON_LEOPARD)
639 #define HAVE_DISPATCH_H 1
644 #define HAVE_MADV_FREE 1
645 #define HAVE_PTHREAD_SETNAME_NP 1
650 #define HAVE_ERRNO_H 0
652 #define HAVE_SYS_TIMEB_H 1
654 #define HAVE_VIRTUALALLOC 1
658 #define HAVE_ERRNO_H 1
662 #define HAVE_SYS_TIME_H 1
663 #define HAVE_STRINGS_H 1
666 #define HAVE_SYS_PARAM_H 1
671 #define HAVE_ERRNO_H 1
674 #define HAVE_STRINGS_H 1
675 #define HAVE_SYS_PARAM_H 1
676 #define HAVE_SYS_TIME_H 1
680 #define HAVE_ERRNO_H 1
681 #define HAVE_LANGINFO_H 0
684 #define HAVE_STRINGS_H 1
685 #define HAVE_SYS_PARAM_H 1
686 #define HAVE_SYS_TIME_H 1
690 /* FIXME: is this actually used or do other platforms generate their own config.h? */
692 #define HAVE_ERRNO_H 1
693 /* As long as Haiku doesn't have a complete support of locale this will be disabled. */
695 #define HAVE_LANGINFO_H 1
699 #define HAVE_STRINGS_H 1
700 #define HAVE_SYS_PARAM_H 1
701 #define HAVE_SYS_TIME_H 1
705 /* ENABLE macro defaults */
707 /* fastMalloc match validation allows for runtime verification that
708 new is matched by delete, fastMalloc is matched by fastFree, etc. */
709 #if !defined(ENABLE_FAST_MALLOC_MATCH_VALIDATION)
710 #define ENABLE_FAST_MALLOC_MATCH_VALIDATION 0
713 #if !defined(ENABLE_ICONDATABASE)
714 #define ENABLE_ICONDATABASE 1
717 #if !defined(ENABLE_DATABASE)
718 #define ENABLE_DATABASE 1
721 #if !defined(ENABLE_JAVASCRIPT_DEBUGGER)
722 #define ENABLE_JAVASCRIPT_DEBUGGER 1
725 #if !defined(ENABLE_FTPDIR)
726 #define ENABLE_FTPDIR 1
729 #if !defined(ENABLE_CONTEXT_MENUS)
730 #define ENABLE_CONTEXT_MENUS 1
733 #if !defined(ENABLE_DRAG_SUPPORT)
734 #define ENABLE_DRAG_SUPPORT 1
737 #if !defined(ENABLE_DASHBOARD_SUPPORT)
738 #define ENABLE_DASHBOARD_SUPPORT 0
741 #if !defined(ENABLE_GEOLOCATION_PERMISSION_CACHE)
742 #define ENABLE_GEOLOCATION_PERMISSION_CACHE 0
745 #if !defined(ENABLE_INSPECTOR)
746 #define ENABLE_INSPECTOR 1
749 #if !defined(ENABLE_MAC_JAVA_BRIDGE)
750 #define ENABLE_MAC_JAVA_BRIDGE 0
753 #if !defined(ENABLE_NETSCAPE_PLUGIN_API)
754 #define ENABLE_NETSCAPE_PLUGIN_API 1
757 #if !defined(WTF_USE_PLUGIN_HOST_PROCESS)
758 #define WTF_USE_PLUGIN_HOST_PROCESS 0
761 #if !defined(ENABLE_ORIENTATION_EVENTS)
762 #define ENABLE_ORIENTATION_EVENTS 0
765 #if !defined(ENABLE_RESPECT_EXIF_ORIENTATION)
766 #define ENABLE_RESPECT_EXIF_ORIENTATION 0
769 #if !defined(ENABLE_OPCODE_STATS)
770 #define ENABLE_OPCODE_STATS 0
773 #define ENABLE_SAMPLING_COUNTERS 0
774 #define ENABLE_SAMPLING_FLAGS 0
775 #define ENABLE_OPCODE_SAMPLING 0
776 #define ENABLE_CODEBLOCK_SAMPLING 0
777 #if ENABLE(CODEBLOCK_SAMPLING) && !ENABLE(OPCODE_SAMPLING)
778 #error "CODEBLOCK_SAMPLING requires OPCODE_SAMPLING"
780 #if ENABLE(OPCODE_SAMPLING) || ENABLE(SAMPLING_FLAGS)
781 #define ENABLE_SAMPLING_THREAD 1
784 #if !defined(ENABLE_GEOLOCATION)
785 #define ENABLE_GEOLOCATION 0
788 #if !defined(ENABLE_NOTIFICATIONS)
789 #define ENABLE_NOTIFICATIONS 0
792 #define ENABLE_TEXT_CARET 0
794 #if !defined(ENABLE_TEXT_CARET)
795 #define ENABLE_TEXT_CARET 1
798 #if !defined(ENABLE_ON_FIRST_TEXTAREA_FOCUS_SELECT_ALL)
799 #define ENABLE_ON_FIRST_TEXTAREA_FOCUS_SELECT_ALL 0
802 #if !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32) && !defined(WTF_USE_JSVALUE32_64)
803 #if (CPU(X86_64) && (OS(UNIX) || OS(WINDOWS))) || CPU(IA64) || CPU(ALPHA)
804 #define WTF_USE_JSVALUE64 1
805 #elif CPU(ARM) && !PLATFORM(IPHONE) || CPU(PPC64) || (PLATFORM(IPHONE) && defined(WTF_ARM_ARCH_VERSION) && WTF_ARM_ARCH_VERSION == 6 && !defined(__llvm__))
806 /* FIXME: <rdar://problem/7478149> gcc-4.2 compiler bug with USE(JSVALUE32_64) and armv6 target */
807 #define WTF_USE_JSVALUE32 1
808 #elif OS(WINDOWS) && COMPILER(MINGW)
809 /* Using JSVALUE32_64 causes padding/alignement issues for JITStubArg
810 on MinGW. See https://bugs.webkit.org/show_bug.cgi?id=29268 */
811 #define WTF_USE_JSVALUE32 1
813 #define WTF_USE_JSVALUE32_64 1
815 #endif /* !defined(WTF_USE_JSVALUE64) && !defined(WTF_USE_JSVALUE32) && !defined(WTF_USE_JSVALUE32_64) */
817 #if !defined(ENABLE_REPAINT_THROTTLING)
818 #define ENABLE_REPAINT_THROTTLING 0
821 #if !defined(ENABLE_JIT)
823 /* The JIT is tested & working on x86_64 Mac */
824 #if CPU(X86_64) && PLATFORM(MAC)
826 /* The JIT is tested & working on x86 Mac */
827 #elif CPU(X86) && PLATFORM(MAC)
829 #define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1
830 #elif CPU(ARM_THUMB2) && PLATFORM(IPHONE)
832 /* The JIT is tested & working on x86 Windows */
833 #elif CPU(X86) && PLATFORM(WIN)
838 #if CPU(X86_64) && OS(DARWIN)
840 #elif CPU(X86) && OS(DARWIN)
842 #define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1
843 #elif CPU(X86) && OS(WINDOWS) && COMPILER(MINGW) && GCC_VERSION >= 40100
845 #define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1
846 #elif CPU(X86) && OS(WINDOWS) && COMPILER(MSVC)
848 #define WTF_USE_JIT_STUB_ARGUMENT_REGISTER 1
849 #elif CPU(X86) && OS(LINUX) && GCC_VERSION >= 40100
851 #define WTF_USE_JIT_STUB_ARGUMENT_VA_LIST 1
852 #elif CPU(X86_64) && OS(LINUX) && GCC_VERSION >= 40100
854 #elif CPU(ARM_TRADITIONAL) && OS(LINUX)
857 #endif /* PLATFORM(QT) */
859 #endif /* !defined(ENABLE_JIT) */
862 #ifndef ENABLE_JIT_OPTIMIZE_CALL
863 #define ENABLE_JIT_OPTIMIZE_CALL 1
865 #ifndef ENABLE_JIT_OPTIMIZE_NATIVE_CALL
866 #define ENABLE_JIT_OPTIMIZE_NATIVE_CALL 1
868 #ifndef ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS
869 #define ENABLE_JIT_OPTIMIZE_PROPERTY_ACCESS 1
871 #ifndef ENABLE_JIT_OPTIMIZE_METHOD_CALLS
872 #define ENABLE_JIT_OPTIMIZE_METHOD_CALLS 1
876 #if CPU(X86) && COMPILER(MSVC)
877 #define JSC_HOST_CALL __fastcall
878 #elif CPU(X86) && COMPILER(GCC)
879 #define JSC_HOST_CALL __attribute__ ((fastcall))
881 #define JSC_HOST_CALL
884 #if COMPILER(GCC) && !ENABLE(JIT)
885 #define HAVE_COMPUTED_GOTO 1
888 #if ENABLE(JIT) && defined(COVERAGE)
889 #define WTF_USE_INTERPRETER 0
891 #define WTF_USE_INTERPRETER 1
894 /* Yet Another Regex Runtime. */
895 #if !defined(ENABLE_YARR_JIT)
897 /* YARR supports x86 & x86-64, and has been tested on Mac and Windows. */
898 #if (CPU(X86) && PLATFORM(MAC)) \
899 || (CPU(X86_64) && PLATFORM(MAC)) \
900 || (CPU(ARM_THUMB2) && PLATFORM(IPHONE)) \
901 || (CPU(X86) && PLATFORM(WIN))
902 #define ENABLE_YARR 1
903 #define ENABLE_YARR_JIT 1
907 #if (CPU(X86) && OS(WINDOWS) && COMPILER(MINGW) && GCC_VERSION >= 40100) \
908 || (CPU(X86) && OS(WINDOWS) && COMPILER(MSVC)) \
909 || (CPU(X86) && OS(LINUX) && GCC_VERSION >= 40100) \
910 || (CPU(X86_64) && OS(LINUX) && GCC_VERSION >= 40100) \
911 || (CPU(ARM_TRADITIONAL) && OS(LINUX))
912 #define ENABLE_YARR 1
913 #define ENABLE_YARR_JIT 1
917 #endif /* !defined(ENABLE_YARR_JIT) */
920 #if ENABLE(YARR_JIT) && !ENABLE(YARR)
921 #error "YARR_JIT requires YARR"
924 #if ENABLE(JIT) || ENABLE(YARR_JIT)
925 #define ENABLE_ASSEMBLER 1
927 /* Setting this flag prevents the assembler from using RWX memory; this may improve
928 security but currectly comes at a significant performance cost. */
929 #define ENABLE_ASSEMBLER_WX_EXCLUSIVE 1
931 #if !defined(ENABLE_PAN_SCROLLING) && OS(WINDOWS)
932 #define ENABLE_PAN_SCROLLING 1
935 /* Use the QXmlStreamReader implementation for XMLTokenizer */
936 /* Use the QXmlQuery implementation for XSLTProcessor */
938 #define WTF_USE_QXMLSTREAM 1
939 #define WTF_USE_QXMLQUERY 1
943 #define WTF_USE_FONT_FAST_PATH 1
946 /* Accelerated compositing */
948 #if !defined(BUILDING_ON_TIGER)
949 #define WTF_USE_ACCELERATED_COMPOSITING 1
953 #define WTF_USE_ACCELERATED_COMPOSITING 1
955 /* FIXME: Defining ENABLE_3D_RENDERING here isn't really right, but it's always used with
956 with WTF_USE_ACCELERATED_COMPOSITING, and it allows the feature to be turned on and
959 #include "QuartzCorePresent.h"
960 #if QUARTZCORE_PRESENT
961 #define WTF_USE_ACCELERATED_COMPOSITING 1
962 #define ENABLE_3D_RENDERING 1
967 #define WARN_UNUSED_RETURN __attribute__ ((warn_unused_result))
969 #define WARN_UNUSED_RETURN
972 #if !ENABLE(NETSCAPE_PLUGIN_API) || (ENABLE(NETSCAPE_PLUGIN_API) && ((OS(UNIX) && (PLATFORM(QT) || PLATFORM(WX))) || PLATFORM(GTK)))
973 #define ENABLE_PLUGIN_PACKAGE_SIMPLE_HASH 1
976 /* Set up a define for a common error that is intended to cause a build error -- thus the space after Error. */
977 #define WTF_PLATFORM_CFNETWORK Error USE_macro_should_be_used_with_CFNETWORK
979 #define ENABLE_JSC_ZOMBIES 0
981 #endif /* WTF_Platform_h */