aboutsummaryrefslogtreecommitdiff
path: root/www/chromium/files/extra-patch-gcc
blob: 016b111aeca1c30c1973fd5517dde371ce6dae54 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
--- media/filters/file_data_source.h.orig	2011-09-14 10:01:06.000000000 +0200
+++ media/filters/file_data_source.h	2011-09-26 19:08:17.000000000 +0200
@@ -5,6 +5,7 @@
 #ifndef MEDIA_FILTERS_FILE_DATA_SOURCE_H_
 #define MEDIA_FILTERS_FILE_DATA_SOURCE_H_
 
+#include <cstdio>
 #include <string>
 
 #include "base/files/file.h"
--- content/public/common/child_process_sandbox_support_linux.h.orig	2013-10-11 19:30:28.000000000 +0200
+++ content/public/common/child_process_sandbox_support_linux.h	2013-10-16 15:29:00.000000000 +0200
@@ -7,6 +7,7 @@
 
 #include <stdint.h>
 #include <string>
+#include <sys/types.h>
 
 #include "content/common/content_export.h"
 
--- third_party/ffmpeg/libavutil/cpu.c.orig	2013-11-16 01:26:14.000000000 +0100
+++ third_party/ffmpeg/libavutil/cpu.c	2013-11-19 00:24:53.000000000 +0100
@@ -24,6 +24,9 @@
 #include "opt.h"
 #include "common.h"
 
+/* TODO(rene) work around a compile error with GCC 4.6.4 on FreeBSD */
+#define __BSD_VISIBLE 1
+
 #if HAVE_SCHED_GETAFFINITY
 #ifndef _GNU_SOURCE
 # define _GNU_SOURCE
--- content/browser/browser_shutdown_profile_dumper.cc.orig    2014-02-20 15:28:24.000000000 -0500
+++ content/browser/browser_shutdown_profile_dumper.cc 2014-03-03 15:36:33.000000000 -0500
@@ -2,6 +2,8 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stdio.h>
+
 #include "content/browser/browser_shutdown_profile_dumper.h"
 
 #include "base/base_switches.h"
--- testing/perf/perf_test.cc	2014-03-03 12:59:30.000000000 -0500
+++ testing/perf/perf_test.cc.orig	2014-02-20 15:28:27.000000000 -0500
@@ -2,10 +2,10 @@
 // Use of this source code is governed by a BSD-style license that can be
 // found in the LICENSE file.
 
+#include <stdio.h>
+
 #include "testing/perf/perf_test.h"
 
-#include <stdio.h>
-
 #include "base/logging.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/stringprintf.h"
--- ui/gfx/codec/jpeg_codec.cc.orig	2014-10-02 19:19:03.000000000 +0200
+++ ui/gfx/codec/jpeg_codec.cc	2014-10-05 22:38:28.000000000 +0200
@@ -13,6 +13,7 @@
 
 extern "C" {
 #if defined(USE_SYSTEM_LIBJPEG)
+#include <stdio.h>
 #include <jpeglib.h>
 #elif defined(USE_LIBJPEG_TURBO)
 #include "third_party/libjpeg_turbo/jpeglib.h"
--- third_party/webrtc/common_audio/wav_file.h.orig	2014-10-17 02:57:34.000000000 +0200
+++ third_party/webrtc/common_audio/wav_file.h	2014-10-18 12:04:03.000000000 +0200
@@ -14,6 +14,7 @@
 #ifdef __cplusplus
 
 #include <stdint.h>
+#include <stdio.h>
 #include <cstddef>
 #include <string>
 
--- v8/src/base/platform/platform.h.orig	2015-01-27 03:22:59.000000000 +0100
+++ v8/src/base/platform/platform.h	2015-01-28 18:37:43.268781292 +0100
@@ -22,6 +22,7 @@
 #define V8_BASE_PLATFORM_PLATFORM_H_
 
 #include <cstdarg>
+#include <cstdio>
 #include <string>
 #include <vector>
 
--- v8/src/compiler/graph-visualizer.cc.orig	2015-04-28 22:29:10.000000000 +0200
+++ v8/src/compiler/graph-visualizer.cc	2015-05-02 21:01:32.086593000 +0200
@@ -5,6 +5,7 @@
 #include "src/compiler/graph-visualizer.h"
 
 #include <sstream>
+#include <cstdio>
 #include <string>
 
 #include "src/code-stubs.h"
@@ -25,7 +26,7 @@
 namespace compiler {
 
 
-FILE* OpenVisualizerLogFile(CompilationInfo* info, const char* phase,
+std::FILE* OpenVisualizerLogFile(CompilationInfo* info, const char* phase,
                             const char* suffix, const char* mode) {
   EmbeddedVector<char, 256> filename;
   SmartArrayPointer<char> function_name;
--- third_party/ffmpeg/libavutil/autorename_libavutil_cpu.c.orig	2015-07-24 22:27:11.000000000 +0200
+++ third_party/ffmpeg/libavutil/autorename_libavutil_cpu.c	2015-07-26 17:38:40.937606000 +0200
@@ -34,6 +34,7 @@
 #include <windows.h>
 #endif
 #if HAVE_SYSCTL
+#define __BSD_VISIBLE 1
 #if HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif
--- v8/src/compiler/graph-visualizer.h.orig	2015-07-24 22:28:03.000000000 +0200
+++ v8/src/compiler/graph-visualizer.h	2015-07-26 18:37:45.488253000 +0200
@@ -5,7 +5,7 @@
 #ifndef V8_COMPILER_GRAPH_VISUALIZER_H_
 #define V8_COMPILER_GRAPH_VISUALIZER_H_
 
-#include <stdio.h>
+#include <cstdio>
 #include <iosfwd>
 
 namespace v8 {
@@ -21,7 +21,7 @@
 class Schedule;
 class SourcePositionTable;
 
-FILE* OpenVisualizerLogFile(CompilationInfo* info, const char* phase,
+std::FILE* OpenVisualizerLogFile(CompilationInfo* info, const char* phase,
                             const char* suffix, const char* mode);
 
 struct AsDOT {
--- v8/src/log-utils.h.orig	2015-10-13 21:04:45.000000000 +0200
+++ v8/src/log-utils.h	2015-10-17 10:17:35.535561000 +0200
@@ -5,6 +5,9 @@
 #ifndef V8_LOG_UTILS_H_
 #define V8_LOG_UTILS_H_
 
+#include <cstdarg>
+#include <cstdio>
+
 #include "src/allocation.h"
 #include "src/base/platform/mutex.h"
 #include "src/flags.h"
--- third_party/webrtc/modules/remote_bitrate_estimator/overuse_detector.cc.orig	2015-10-22 21:00:59.000000000 +0200
+++ third_party/webrtc/modules/remote_bitrate_estimator/overuse_detector.cc	2015-11-01 11:32:36.293750000 +0100
@@ -11,6 +11,7 @@
 #include "webrtc/modules/remote_bitrate_estimator/overuse_detector.h"
 
 #include <algorithm>
+#include <cstdio>
 #include <sstream>
 #include <math.h>
 #include <stdlib.h>
--- ui/gfx/color_utils.cc.orig	2016-04-06 20:35:19.306577518 +0200
+++ ui/gfx/color_utils.cc	2016-04-06 20:35:49.282575724 +0200
@@ -42,7 +42,7 @@
   else if (hue * 3.0 < 2.0)
     result = temp1 + (temp2 - temp1) * (2.0 / 3.0 - hue) * 6.0;
 
-  return static_cast<int>(std::round(result * 255));
+  return static_cast<int>(round(result * 255));
 }
 
 // Assumes sRGB.
@@ -85,7 +85,7 @@
 }
 
 uint8_t GetLuma(SkColor color) {
-  return static_cast<uint8_t>(std::round((0.299 * SkColorGetR(color)) +
+  return static_cast<uint8_t>(round((0.299 * SkColorGetR(color)) +
                                          (0.587 * SkColorGetG(color)) +
                                          (0.114 * SkColorGetB(color))));
 }
@@ -223,9 +223,9 @@
     b += (255.0 - b) * ((shift.l - 0.5) * 2.0);
   }
   return SkColorSetARGB(alpha,
-                        static_cast<int>(std::round(r)),
-                        static_cast<int>(std::round(g)),
-                        static_cast<int>(std::round(b)));
+                        static_cast<int>(round(r)),
+                        static_cast<int>(round(g)),
+                        static_cast<int>(round(b)));
 }
 
 void BuildLumaHistogram(const SkBitmap& bitmap, int histogram[256]) {
@@ -275,10 +275,10 @@
   double b = (SkColorGetB(foreground) * f_weight +
               SkColorGetB(background) * b_weight) / 255.0;
 
-  return SkColorSetARGB(static_cast<int>(std::round(normalizer)),
-                        static_cast<int>(std::round(r)),
-                        static_cast<int>(std::round(g)),
-                        static_cast<int>(std::round(b)));
+  return SkColorSetARGB(static_cast<int>(round(normalizer)),
+                        static_cast<int>(round(r)),
+                        static_cast<int>(round(g)),
+                        static_cast<int>(round(b)));
 }
 
 bool IsDark(SkColor color) {
--- media/filters/audio_clock.cc.orig	2016-04-07 11:55:00.678817033 +0200
+++ media/filters/audio_clock.cc	2016-04-07 11:55:28.152814716 +0200
@@ -121,7 +121,7 @@
   }
 
   return base::TimeDelta::FromMicroseconds(
-      std::round(frames_until_timestamp * microseconds_per_frame_));
+      round(frames_until_timestamp * microseconds_per_frame_));
 }
 
 void AudioClock::ContiguousAudioDataBufferedForTesting(
--- media/filters/audio_clock.h.orig	2016-04-08 14:22:02.833940146 +0200
+++ media/filters/audio_clock.h	2016-04-08 14:22:14.433876920 +0200
@@ -92,11 +92,11 @@
   //                                             1000 + 500 + 250 = 1750 ms.
   base::TimeDelta front_timestamp() const {
     return base::TimeDelta::FromMicroseconds(
-        std::round(front_timestamp_micros_));
+        round(front_timestamp_micros_));
   }
   base::TimeDelta back_timestamp() const {
     return base::TimeDelta::FromMicroseconds(
-        std::round(back_timestamp_micros_));
+        round(back_timestamp_micros_));
   }
 
   // Returns the amount of wall time until |timestamp| will be played by the
--- content/browser/web_contents/web_contents_impl.cc.orig	2016-04-08 15:44:21.989537858 +0200
+++ content/browser/web_contents/web_contents_impl.cc	2016-04-08 15:44:44.574535099 +0200
@@ -1597,7 +1597,7 @@
     // Count only integer cumulative scrolls as zoom events; this handles
     // smooth scroll and regular scroll device behavior.
     zoom_scroll_remainder_ += event.wheelTicksY;
-    int whole_zoom_scroll_remainder_ = std::lround(zoom_scroll_remainder_);
+    int whole_zoom_scroll_remainder_ = lround(zoom_scroll_remainder_);
     zoom_scroll_remainder_ -= whole_zoom_scroll_remainder_;
     if (whole_zoom_scroll_remainder_ != 0) {
       delegate_->ContentsZoomChange(whole_zoom_scroll_remainder_ > 0);
--- chrome/browser/ui/views/frame/browser_root_view.cc.orig	2016-04-08 17:23:19.749128496 +0200
+++ chrome/browser/ui/views/frame/browser_root_view.cc	2016-04-08 17:23:30.609126494 +0200
@@ -139,10 +139,10 @@
 
       // Number of integer scroll events that have passed in each direction.
       int whole_scroll_amount_x =
-          std::lround(static_cast<double>(scroll_remainder_x_) /
+          lround(static_cast<double>(scroll_remainder_x_) /
                       ui::MouseWheelEvent::kWheelDelta);
       int whole_scroll_amount_y =
-          std::lround(static_cast<double>(scroll_remainder_y_) /
+          lround(static_cast<double>(scroll_remainder_y_) /
                       ui::MouseWheelEvent::kWheelDelta);
 
       // Adjust the remainder such that any whole scrolls we have taken action
--- base/process/memory.h.orig	2016-06-06 21:05:12.000000000 +0200
+++ base/process/memory.h	2016-06-12 20:04:24.000000000 +0200
@@ -6,6 +6,7 @@
 #define BASE_PROCESS_MEMORY_H_
 
 #include <stddef.h>
+#include <stdlib.h>
 
 #include "base/base_export.h"
 #include "base/process/process_handle.h"
--- media/audio/audio_output_device.cc.orig	2016-06-06 21:05:19.000000000 +0200
+++ media/audio/audio_output_device.cc	2016-06-12 20:31:58.000000000 +0200
@@ -426,7 +426,7 @@
   // frames, and ask client to render audio.  Since |output_bus_| is wrapping
   // the shared memory the Render() call is writing directly into the shared
   // memory.
-  render_callback_->Render(output_bus_.get(), std::round(frames_delayed),
+  render_callback_->Render(output_bus_.get(), round(frames_delayed),
                            frames_skipped);
 }
 
--- media/audio/audio_output_stream_sink.cc.orig	2016-06-06 21:05:19.000000000 +0200
+++ media/audio/audio_output_stream_sink.cc	2016-06-12 20:35:05.000000000 +0200
@@ -85,7 +85,7 @@
   if (!active_render_callback_)
     return 0;
 
-  uint32_t frames_delayed = std::round(static_cast<double>(total_bytes_delay) /
+  uint32_t frames_delayed = round(static_cast<double>(total_bytes_delay) /
                                        active_params_.GetBytesPerFrame());
 
   return active_render_callback_->Render(dest, frames_delayed, frames_skipped);
--- media/base/audio_renderer_mixer_input.cc.orig	2016-06-06 21:05:19.000000000 +0200
+++ media/base/audio_renderer_mixer_input.cc	2016-06-12 20:50:35.000000000 +0200
@@ -164,7 +164,7 @@
   // TODO(chcunningham): Delete this conversion and change ProvideInput to more
   // precisely describe delay as a count of frames delayed instead of TimeDelta.
   // See http://crbug.com/587522.
-  uint32_t frames_delayed = std::round(buffer_delay.InMicroseconds() /
+  uint32_t frames_delayed = round(buffer_delay.InMicroseconds() /
                                        params_.GetMicrosecondsPerFrame());
 
   int frames_filled = callback_->Render(audio_bus, frames_delayed, 0);
--- media/base/audio_renderer_mixer.cc.orig	2016-06-06 21:05:19.000000000 +0200
+++ media/base/audio_renderer_mixer.cc	2016-06-12 20:52:34.000000000 +0200
@@ -138,7 +138,7 @@
   // expect a count of frames delayed instead of TimeDelta (less precise).
   // See http://crbug.com/587522.
   base::TimeDelta audio_delay = base::TimeDelta::FromMicroseconds(
-      std::round(frames_delayed * output_params_.GetMicrosecondsPerFrame()));
+      round(frames_delayed * output_params_.GetMicrosecondsPerFrame()));
 
   master_converter_.ConvertWithDelay(audio_delay, audio_bus);
   return audio_bus->frames();
--- third_party/WebKit/Source/modules/battery/battery_status.h.orig	2016-06-06 21:05:36.000000000 +0200
+++ third_party/WebKit/Source/modules/battery/battery_status.h	2016-06-13 20:21:31.000000000 +0200
@@ -46,7 +46,7 @@
     // of reducing the possibility of fingerprinting and triggers less level
     // change events on platforms where the granularity is high.
     ASSERT(level >= 0 && level <= 1);
-    return std::round(level * 100) / 100.f;
+    return round(level * 100) / 100.f;
   }
 
   bool charging_;
--- chrome/common/channel_info_posix.cc.orig	2016-06-06 21:05:14.000000000 +0200
+++ chrome/common/channel_info_posix.cc	2016-06-13 21:36:53.000000000 +0200
@@ -8,6 +8,8 @@
 #include "build/build_config.h"
 #include "components/version_info/version_info.h"
 
+#include <stdlib.h>
+
 namespace chrome {
 
 namespace {
--- chrome/browser/ui/views/tabs/tab_strip.cc.orig	2016-06-06 21:05:14.000000000 +0200
+++ chrome/browser/ui/views/tabs/tab_strip.cc	2016-06-13 22:03:03.000000000 +0200
@@ -417,11 +417,11 @@
     const SkColor stroke_color = tab_strip_->GetToolbarTopSeparatorColor();
     const float alpha = SkColorGetA(stroke_color);
     const SkAlpha shadow_alpha =
-        base::saturated_cast<SkAlpha>(std::round(2.1875f * alpha));
+        base::saturated_cast<SkAlpha>(round(2.1875f * alpha));
     paint.setLooper(
         CreateShadowDrawLooper(SkColorSetA(stroke_color, shadow_alpha)));
     const SkAlpha path_alpha = static_cast<SkAlpha>(
-        std::round((pressed ? 0.875f : 0.609375f) * alpha));
+        round((pressed ? 0.875f : 0.609375f) * alpha));
     paint.setColor(SkColorSetA(stroke_color, path_alpha));
     canvas->DrawPath(stroke, paint);
   } else {
@@ -568,7 +568,7 @@
       }
       const SkColor stroke_color = tab_strip_->GetToolbarTopSeparatorColor();
       const SkAlpha alpha = static_cast<SkAlpha>(
-          std::round(SkColorGetA(stroke_color) * 0.59375f));
+          round(SkColorGetA(stroke_color) * 0.59375f));
       paint.setLooper(
           CreateShadowDrawLooper(SkColorSetA(stroke_color, alpha)));
       canvas->DrawPath(fill, paint);