This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Improper quoting inside eval arguments in toplevel configure


Jeffrey A Law <law@cygnus.com> writes:

|>   In message <je9068imry.fsf@hawking.suse.de>you write:
|>   > This patch fixes some improper quoting inside arguments of eval in the
|>   > toplevel configure script that causes inappropriate double expansion.
|>   > 
|>   > 
|>   > 1999-09-15  Andreas Schwab  <schwab@suse.de>
|>   > 
|>   > 	* configure: Fix quoting inside arguments of eval.
|> Thanks.  Installed.
|> 
|> It would help if you could provide some kind of information about what kinds
|> of values would lead to double expansion so that if we ever need to look at
|> this again we would know more precisely why you made this change.

Its not the values that matter, the commands do always double expansion.
For example:

        eval $withopt="$optarg"

This expands $withopt and $optarg and then rereads the expanded string.
Before doing the assignment the right hand side is expanded again.  That's
bad since if $optarg contains meta characters they are interpreted instead
of taken literally.

Andreas.

-- 
Andreas Schwab                                  "And now for something
SuSE Labs                                        completely different."
schwab@suse.de
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]