| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2007, 2013 Apple Inc. | 2 * Copyright (C) 2004, 2005, 2006, 2007, 2013 Apple Inc. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 * Library General Public License for more details. | 12 * Library General Public License for more details. |
| 13 * | 13 * |
| 14 * You should have received a copy of the GNU Library General Public License | 14 * You should have received a copy of the GNU Library General Public License |
| 15 * along with this library; see the file COPYING.LIB. If not, write to | 15 * along with this library; see the file COPYING.LIB. If not, write to |
| 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 17 * Boston, MA 02110-1301, USA. | 17 * Boston, MA 02110-1301, USA. |
| 18 * | 18 * |
| 19 */ | 19 */ |
| 20 | 20 |
| 21 /* This prefix file should contain only: | 21 /* This prefix file is for use on Mac OS X only. This prefix file should contain
only: |
| 22 * 1) files to precompile for faster builds | 22 * 1) files to precompile for faster builds |
| 23 * 2) in one case at least: OS-X-specific performance bug workarounds | 23 * 2) in one case at least: OS-X-specific performance bug workarounds |
| 24 * 3) the special trick to catch us using new or delete without including "co
nfig.h" | 24 * 3) the special trick to catch us using new or delete without including "co
nfig.h" |
| 25 * The project should be able to build without this header, although we rarely t
est that. | 25 * The project should be able to build without this header, although we rarely t
est that. |
| 26 */ | 26 */ |
| 27 | 27 |
| 28 /* Things that need to be defined globally should go into "config.h". */ | 28 /* Things that need to be defined globally should go into "config.h". */ |
| 29 | 29 |
| 30 #include <wtf/Platform.h> | |
| 31 | |
| 32 #if defined(__APPLE__) | |
| 33 #ifdef __cplusplus | 30 #ifdef __cplusplus |
| 34 #define NULL __null | 31 #define NULL __null |
| 35 #else | 32 #else |
| 36 #define NULL ((void *)0) | 33 #define NULL ((void *)0) |
| 37 #endif | 34 #endif |
| 38 #endif | |
| 39 | |
| 40 #if OS(WINDOWS) | |
| 41 | |
| 42 #ifndef _WIN32_WINNT | |
| 43 #define _WIN32_WINNT 0x0502 | |
| 44 #endif | |
| 45 | |
| 46 #ifndef WINVER | |
| 47 #define WINVER 0x0502 | |
| 48 #endif | |
| 49 | |
| 50 #ifndef _WINSOCKAPI_ | |
| 51 #define _WINSOCKAPI_ // Prevent inclusion of winsock.h in windows.h | |
| 52 #endif | |
| 53 | |
| 54 // If we don't define these, they get defined in windef.h. | |
| 55 // We want to use std::min and std::max | |
| 56 #ifdef __cplusplus | |
| 57 #define max max | |
| 58 #define min min | |
| 59 #endif | |
| 60 | |
| 61 #else | |
| 62 | 35 |
| 63 #include <pthread.h> | 36 #include <pthread.h> |
| 64 | |
| 65 #endif // OS(WINDOWS) | |
| 66 | |
| 67 #include <sys/types.h> | 37 #include <sys/types.h> |
| 68 #include <fcntl.h> | 38 #include <fcntl.h> |
| 69 #if defined(__APPLE__) | |
| 70 #include <regex.h> | 39 #include <regex.h> |
| 71 #endif | |
| 72 | |
| 73 | |
| 74 #include <setjmp.h> | 40 #include <setjmp.h> |
| 75 | |
| 76 #include <signal.h> | 41 #include <signal.h> |
| 77 #include <stdarg.h> | 42 #include <stdarg.h> |
| 78 #include <stddef.h> | 43 #include <stddef.h> |
| 79 #include <stdio.h> | 44 #include <stdio.h> |
| 80 #include <stdlib.h> | 45 #include <stdlib.h> |
| 81 #include <string.h> | 46 #include <string.h> |
| 82 #include <time.h> | 47 #include <time.h> |
| 83 #if defined(__APPLE__) | |
| 84 #include <unistd.h> | 48 #include <unistd.h> |
| 85 #endif | |
| 86 | 49 |
| 87 #ifdef __cplusplus | 50 #ifdef __cplusplus |
| 88 | |
| 89 | |
| 90 #include <ciso646> | 51 #include <ciso646> |
| 91 | 52 |
| 92 #if defined(_LIBCPP_VERSION) | 53 #if defined(_LIBCPP_VERSION) |
| 93 | 54 |
| 94 // Add work around for a bug in libc++ that caused standard heap | 55 // Add work around for a bug in libc++ that caused standard heap |
| 95 // APIs to not compile <rdar://problem/10858112>. | 56 // APIs to not compile <rdar://problem/10858112>. |
| 96 | 57 |
| 97 #include <type_traits> | 58 #include <type_traits> |
| 98 | 59 |
| 99 namespace WebCore { | 60 namespace WebCore { |
| 100 class TimerHeapReference; | 61 class TimerHeapReference; |
| 101 } | 62 } |
| 102 | 63 |
| 103 _LIBCPP_BEGIN_NAMESPACE_STD | 64 _LIBCPP_BEGIN_NAMESPACE_STD |
| 104 | 65 |
| 105 inline _LIBCPP_INLINE_VISIBILITY | 66 inline _LIBCPP_INLINE_VISIBILITY |
| 106 const WebCore::TimerHeapReference& move(const WebCore::TimerHeapReference& t) | 67 const WebCore::TimerHeapReference& move(const WebCore::TimerHeapReference& t) |
| 107 { | 68 { |
| 108 return t; | 69 return t; |
| 109 } | 70 } |
| 110 | 71 |
| 111 _LIBCPP_END_NAMESPACE_STD | 72 _LIBCPP_END_NAMESPACE_STD |
| 112 | 73 |
| 113 #endif // defined(_LIBCPP_VERSION) | 74 #endif // defined(_LIBCPP_VERSION) |
| 114 | 75 |
| 115 #include <algorithm> | 76 #include <algorithm> |
| 116 #include <cstddef> | 77 #include <cstddef> |
| 117 #include <new> | 78 #include <new> |
| 118 | 79 |
| 119 #endif | 80 #endif // __cplusplus |
| 120 | 81 |
| 121 #if defined(__APPLE__) | |
| 122 #include <sys/param.h> | 82 #include <sys/param.h> |
| 123 #endif | |
| 124 #include <sys/stat.h> | 83 #include <sys/stat.h> |
| 125 #if defined(__APPLE__) | |
| 126 #include <sys/time.h> | 84 #include <sys/time.h> |
| 127 #include <sys/resource.h> | 85 #include <sys/resource.h> |
| 128 #endif | |
| 129 | |
| 130 #include <CoreFoundation/CoreFoundation.h> | 86 #include <CoreFoundation/CoreFoundation.h> |
| 131 | |
| 132 #if OS(WINDOWS) | |
| 133 #include <windows.h> | |
| 134 #else | |
| 135 #include <CoreServices/CoreServices.h> | 87 #include <CoreServices/CoreServices.h> |
| 136 #endif // OS(WINDOWS) | |
| 137 | 88 |
| 138 #ifdef __OBJC__ | 89 #ifdef __OBJC__ |
| 139 #import <Cocoa/Cocoa.h> | 90 #import <Cocoa/Cocoa.h> |
| 140 #endif | 91 #endif |
| 141 | 92 |
| 142 #ifdef __cplusplus | 93 #ifdef __cplusplus |
| 143 #define new ("if you use new/delete make sure to include config.h at the top of
the file"()) | 94 #define new ("if you use new/delete make sure to include config.h at the top of
the file"()) |
| 144 #define delete ("if you use new/delete make sure to include config.h at the top
of the file"()) | 95 #define delete ("if you use new/delete make sure to include config.h at the top
of the file"()) |
| 145 #endif | 96 #endif |
| 146 | 97 |
| 147 /* When C++ exceptions are disabled, the C++ library defines |try| and |catch| | 98 /* When C++ exceptions are disabled, the C++ library defines |try| and |catch| |
| 148 * to allow C++ code that expects exceptions to build. These definitions | 99 * to allow C++ code that expects exceptions to build. These definitions |
| 149 * interfere with Objective-C++ uses of Objective-C exception handlers, which | 100 * interfere with Objective-C++ uses of Objective-C exception handlers, which |
| 150 * use |@try| and |@catch|. As a workaround, undefine these macros. */ | 101 * use |@try| and |@catch|. As a workaround, undefine these macros. */ |
| 151 #ifdef __OBJC__ | 102 #ifdef __OBJC__ |
| 152 #undef try | 103 #undef try |
| 153 #undef catch | 104 #undef catch |
| 154 #endif | 105 #endif |
| 155 | |
| OLD | NEW |