darin | 707988e | 2006-01-16 01:29:54 +0000 | [diff] [blame] | 1 | /* |
darin@apple.com | 7e45de8 | 2014-01-13 02:42:54 +0000 | [diff] [blame] | 2 | * Copyright (C) 2004, 2005, 2006, 2013, 2014 Apple Inc. All rights reserved. |
eric@webkit.org | 8b2edd0 | 2009-09-09 22:35:57 +0000 | [diff] [blame] | 3 | * Copyright (C) 2009 Google Inc. All rights reserved. |
| 4 | * |
darin | 707988e | 2006-01-16 01:29:54 +0000 | [diff] [blame] | 5 | * This library is free software; you can redistribute it and/or |
| 6 | * modify it under the terms of the GNU Library General Public |
| 7 | * License as published by the Free Software Foundation; either |
| 8 | * version 2 of the License, or (at your option) any later version. |
| 9 | * |
| 10 | * This library is distributed in the hope that it will be useful, |
| 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * Library General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU Library General Public License |
| 16 | * along with this library; see the file COPYING.LIB. If not, write to |
ddkilzer | c8eccec | 2007-09-26 02:29:57 +0000 | [diff] [blame] | 17 | * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 18 | * Boston, MA 02110-1301, USA. |
darin | 707988e | 2006-01-16 01:29:54 +0000 | [diff] [blame] | 19 | * |
bfulgham@apple.com | da8c93c | 2013-07-12 19:30:23 +0000 | [diff] [blame] | 20 | */ |
darin | 707988e | 2006-01-16 01:29:54 +0000 | [diff] [blame] | 21 | |
mrobinson@webkit.org | 3fdbc20 | 2014-03-25 17:45:52 +0000 | [diff] [blame] | 22 | #if defined(HAVE_CONFIG_H) && HAVE_CONFIG_H && defined(BUILDING_WITH_CMAKE) |
eric@webkit.org | d99f85b | 2010-05-15 13:37:59 +0000 | [diff] [blame] | 23 | #include "cmakeconfig.h" |
eric@webkit.org | d99f85b | 2010-05-15 13:37:59 +0000 | [diff] [blame] | 24 | #endif |
jmalonzo@webkit.org | 6afc5d4 | 2008-09-04 20:26:16 +0000 | [diff] [blame] | 25 | |
mjs | bb86351 | 2006-05-09 09:27:55 +0000 | [diff] [blame] | 26 | #include <wtf/Platform.h> |
mjs | 3bfb61b | 2006-03-02 09:12:06 +0000 | [diff] [blame] | 27 | |
darin@apple.com | 7e45de8 | 2014-01-13 02:42:54 +0000 | [diff] [blame] | 28 | #if PLATFORM(COCOA) |
mrobinson@webkit.org | 2c91b42 | 2015-05-01 23:38:18 +0000 | [diff] [blame] | 29 | #define USE_FILE_LOCK 1 |
mark.lam@apple.com | f009ae4 | 2013-03-05 15:54:13 +0000 | [diff] [blame] | 30 | #endif |
| 31 | |
paroga@webkit.org | 55e3659 | 2013-06-14 22:49:14 +0000 | [diff] [blame] | 32 | #if PLATFORM(WIN) && !USE(WINGDI) |
bfulgham@apple.com | 8afb3b7 | 2016-03-30 19:36:11 +0000 | [diff] [blame] | 33 | #include "WebCoreHeaderDetection.h" |
jeffm@apple.com | 16e8644 | 2011-08-03 20:15:53 +0000 | [diff] [blame] | 34 | #endif |
| 35 | |
kevino@webkit.org | 531cac3 | 2011-03-15 14:59:20 +0000 | [diff] [blame] | 36 | #include <wtf/ExportMacros.h> |
commit-queue@webkit.org | 6343b72 | 2011-12-15 00:51:42 +0000 | [diff] [blame] | 37 | #include "PlatformExportMacros.h" |
kevino@webkit.org | 531cac3 | 2011-03-15 14:59:20 +0000 | [diff] [blame] | 38 | |
kbalazs@webkit.org | 768684d | 2012-04-12 22:28:03 +0000 | [diff] [blame] | 39 | #include <runtime/JSExportMacros.h> |
kbalazs@webkit.org | 768684d | 2012-04-12 22:28:03 +0000 | [diff] [blame] | 40 | |
mrowe@apple.com | 4d7e81e | 2007-11-20 16:06:23 +0000 | [diff] [blame] | 41 | #ifdef __APPLE__ |
darin | 71e2749 | 2006-01-25 03:35:00 +0000 | [diff] [blame] | 42 | #define HAVE_FUNC_USLEEP 1 |
weinig | f18aae3 | 2006-08-03 21:55:57 +0000 | [diff] [blame] | 43 | #endif /* __APPLE__ */ |
darin | 71e2749 | 2006-01-25 03:35:00 +0000 | [diff] [blame] | 44 | |
mjs@apple.com | acbcc28 | 2010-01-05 08:58:28 +0000 | [diff] [blame] | 45 | #if OS(WINDOWS) |
darin | 707988e | 2006-01-16 01:29:54 +0000 | [diff] [blame] | 46 | |
kevino@webkit.org | 79fbef9 | 2007-11-24 00:52:18 +0000 | [diff] [blame] | 47 | // CURL needs winsock, so don't prevent inclusion of it |
bfulgham@webkit.org | 147773f | 2009-06-12 21:36:08 +0000 | [diff] [blame] | 48 | #if !USE(CURL) |
aroben | fee2e82 | 2007-06-12 21:50:34 +0000 | [diff] [blame] | 49 | #ifndef _WINSOCKAPI_ |
| 50 | #define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h |
| 51 | #endif |
bfulgham@webkit.org | 147773f | 2009-06-12 21:36:08 +0000 | [diff] [blame] | 52 | #endif |
bdash | db30912 | 2006-11-20 12:59:36 +0000 | [diff] [blame] | 53 | |
mjs@apple.com | acbcc28 | 2010-01-05 08:58:28 +0000 | [diff] [blame] | 54 | #endif /* OS(WINDOWS) */ |
weinig | f18aae3 | 2006-08-03 21:55:57 +0000 | [diff] [blame] | 55 | |
achristensen@apple.com | 92a456f | 2014-08-08 18:13:54 +0000 | [diff] [blame] | 56 | // Using CMake with Unix makefiles does not use prefix headers. |
| 57 | #if PLATFORM(MAC) && defined(BUILDING_WITH_CMAKE) |
| 58 | #include "WebCorePrefix.h" |
| 59 | #endif |
| 60 | |
darin | 707988e | 2006-01-16 01:29:54 +0000 | [diff] [blame] | 61 | #ifdef __cplusplus |
| 62 | |
| 63 | // These undefs match up with defines in WebCorePrefix.h for Mac OS X. |
| 64 | // Helps us catch if anyone uses new or delete by accident in code and doesn't include "config.h". |
| 65 | #undef new |
| 66 | #undef delete |
mjs | bb86351 | 2006-05-09 09:27:55 +0000 | [diff] [blame] | 67 | #include <wtf/FastMalloc.h> |
darin | 707988e | 2006-01-16 01:29:54 +0000 | [diff] [blame] | 68 | |
weinig@apple.com | 07737d7 | 2012-02-19 01:08:39 +0000 | [diff] [blame] | 69 | #include <ciso646> |
| 70 | |
darin | 707988e | 2006-01-16 01:29:54 +0000 | [diff] [blame] | 71 | #endif |
eseidel | 864b4dd | 2006-02-24 01:11:00 +0000 | [diff] [blame] | 72 | |
darin | eb0d86d | 2007-10-16 20:13:24 +0000 | [diff] [blame] | 73 | #include <wtf/DisallowCType.h> |
| 74 | |
mrowe@apple.com | fbe724c | 2008-09-03 23:46:54 +0000 | [diff] [blame] | 75 | #if COMPILER(MSVC) |
| 76 | #define SKIP_STATIC_CONSTRUCTORS_ON_MSVC 1 |
laszlo.1.gombos@nokia.com | ae65922 | 2011-11-13 04:37:43 +0000 | [diff] [blame] | 77 | #else |
mrowe@apple.com | fbe724c | 2008-09-03 23:46:54 +0000 | [diff] [blame] | 78 | #define SKIP_STATIC_CONSTRUCTORS_ON_GCC 1 |
eseidel | 864b4dd | 2006-02-24 01:11:00 +0000 | [diff] [blame] | 79 | #endif |
andersca | cd71fdd | 2006-09-14 01:56:44 +0000 | [diff] [blame] | 80 | |
aroben | fee2e82 | 2007-06-12 21:50:34 +0000 | [diff] [blame] | 81 | #if PLATFORM(WIN) |
bfulgham@webkit.org | 5fcb8a1 | 2011-07-13 19:31:52 +0000 | [diff] [blame] | 82 | #if PLATFORM(WIN_CAIRO) |
mrobinson@webkit.org | 2c91b42 | 2015-05-01 23:38:18 +0000 | [diff] [blame] | 83 | #undef USE_CG |
mrobinson@webkit.org | 2c91b42 | 2015-05-01 23:38:18 +0000 | [diff] [blame] | 84 | #define USE_CURL 1 |
bfulgham@webkit.org | 5742b26b | 2009-07-13 18:34:44 +0000 | [diff] [blame] | 85 | #ifndef _WINSOCKAPI_ |
| 86 | #define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h |
| 87 | #endif |
bfulgham@apple.com | b18f31c3 | 2016-10-05 21:16:27 +0000 | [diff] [blame] | 88 | #elif USE(DIRECT2D) |
bfulgham@apple.com | 6f6bf7a | 2016-10-06 18:01:32 +0000 | [diff] [blame] | 89 | #undef USE_CA |
bfulgham@apple.com | b18f31c3 | 2016-10-05 21:16:27 +0000 | [diff] [blame] | 90 | #undef USE_CG |
paroga@webkit.org | 55e3659 | 2013-06-14 22:49:14 +0000 | [diff] [blame] | 91 | #elif !USE(WINGDI) |
mrobinson@webkit.org | 2c91b42 | 2015-05-01 23:38:18 +0000 | [diff] [blame] | 92 | #define USE_CG 1 |
| 93 | #undef USE_CAIRO |
| 94 | #undef USE_CURL |
bfulgham@webkit.org | 5742b26b | 2009-07-13 18:34:44 +0000 | [diff] [blame] | 95 | #endif |
andersca | cd71fdd | 2006-09-14 01:56:44 +0000 | [diff] [blame] | 96 | #endif |
bdash | 880df15 | 2006-11-11 02:55:57 +0000 | [diff] [blame] | 97 | |
zandobersek@gmail.com | 75ce587 | 2017-05-09 11:07:57 +0000 | [diff] [blame] | 98 | #if PLATFORM(MAC) || PLATFORM(WPE) |
mrobinson@webkit.org | 2c91b42 | 2015-05-01 23:38:18 +0000 | [diff] [blame] | 99 | #define USE_NEW_THEME 1 |
darin@apple.com | 7e45de8 | 2014-01-13 02:42:54 +0000 | [diff] [blame] | 100 | #endif |
mitz@apple.com | c0b050b | 2008-09-06 22:39:34 +0000 | [diff] [blame] | 101 | |
paroga@webkit.org | f226d9f | 2011-04-17 10:04:48 +0000 | [diff] [blame] | 102 | #if USE(CG) |
aroben | fee2e82 | 2007-06-12 21:50:34 +0000 | [diff] [blame] | 103 | #ifndef CGFLOAT_DEFINED |
bfulgham@apple.com | 92787c7 | 2014-01-23 18:14:00 +0000 | [diff] [blame] | 104 | #if (defined(__LP64__) && __LP64__) || (defined(__x86_64__) && __x86_64__) || defined(_M_X64) || defined(__amd64__) |
aroben | fee2e82 | 2007-06-12 21:50:34 +0000 | [diff] [blame] | 105 | typedef double CGFloat; |
| 106 | #else |
| 107 | typedef float CGFloat; |
| 108 | #endif |
| 109 | #define CGFLOAT_DEFINED 1 |
| 110 | #endif |
paroga@webkit.org | f226d9f | 2011-04-17 10:04:48 +0000 | [diff] [blame] | 111 | #endif /* USE(CG) */ |
aroben | 808a002 | 2007-06-27 04:07:35 +0000 | [diff] [blame] | 112 | |
mrobinson@webkit.org | 2c91b42 | 2015-05-01 23:38:18 +0000 | [diff] [blame] | 113 | // FIXME: Move this to JavaScriptCore/wtf/Platform.h, which is where we define USE_AVFOUNDATION on the Mac. |
jeffm@apple.com | 83bc848 | 2011-08-31 23:55:01 +0000 | [diff] [blame] | 114 | // https://bugs.webkit.org/show_bug.cgi?id=67334 |
bfulgham@apple.com | da8c93c | 2013-07-12 19:30:23 +0000 | [diff] [blame] | 115 | #if PLATFORM(WIN) && USE(CG) && HAVE(AVCF) |
mrobinson@webkit.org | 2c91b42 | 2015-05-01 23:38:18 +0000 | [diff] [blame] | 116 | #define USE_AVFOUNDATION 1 |
bfulgham@apple.com | 31e9640 | 2013-07-05 22:17:27 +0000 | [diff] [blame] | 117 | |
| 118 | #if HAVE(AVCF_LEGIBLE_OUTPUT) |
mrobinson@webkit.org | 2c91b42 | 2015-05-01 23:38:18 +0000 | [diff] [blame] | 119 | #define USE_AVFOUNDATION 1 |
bfulgham@apple.com | 31e9640 | 2013-07-05 22:17:27 +0000 | [diff] [blame] | 120 | #define HAVE_AVFOUNDATION_MEDIA_SELECTION_GROUP 1 |
| 121 | #define HAVE_AVFOUNDATION_LEGIBLE_OUTPUT_SUPPORT 1 |
bfulgham@apple.com | 8313945 | 2013-07-18 20:30:23 +0000 | [diff] [blame] | 122 | #define HAVE_MEDIA_ACCESSIBILITY_FRAMEWORK 1 |
bfulgham@apple.com | 31e9640 | 2013-07-05 22:17:27 +0000 | [diff] [blame] | 123 | #endif |
| 124 | |
jeffm@apple.com | 16e8644 | 2011-08-03 20:15:53 +0000 | [diff] [blame] | 125 | #endif |