From bb57a5e28873da207221bdd9d66d8ad86bc95140 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Mon, 28 Oct 2019 14:09:26 +0100 Subject: [PATCH] =?UTF-8?q?Fix=20MSYS2=20=E2=80=9Cnative=E2=80=9D=20build.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build/check-source.sh | 2 +- src/3rdparty/imgui | 2 +- src/3rdparty/pegtl | 2 +- src/image/codec/gdiplus-image.cpp | 4 ++-- src/private/nx | 2 +- src/sys/init.cpp | 6 +++--- 6 files changed, 9 insertions(+), 9 deletions(-) diff --git a/build/check-source.sh b/build/check-source.sh index d517444c..b41cf7b9 100755 --- a/build/check-source.sh +++ b/build/check-source.sh @@ -61,7 +61,7 @@ fi # Find out whether we need to care about CRLF case "$(uname 2>/dev/null)" in - MINGW*) + MINGW*|MSYS*) can_check_crlf=false ;; *) diff --git a/src/3rdparty/imgui b/src/3rdparty/imgui index fe546fe2..4ebf5257 160000 --- a/src/3rdparty/imgui +++ b/src/3rdparty/imgui @@ -1 +1 @@ -Subproject commit fe546fe243e2f0ee0634b2dc3f56f119b0f45c2b +Subproject commit 4ebf525785e22f3d96433cb4d070e890ef819190 diff --git a/src/3rdparty/pegtl b/src/3rdparty/pegtl index 2e56b15a..5e9e1e8c 160000 --- a/src/3rdparty/pegtl +++ b/src/3rdparty/pegtl @@ -1 +1 @@ -Subproject commit 2e56b15a0711de9f0879dc0bd39f045d82a6f9e3 +Subproject commit 5e9e1e8c2792293efced6998ae8e28ac46d93c03 diff --git a/src/image/codec/gdiplus-image.cpp b/src/image/codec/gdiplus-image.cpp index 1ee21ff7..0d9862ef 100644 --- a/src/image/codec/gdiplus-image.cpp +++ b/src/image/codec/gdiplus-image.cpp @@ -98,7 +98,7 @@ ResourceCodecData* GdiPlusImageCodec::Load(std::string const &path) if (!bitmap) { - msg::error("could not load %s\n", path); + msg::error("could not load %s\n", path.c_str()); return nullptr; } @@ -108,7 +108,7 @@ ResourceCodecData* GdiPlusImageCodec::Load(std::string const &path) if (bitmap->LockBits(&rect, Gdiplus::ImageLockModeRead, PixelFormat32bppARGB, &bdata) != Gdiplus::Ok) { - msg::error("could not lock bits in %s\n", path); + msg::error("could not lock bits in %s\n", path.c_str()); delete bitmap; return nullptr; } diff --git a/src/private/nx b/src/private/nx index 04dd8d3c..f74c400f 160000 --- a/src/private/nx +++ b/src/private/nx @@ -1 +1 @@ -Subproject commit 04dd8d3ce7e647704a530d169a57cd03231bdc28 +Subproject commit f74c400f7f12c87e9a357d630de744b4c64cc4c1 diff --git a/src/sys/init.cpp b/src/sys/init.cpp index 55775e9e..1c6fcb49 100644 --- a/src/sys/init.cpp +++ b/src/sys/init.cpp @@ -16,9 +16,9 @@ #if HAVE_UNISTD_H # include -#endif - -#if _WIN32 +#elif _WIN32 + // Only try direct.h if unistd.h is not present, because this + // header does not exist on e.g. Cygwin/MSYS2. # define WIN32_LEAN_AND_MEAN # include # undef WIN32_LEAN_AND_MEAN