Also apply rev 326961 to webkit-gtk3.
Fix the build on recent head with libc++ [1]. Also when building with clang make the build quieter by not spamming about c11 keywords. Submitted by: stefanf@ (combined patches with) [1]
This commit is contained in:
parent
78e32d2e1d
commit
13878c3628
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=326967
5 changed files with 87 additions and 0 deletions
|
@ -66,6 +66,12 @@ CONFIGURE_ARGS+=--enable-debug
|
|||
CONFIGURE_ARGS+=--disable-debug
|
||||
.endif
|
||||
|
||||
CCISCLANG!= ${CC} --version
|
||||
|
||||
.if !empty(CCISCLANG:M*clang*)
|
||||
CPPFLAGS+= -Wno-c++11-extensions
|
||||
.endif
|
||||
|
||||
.include <bsd.port.pre.mk>
|
||||
|
||||
.if ${ARCH} == powerpc64
|
||||
|
|
|
@ -0,0 +1,45 @@
|
|||
--- Source/JavaScriptCore/wtf/Atomics.h.orig 2013-09-06 13:54:07.000000000 +0200
|
||||
+++ Source/JavaScriptCore/wtf/Atomics.h 2013-09-06 13:55:58.000000000 +0200
|
||||
@@ -65,18 +65,10 @@
|
||||
|
||||
#if OS(WINDOWS)
|
||||
#include <windows.h>
|
||||
-#elif OS(DARWIN)
|
||||
-#include <libkern/OSAtomic.h>
|
||||
#elif OS(QNX)
|
||||
#include <atomic.h>
|
||||
#elif OS(ANDROID)
|
||||
#include <sys/atomics.h>
|
||||
-#elif COMPILER(GCC)
|
||||
-#if (__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 2))
|
||||
-#include <ext/atomicity.h>
|
||||
-#else
|
||||
-#include <bits/atomicity.h>
|
||||
-#endif
|
||||
#endif
|
||||
|
||||
namespace WTF {
|
||||
@@ -92,12 +84,6 @@ inline int atomicIncrement(int volatile*
|
||||
inline int atomicDecrement(int volatile* addend) { return InterlockedDecrement(reinterpret_cast<long volatile*>(addend)); }
|
||||
#endif
|
||||
|
||||
-#elif OS(DARWIN)
|
||||
-#define WTF_USE_LOCKFREE_THREADSAFEREFCOUNTED 1
|
||||
-
|
||||
-inline int atomicIncrement(int volatile* addend) { return OSAtomicIncrement32Barrier(const_cast<int*>(addend)); }
|
||||
-inline int atomicDecrement(int volatile* addend) { return OSAtomicDecrement32Barrier(const_cast<int*>(addend)); }
|
||||
-
|
||||
#elif OS(QNX)
|
||||
#define WTF_USE_LOCKFREE_THREADSAFEREFCOUNTED 1
|
||||
|
||||
@@ -113,8 +99,8 @@ inline int atomicDecrement(int volatile*
|
||||
#elif COMPILER(GCC) && !CPU(SPARC64) // sizeof(_Atomic_word) != sizeof(int) on sparc64 gcc
|
||||
#define WTF_USE_LOCKFREE_THREADSAFEREFCOUNTED 1
|
||||
|
||||
-inline int atomicIncrement(int volatile* addend) { return __gnu_cxx::__exchange_and_add(addend, 1) + 1; }
|
||||
-inline int atomicDecrement(int volatile* addend) { return __gnu_cxx::__exchange_and_add(addend, -1) - 1; }
|
||||
+inline int atomicIncrement(int volatile* addend) { return __sync_add_and_fetch(addend, 1); }
|
||||
+inline int atomicDecrement(int volatile* addend) { return __sync_sub_and_fetch(addend, 1); }
|
||||
|
||||
#endif
|
||||
|
|
@ -0,0 +1,16 @@
|
|||
--- Source/JavaScriptCore/wtf/DisallowCType.h.orig 2012-08-20 18:26:04.000000000 +0200
|
||||
+++ Source/JavaScriptCore/wtf/DisallowCType.h 2013-09-11 12:41:07.000000000 +0200
|
||||
@@ -35,6 +35,13 @@
|
||||
// ASCII-specific functions instead. This header makes sure we get a compile-time
|
||||
// error if we use one of the <ctype.h> functions by accident.
|
||||
|
||||
+// Include inlined functions using <ctype.h> first to avoid compilation errors
|
||||
+#ifdef __cplusplus
|
||||
+#include <cwchar>
|
||||
+#include <cwctype>
|
||||
+#include <string>
|
||||
+#endif
|
||||
+
|
||||
#include <ctype.h>
|
||||
|
||||
#undef isalnum
|
|
@ -0,0 +1,10 @@
|
|||
--- Tools/DumpRenderTree/gtk/DumpRenderTree.cpp.orig 2012-08-20 18:26:18.000000000 +0200
|
||||
+++ Tools/DumpRenderTree/gtk/DumpRenderTree.cpp 2013-09-11 12:28:29.000000000 +0200
|
||||
@@ -48,6 +48,7 @@
|
||||
#include "WorkQueueItem.h"
|
||||
#include <JavaScriptCore/JavaScript.h>
|
||||
#include <cassert>
|
||||
+#include <clocale>
|
||||
#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <getopt.h>
|
|
@ -0,0 +1,10 @@
|
|||
--- Tools/DumpRenderTree/gtk/ImageDiff.cpp.orig 2013-09-11 12:29:19.000000000 +0200
|
||||
+++ Tools/DumpRenderTree/gtk/ImageDiff.cpp 2013-09-11 12:29:38.000000000 +0200
|
||||
@@ -30,6 +30,7 @@
|
||||
#include <algorithm>
|
||||
#include <cmath>
|
||||
#include <cstdio>
|
||||
+#include <cstdlib>
|
||||
#include <cstring>
|
||||
#include <gdk/gdk.h>
|
||||
|
Loading…
Reference in a new issue