bug-libtool
[Top][All Lists]
Advanced

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

Re: ltmain.sh quoting fix.


From: Gary V . Vaughan
Subject: Re: ltmain.sh quoting fix.
Date: Sat, 30 Jun 2001 01:50:57 +0100

On Friday 25 May 2001 12:47 am, Andrew C. Feren wrote:
> I actually discovered this while compiling an other package (Ethereal)
> which bundles a copy of libtool 1.4.  I've included a minimal fix to
> correct the problem I was seeing and a more complete fix along with a
> patch for sh.test.
> 
> The basic problem is that test "never sees" uninitialized variables
> that are not quoted.
> 
> test $some_unset_var = test_case
> 
> vs
> 
> test "$some_unset_var" = test_case
> 
> in the former case you get the following error message (assuming my sh :-)
> test: argument expected

I almost applied this patch.

However, I think that it is important to be able to tell if these variables 
are left unset. If they are not set (usually to either `yes' or `no') then 
depending on the style of the test a blank would effectively be defaulting to 
one of the set values.  Clearly, this is wrong, and we want to be able to 
catch it as early as possible, whereas quoting the variables will mask the 
immediate bug by effecting a pseudo-random default.

Cheers,
        Gary.
-- 
  ())_.  Gary V. Vaughan     gary@(oranda.demon.co.uk|gnu.org)
  ( '/   Research Scientist  http://www.oranda.demon.co.uk        ,_())____
  / )=   GNU Hacker          http://www.gnu.org/software/libtool   \'      `&
`(_~)_   Tech' Author        http://sources.redhat.com/autobook    =`---d__/



reply via email to

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