Title: [234248] trunk/Source/_javascript_Core
Revision
234248
Author
[email protected]
Date
2018-07-26 00:38:26 -0700 (Thu, 26 Jul 2018)

Log Message

[JSC API] We should support the symbol type in our C/Obj-C API
https://bugs.webkit.org/show_bug.cgi?id=175836

Unreviewed build fix for Windows port.

r234227 introduced a compilation error unresolved external symbol
"int __cdecl testCAPIViaCpp(void)" in testapi for Windows ports.

Windows ports are compiling testapi.c as C++ by using /TP switch.

* API/tests/testapi.c:
(main): Removed `::` prefix of ::SetErrorMode Windows API.
(dllLauncherEntryPoint): Converted into C style.
* shell/PlatformWin.cmake: Do not use /TP switch for testapi.c

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/API/tests/testapi.c (234247 => 234248)


--- trunk/Source/_javascript_Core/API/tests/testapi.c	2018-07-26 07:15:32 UTC (rev 234247)
+++ trunk/Source/_javascript_Core/API/tests/testapi.c	2018-07-26 07:38:26 UTC (rev 234248)
@@ -1351,10 +1351,10 @@
 int main(int argc, char* argv[])
 {
 #if OS(WINDOWS)
-    // Cygwin calls ::SetErrorMode(SEM_FAILCRITICALERRORS), which we will inherit. This is bad for
+    // Cygwin calls SetErrorMode(SEM_FAILCRITICALERRORS), which we will inherit. This is bad for
     // testing/debugging, as it causes the post-mortem debugger not to be invoked. We reset the
     // error mode here to work around Cygwin's behavior. See <http://webkit.org/b/55222>.
-    ::SetErrorMode(0);
+    SetErrorMode(0);
 #endif
 
     testCompareAndSwap();
@@ -2157,8 +2157,8 @@
 }
 
 #if OS(WINDOWS)
-extern "C" __declspec(dllexport) int WINAPI dllLauncherEntryPoint(int argc, const char* argv[])
+__declspec(dllexport) int WINAPI dllLauncherEntryPoint(int argc, char* argv[])
 {
-    return main(argc, const_cast<char**>(argv));
+    return main(argc, argv);
 }
 #endif

Modified: trunk/Source/_javascript_Core/ChangeLog (234247 => 234248)


--- trunk/Source/_javascript_Core/ChangeLog	2018-07-26 07:15:32 UTC (rev 234247)
+++ trunk/Source/_javascript_Core/ChangeLog	2018-07-26 07:38:26 UTC (rev 234248)
@@ -1,3 +1,20 @@
+2018-07-26  Fujii Hironori  <[email protected]>
+
+        [JSC API] We should support the symbol type in our C/Obj-C API
+        https://bugs.webkit.org/show_bug.cgi?id=175836
+
+        Unreviewed build fix for Windows port.
+
+        r234227 introduced a compilation error unresolved external symbol
+        "int __cdecl testCAPIViaCpp(void)" in testapi for Windows ports.
+
+        Windows ports are compiling testapi.c as C++ by using /TP switch.
+
+        * API/tests/testapi.c:
+        (main): Removed `::` prefix of ::SetErrorMode Windows API.
+        (dllLauncherEntryPoint): Converted into C style.
+        * shell/PlatformWin.cmake: Do not use /TP switch for testapi.c
+
 2018-07-25  Keith Miller  <[email protected]>
 
         [JSC API] We should support the symbol type in our C/Obj-C API

Modified: trunk/Source/_javascript_Core/shell/PlatformWin.cmake (234247 => 234248)


--- trunk/Source/_javascript_Core/shell/PlatformWin.cmake	2018-07-26 07:15:32 UTC (rev 234247)
+++ trunk/Source/_javascript_Core/shell/PlatformWin.cmake	2018-07-26 07:38:26 UTC (rev 234248)
@@ -26,8 +26,6 @@
 target_link_libraries(testRegExpLib _javascript_Core)
 
 add_library(testapiLib SHARED ${TESTAPI_SOURCES})
-set_source_files_properties(../API/tests/CustomGlobalObjectClassTest.c PROPERTIES COMPILE_FLAGS "/TP")
-set_source_files_properties(../API/tests/testapi.c PROPERTIES COMPILE_FLAGS "/TP")
 add_executable(testapi ${JSC_SOURCES})
 set_target_properties(testapi PROPERTIES OUTPUT_NAME "testapi${DEBUG_SUFFIX}")
 target_link_libraries(testapi shlwapi)
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to