Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(108)

Side by Side Diff: Source/core/WebCorePrefix.h

Issue 15923004: WebCorePrefix.h is only used for Mac OS X. Clean up dead code and remove including wtf/Platform.h. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rename WebCorePrefix.h to WebCorePrefixMac.h Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/config.h ('k') | Source/core/WebCorePrefixMac.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright (C) 2004, 2005, 2006, 2007, 2013 Apple Inc.
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Library General Public License for more details.
13 *
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
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17 * Boston, MA 02110-1301, USA.
18 *
19 */
20
21 /* This prefix file should contain only:
22 * 1) files to precompile for faster builds
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"
25 * The project should be able to build without this header, although we rarely t est that.
26 */
27
28 /* Things that need to be defined globally should go into "config.h". */
29
30 #include <wtf/Platform.h>
31
32 #if defined(__APPLE__)
33 #ifdef __cplusplus
34 #define NULL __null
35 #else
36 #define NULL ((void *)0)
37 #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
63 #include <pthread.h>
64
65 #endif // OS(WINDOWS)
66
67 #include <sys/types.h>
68 #include <fcntl.h>
69 #if defined(__APPLE__)
70 #include <regex.h>
71 #endif
72
73
74 #include <setjmp.h>
75
76 #include <signal.h>
77 #include <stdarg.h>
78 #include <stddef.h>
79 #include <stdio.h>
80 #include <stdlib.h>
81 #include <string.h>
82 #include <time.h>
83 #if defined(__APPLE__)
84 #include <unistd.h>
85 #endif
86
87 #ifdef __cplusplus
88
89
90 #include <ciso646>
91
92 #if defined(_LIBCPP_VERSION)
93
94 // Add work around for a bug in libc++ that caused standard heap
95 // APIs to not compile <rdar://problem/10858112>.
96
97 #include <type_traits>
98
99 namespace WebCore {
100 class TimerHeapReference;
101 }
102
103 _LIBCPP_BEGIN_NAMESPACE_STD
104
105 inline _LIBCPP_INLINE_VISIBILITY
106 const WebCore::TimerHeapReference& move(const WebCore::TimerHeapReference& t)
107 {
108 return t;
109 }
110
111 _LIBCPP_END_NAMESPACE_STD
112
113 #endif // defined(_LIBCPP_VERSION)
114
115 #include <algorithm>
116 #include <cstddef>
117 #include <new>
118
119 #endif
120
121 #if defined(__APPLE__)
122 #include <sys/param.h>
123 #endif
124 #include <sys/stat.h>
125 #if defined(__APPLE__)
126 #include <sys/time.h>
127 #include <sys/resource.h>
128 #endif
129
130 #include <CoreFoundation/CoreFoundation.h>
131
132 #if OS(WINDOWS)
133 #include <windows.h>
134 #else
135 #include <CoreServices/CoreServices.h>
136 #endif // OS(WINDOWS)
137
138 #ifdef __OBJC__
139 #import <Cocoa/Cocoa.h>
140 #endif
141
142 #ifdef __cplusplus
143 #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"())
145 #endif
146
147 /* When C++ exceptions are disabled, the C++ library defines |try| and |catch|
148 * to allow C++ code that expects exceptions to build. These definitions
149 * interfere with Objective-C++ uses of Objective-C exception handlers, which
150 * use |@try| and |@catch|. As a workaround, undefine these macros. */
151 #ifdef __OBJC__
152 #undef try
153 #undef catch
154 #endif
155
OLDNEW
« no previous file with comments | « Source/config.h ('k') | Source/core/WebCorePrefixMac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698