From: Stepan Kasal Date: Tue, 13 May 2008 19:40:55 +0000 (-0600) Subject: Work around MSYS and Cygwin bugs when dealing with trailing space. X-Git-Tag: v2.63~82 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=809b3e5353f4091e55a8cd918af31309e40b3d1c;p=thirdparty%2Fautoconf.git Work around MSYS and Cygwin bugs when dealing with trailing space. * tests/atlocal.in (func_sanitize_dir_name): Let atlocal succeed, even when platform bugs are tickled. Reported by Keith Marshall and Eric Blake. --- diff --git a/ChangeLog b/ChangeLog index 5af9cd029..dc0272415 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2008-05-13 Stepan Kasal + + Work around MSYS and Cygwin bugs when dealing with trailing space. + * tests/atlocal.in (func_sanitize_dir_name): Let atlocal succeed, + even when platform bugs are tickled. + Reported by Keith Marshall and Eric Blake. + 2008-05-12 Ralf Wildenhues Let AC_MSG_FAILURE report pwd. diff --git a/tests/atlocal.in b/tests/atlocal.in index baef9868a..ad72c374f 100644 --- a/tests/atlocal.in +++ b/tests/atlocal.in @@ -44,11 +44,12 @@ else fi # Can we create directories with trailing whitespaces in their name? -rm -rf 'tdir /' -mkdir 'tdir ' && touch 'tdir /tfile' 2>/dev/null -if test -f 'tdir /tfile'; then - func_sanitize_dir_name () { echo "$@"; } -else - func_sanitize_dir_name () { echo "$@" | sed 's/ *$//'; } -fi -rm -rf 'tdir /' +rm -rf 'tdir ' && mkdir 'tdir ' && touch 'tdir /tfile' 2>/dev/null +a=$? +rm -rf 'tdir ' +case $a$? in #( +00) + func_sanitize_dir_name () { echo "$@"; } ;; #( +*) + func_sanitize_dir_name () { echo "$@" | sed 's/ *$//'; } ;; +esac