This is an automated email from the git hooks/post-receive script. ildumi pushed a commit to branch development in repository libtool.
The following commit(s) were added to refs/heads/development by this push: new 7efc1891 libtool: Forward slash escaping check on Windows 7efc1891 is described below commit 7efc1891083cd53ea3961454d95f37c63a7b665c Author: Evgeny Grin <k...@narod.ru> AuthorDate: Fri Jul 4 18:02:31 2025 +0300 libtool: Forward slash escaping check on Windows Without cygpath, Window's 'cmd' may hang with a single slash (when transforming) and may hang with two slashes (when not transforming). Reported: https://savannah.gnu.org/support/index.php?110901 * build-aux/ltmain.in: Use one or two slashes with Window's command prompt based on cached value in lt_cv_cmd_slashes. * m4/libtool.m4: Cache whether one or two slashes are needed with Window's command prompt, when cygpath is not installed in path. --- build-aux/ltmain.in | 13 ++++++++---- m4/libtool.m4 | 57 ++++++++++++++++++++++++++++++++--------------------- 2 files changed, 44 insertions(+), 26 deletions(-) diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in index 06207bc8..9c85d660 100644 --- a/build-aux/ltmain.in +++ b/build-aux/ltmain.in @@ -1030,8 +1030,13 @@ func_convert_core_msys_to_w32 () $debug_cmd # Compatibility for original MSYS + if test "Xone" = "X$lt_cv_cmd_slashes"; then + func_convert_core_msys_to_w32_result=`( cmd /c echo "$1" ) 2>/dev/null | + $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` + else # Assume 'lt_cv_cmd_slashes = "two"' func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` + fi if test "$?" -ne 0; then # on failure, ensure result is empty func_convert_core_msys_to_w32_result= @@ -1193,7 +1198,7 @@ func_convert_file_msys_to_w32 () func_to_host_file_result=$1 if test -n "$1"; then - if test "yes" = "$cygpath_installed"; then + if test "Xyes" = "X$cygpath_installed"; then func_convert_core_msys_to_w32_with_cygpath -w "$1" func_to_host_file_result=$func_convert_core_msys_to_w32_with_cygpath_result else @@ -1250,7 +1255,7 @@ func_convert_file_msys_to_cygwin () func_to_host_file_result=$1 if test -n "$1"; then - if test "yes" = "$cygpath_installed"; then + if test "Xyes" = "X$cygpath_installed"; then func_convert_core_msys_to_w32_with_cygpath -w "$1" func_cygpath -u "$func_convert_core_msys_to_w32_with_cygpath_result" else @@ -1357,7 +1362,7 @@ func_convert_path_msys_to_w32 () # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result - if test "yes" = "$cygpath_installed"; then + if test "Xyes" = "X$cygpath_installed"; then func_convert_core_msys_to_w32_with_cygpath -w -p "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_msys_to_w32_with_cygpath_result else @@ -1427,7 +1432,7 @@ func_convert_path_msys_to_cygwin () # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result - if test "yes" = "$cygpath_installed"; then + if test "Xyes" = "X$cygpath_installed"; then func_convert_core_msys_to_w32_with_cygpath -w -p "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_with_cygpath_result" else diff --git a/m4/libtool.m4 b/m4/libtool.m4 index 75e666d4..1aebb983 100644 --- a/m4/libtool.m4 +++ b/m4/libtool.m4 @@ -8717,26 +8717,39 @@ AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl -AC_MSG_CHECKING([whether cygpath is installed]) -AC_CACHE_VAL(lt_cv_cygpath_installed, -[lt_cv_cygpath_installed=ignoring; -case $host in - *-*-mingw* | *-*-windows* | *-*-cygwin*) - case $build in - *-*-mingw* | *-*-windows* | *-*-cygwin*) - cygpath --help &> /dev/null - _lt_result=$? - if test 0 = "$_lt_result"; then - lt_cv_cygpath_installed=yes; - else - lt_cv_cygpath_installed=no; - fi - ;; - esac - ;; -esac -]) -AC_MSG_RESULT([$lt_cv_cygpath_installed]) -_LT_DECL([cygpath_installed], [lt_cv_cygpath_installed], - [0], [whether cygpath is installed])dnl +AS_CASE([$host], + [*-*-mingw* | *-*-windows* | *-*-cygwin*], + [AS_CASE([$build], + [*-*-mingw* | *-*-windows* | *-*-cygwin*], + [AC_MSG_CHECKING([whether cygpath is installed]) + AC_CACHE_VAL([lt_cv_cygpath_installed], + [lt_cv_cygpath_installed=ignoring + cygpath --help &> /dev/null + _lt_result=$? + AS_IF([test 0 = "$_lt_result"], + [lt_cv_cygpath_installed=yes], + [lt_cv_cygpath_installed=no]) + ]) + AC_MSG_RESULT([$lt_cv_cygpath_installed]) + _LT_DECL([cygpath_installed], [lt_cv_cygpath_installed], + [0], [whether cygpath is installed])dnl + AS_IF([test "xyes" != "x$lt_cv_cygpath_installed"], + [ + AC_MSG_CHECKING([whether to use cmd with one slash or two slashes]) + AC_CACHE_VAL([lt_cv_cmd_slashes], + [ + _lt_result=`"${COMSPEC-cmd}" /c echo one-slash works. Not checked //c echo two-slashes 2>/dev/null` + AS_IF([test 0 != $?], + [AC_MSG_ERROR([Do not know how to convert paths])]) + AS_CASE([$_lt_result], + [one-slash*],[lt_cv_cmd_slashes="one"], + [two-slashes*],[lt_cv_cmd_slashes="two"], + [AC_MSG_ERROR([Do not know how to convert paths])] + ) + ]) + AC_MSG_RESULT([$lt_cv_cmd_slashes]) + ]) + ]) + ] +)dnl ])# _LT_PATH_CONVERSION_FUNCTIONS