* nodejs: re-generate patchset Git's `format-patch` now uses a narrower diffstat, longer abbreviated hashes in the index lines, and a different Git version, of course. Besides, the patches started out as an 11-strong patch series (and is now 13-strong, which is reflected in the [PATCH k/13] prefix of the Subject: lines), and the 12th patch even lacked attribution and a commit message. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> * nodejs: adjust patches for v6.14.1 The code base changed enough that some patches are obsolete, and others need to be applied to a different file, yet others simply do not apply cleanly. Note: this does not yet allow building v6.14.1, but *only* adjusts the existing patches as required, for ease of reviewing. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> * nodejs: do not link to the shared (stale) libuv Node.js v6.14.1 relies on libuv to be up to date. In particular, it requires the uv_os_getppid() function to be available. The version of libuv shipped in MSYS2 is too old and does not provide that. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> * nodejs: update to v6.14.1 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> * nodejs: prepare for packaging v6.14.1 Long path problems... Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> * nodejs: adjust patches for v8.11.1 Sadly, v6.14.1 would not be able to package because of too-long paths inside npm's nested node_modules/ directories. Let's hope that v8.11.1 works better. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> * nodejs: prepare for v8.11.1 It needs quite a bit more patching. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> * mingw-w64-nodejs: upgrade to v8.11.1 Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
90 lines
2.6 KiB
Diff
90 lines
2.6 KiB
Diff
From 1979214e69399d503b0f5a5b302101c80d8f437a Mon Sep 17 00:00:00 2001
|
|
From: Johannes Schindelin <johannes.schindelin@gmx.de>
|
|
Date: Sat, 14 Apr 2018 00:23:10 +0200
|
|
Subject: [PATCH 15/23] cctest: allow building with -municode
|
|
|
|
The rest of the code is built with -municode, we cannot start building
|
|
cctest (which relies on the already-built parts) without this option.
|
|
|
|
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
|
|
---
|
|
deps/gtest/src/gtest_main.cc | 61 ++++++++++++++++++++++++++++++++++++
|
|
1 file changed, 61 insertions(+)
|
|
|
|
diff --git a/deps/gtest/src/gtest_main.cc b/deps/gtest/src/gtest_main.cc
|
|
index 4cf03e59..e71ff613 100644
|
|
--- a/deps/gtest/src/gtest_main.cc
|
|
+++ b/deps/gtest/src/gtest_main.cc
|
|
@@ -31,7 +31,68 @@
|
|
|
|
#include "gtest/gtest.h"
|
|
|
|
+#ifdef _WIN32
|
|
+#include <windows.h>
|
|
+#include <VersionHelpers.h>
|
|
+
|
|
+#if defined(__MINGW_VERSION_MAJOR)
|
|
+#extern "C" {
|
|
+#endif
|
|
+
|
|
+int wmain(int argc, wchar_t *wargv[]) {
|
|
+ if (!IsWindows7OrGreater()) {
|
|
+ fprintf(stderr, "This application is only supported on Windows 7, "
|
|
+ "Windows Server 2008 R2, or higher.");
|
|
+ exit(1);
|
|
+ }
|
|
+
|
|
+ // Convert argv to to UTF8
|
|
+ char** argv = new char*[argc + 1];
|
|
+ for (int i = 0; i < argc; i++) {
|
|
+ // Compute the size of the required buffer
|
|
+ DWORD size = WideCharToMultiByte(CP_UTF8,
|
|
+ 0,
|
|
+ wargv[i],
|
|
+ -1,
|
|
+ nullptr,
|
|
+ 0,
|
|
+ nullptr,
|
|
+ nullptr);
|
|
+ if (size == 0) {
|
|
+ // This should never happen.
|
|
+ fprintf(stderr, "Could not convert arguments to utf8.");
|
|
+ exit(1);
|
|
+ }
|
|
+ // Do the actual conversion
|
|
+ argv[i] = new char[size];
|
|
+ DWORD result = WideCharToMultiByte(CP_UTF8,
|
|
+ 0,
|
|
+ wargv[i],
|
|
+ -1,
|
|
+ argv[i],
|
|
+ size,
|
|
+ nullptr,
|
|
+ nullptr);
|
|
+ if (result == 0) {
|
|
+ // This should never happen.
|
|
+ fprintf(stderr, "Could not convert arguments to utf8.");
|
|
+ exit(1);
|
|
+ }
|
|
+ }
|
|
+ argv[argc] = nullptr;
|
|
+ testing::InitGoogleTest(&argc, argv);
|
|
+ return RUN_ALL_TESTS();
|
|
+}
|
|
+
|
|
+#if defined(__MINGW_VERSION_MAJOR)
|
|
+}
|
|
+#endif
|
|
+
|
|
+#else
|
|
+
|
|
GTEST_API_ int main(int argc, char **argv) {
|
|
testing::InitGoogleTest(&argc, argv);
|
|
return RUN_ALL_TESTS();
|
|
}
|
|
+
|
|
+#endif
|
|
--
|
|
2.17.0.windows.1
|
|
|