From 5f66618f2d284ac3f3310e609e2a9d9aaf5050cb Mon Sep 17 00:00:00 2001 From: frncspeck <99085356+frncspeck@users.noreply.github.com> Date: Fri, 3 Mar 2023 08:05:13 +0100 Subject: [PATCH] cygwin_conv_to_win32_path to cygwin_conv_path `cygwin_conv_to_win32_path(path.c_str(), tmp);` was deprecated and now removed I found the fix here: http://onelab.info/pipermail/gmsh/2018/012114.html --- src/unix-adapter/main.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/unix-adapter/main.cc b/src/unix-adapter/main.cc index 992cb70e..e06da066 100644 --- a/src/unix-adapter/main.cc +++ b/src/unix-adapter/main.cc @@ -222,7 +222,10 @@ static std::string convertPosixPathToWin(const std::string &path) // MAX_PATH, but there's no way to query how large the new path is. // Hopefully, this is large enough. tmp = new char[MAX_PATH + path.size()]; - cygwin_conv_to_win32_path(path.c_str(), tmp); + //cygwin_conv_to_win32_path(path.c_str(), tmp); // was deprecated and now removed + // I found the fix here: http://onelab.info/pipermail/gmsh/2018/012114.html + ssize_t size = cygwin_conv_path( CCP_POSIX_TO_WIN_A, path.c_str(), NULL, 0); + cygwin_conv_path( CCP_POSIX_TO_WIN_A, path.c_str(), tmp, size); #endif for (int i = 0; tmp[i] != '\0'; ++i) { if (tmp[i] == '/')