aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authorjbeich <jbeich@FreeBSD.org>2018-01-09 01:07:00 +0800
committerKoop Mast <kwm@rainbow-runner.nl>2018-02-04 06:20:54 +0800
commitf70b7cdb1dda5d6d1a6ae4aa7c74031757c9d726 (patch)
tree8a328239af31de62152ff26eb92b5a8fd0d76541 /lang
parentc01d944741e30e68f54f16957891f854c95d70fd (diff)
downloadfreebsd-ports-gnome-f70b7cdb1dda5d6d1a6ae4aa7c74031757c9d726.tar.gz
freebsd-ports-gnome-f70b7cdb1dda5d6d1a6ae4aa7c74031757c9d726.tar.zst
freebsd-ports-gnome-f70b7cdb1dda5d6d1a6ae4aa7c74031757c9d726.zip
lang/cjs: unbreak build with Clang 6 (C++14 by default)
gi/boxed.cpp:552:16: error: cannot initialize return object of type 'GIFieldInfo *' (aka '_GIBaseInfoStub *') with an rvalue of type 'int' return JS_FALSE; ^~~~~~~~ gi/ns.cpp:188:16: error: cannot initialize return object of type 'JSObject *' with an rvalue of type 'int' return JS_FALSE; ^~~~~~~~ gi/repo.cpp:312:16: error: cannot initialize return object of type 'JSObject *' with an rvalue of type 'int' return JS_FALSE; ^~~~~~~~ /usr/local/include/mozjs-24/jstypes.h:194:18: note: expanded from macro 'JS_FALSE' #define JS_FALSE (int)0 ^~~~~~ Reported by: antoine (via bug 224669)
Diffstat (limited to 'lang')
-rw-r--r--lang/cjs/files/patch-c++1146
1 files changed, 46 insertions, 0 deletions
diff --git a/lang/cjs/files/patch-c++11 b/lang/cjs/files/patch-c++11
new file mode 100644
index 000000000000..3c6ef4090125
--- /dev/null
+++ b/lang/cjs/files/patch-c++11
@@ -0,0 +1,46 @@
+gi/boxed.cpp:552:16: error: cannot initialize return object of type 'GIFieldInfo *' (aka '_GIBaseInfoStub *') with an rvalue of type 'int'
+ return JS_FALSE;
+ ^~~~~~~~
+gi/ns.cpp:188:16: error: cannot initialize return object of type 'JSObject *' with an rvalue of type 'int'
+ return JS_FALSE;
+ ^~~~~~~~
+gi/repo.cpp:312:16: error: cannot initialize return object of type 'JSObject *' with an rvalue of type 'int'
+ return JS_FALSE;
+ ^~~~~~~~
+/usr/local/include/mozjs-24/jstypes.h:194:18: note: expanded from macro 'JS_FALSE'
+#define JS_FALSE (int)0
+ ^~~~~~
+
+--- gi/boxed.cpp.orig 2014-11-23 11:02:30 UTC
++++ gi/boxed.cpp
+@@ -549,7 +549,7 @@ get_field_info (JSContext *context,
+ jsval id_val;
+
+ if (!JS_IdToValue(context, id, &id_val))
+- return JS_FALSE;
++ return NULL;
+
+ if (!JSVAL_IS_INT (id_val)) {
+ gjs_throw(context, "Field index for %s is not an integer",
+--- gi/ns.cpp.orig 2014-11-23 11:02:30 UTC
++++ gi/ns.cpp
+@@ -185,7 +185,7 @@ ns_new(JSContext *context,
+ global = gjs_get_import_global(context);
+
+ if (!JS_HasProperty(context, global, gjs_ns_class.name, &found))
+- return JS_FALSE;
++ return NULL;
+ if (!found) {
+ JSObject *prototype;
+ prototype = JS_InitClass(context, global,
+--- gi/repo.cpp.orig 2014-11-23 11:02:30 UTC
++++ gi/repo.cpp
+@@ -309,7 +309,7 @@ repo_new(JSContext *context)
+ repo = JS_NewObject(context, &gjs_repo_class, NULL, global);
+ if (repo == NULL) {
+ gjs_throw(context, "No memory to create repo object");
+- return JS_FALSE;
++ return NULL;
+ }
+
+ priv = g_slice_new0(Repo);