libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Simplify cwrapper handling a bit


From: Charles Wilson
Subject: Re: Simplify cwrapper handling a bit
Date: Tue, 11 Nov 2008 01:14:54 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.17) Gecko/20080914 Thunderbird/2.0.0.17 Mnenhy/0.7.5.666

Ralf Wildenhues wrote:
> OK to apply?

Not this bit:

> @@ -2611,14 +2596,8 @@ func_to_host_path ()
>              # *an error message* to stdout. So we must check for both
>              # error code of zero AND non-empty stdout, which explains
>              # the odd construction:
> -            func_to_host_path_tmp1=`winepath -w "$1" 2>/dev/null`
> -            if test "$?" -eq 0 && test -n "${func_to_host_path_tmp1}"; then
> -              func_to_host_path_result=`$ECHO "$func_to_host_path_tmp1" |\
> -                $SED -e "$lt_sed_naive_backslashify"`
> -            else
> -              # Allow warning below.
> -              func_to_host_path_result=""
> -            fi
> +            func_to_host_path_result=`( winepath -w "$1" ) 2>/dev/null |
> +              $SED -e "$lt_sed_naive_backslashify"`
>              ;;
>          esac
>          if test -z "$func_to_host_path_result" ; then

Roumen and I went round and round on that, The full comment block says:

            # Unfortunately, winepath does not exit with a non-zero
            # error code, so we are forced to check the contents of
            # stdout. On the other hand, if the command is not
            # found, the shell will set an exit code of 127 and print
            # *an error message* to stdout. So we must check for both
            # error code of zero AND non-empty stdout, which explains
            # the odd construction:

Your change eliminates ALL of that special handling, dealing with
winepath's quirks.

--
Chuck




reply via email to

[Prev in Thread] Current Thread [Next in Thread]