1
0
Fork 0
mirror of https://git.freebsd.org/ports.git synced 2025-06-19 19:50:31 -04:00
ports/lang/phantomjs/files/patch-src_webpage.cpp
Fukang Chen 8e17f439cf lang/phantomjs: Allow building on armv6 and armv7 platforms
- Patches for armv6 and armv7 are obtained from www/webkit-gtk3
- Allow building with non-default LOCALBASE
- Fix build with Clang 6.0.0 [0]

PR:		225482 [0]
Reviewed by:	koobs, feld
Approved by:	koobs (mentor), feld (maintainner)
Differential Revision:	https://reviews.freebsd.org/D15850
2018-06-19 03:40:38 +00:00

20 lines
1.6 KiB
C++

webpage.cpp:80:89: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
#define CALLBACKS_OBJECT_INJECTION INPAGE_CALL_NAME" = function() { return window."CALLBACKS_OBJECT_NAME".call.call(_phantom, Array.prototype.slice.call(arguments, 0)); };"
^
webpage.cpp:81:57: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal]
#define CALLBACKS_OBJECT_PRESENT "typeof(window."CALLBACKS_OBJECT_NAME") !== \"undefined\";"
^
--- src/webpage.cpp.orig 2018-01-26 07:17:31 UTC
+++ src/webpage.cpp
@@ -77,8 +77,8 @@
#define BLANK_HTML "<html><head></head><body></body></html>"
#define CALLBACKS_OBJECT_NAME "_phantom"
#define INPAGE_CALL_NAME "window.callPhantom"
-#define CALLBACKS_OBJECT_INJECTION INPAGE_CALL_NAME" = function() { return window."CALLBACKS_OBJECT_NAME".call.call(_phantom, Array.prototype.slice.call(arguments, 0)); };"
-#define CALLBACKS_OBJECT_PRESENT "typeof(window."CALLBACKS_OBJECT_NAME") !== \"undefined\";"
+#define CALLBACKS_OBJECT_INJECTION INPAGE_CALL_NAME" = function() { return window." CALLBACKS_OBJECT_NAME".call.call(_phantom, Array.prototype.slice.call(arguments, 0)); };"
+#define CALLBACKS_OBJECT_PRESENT "typeof(window." CALLBACKS_OBJECT_NAME") !== \"undefined\";"
#define STDOUT_FILENAME "/dev/stdout"
#define STDERR_FILENAME "/dev/stderr"