Antwort: Re: [RFA, fixincludes] add quotes around directory pathname

Sandra Loosemore
Tue Jan 20 14:53:00 GMT 2009

[resending to fix cc list]

Markus Milleder wrote:
> Would it be worth the hassle to have one of the GCC auto testers build in a location with spaces in the path ?
> Maybe for 4.5 ?

As I noted previously, using a pathname with spaces causes the mkheaders and scripts to fall over completely.  I spent a few days looking at this
and found that would need more or less a complete rewrite, with
different logic and different ways of representing its internal data structures,
not just adding quotes around filenames here and there.  For instance, it's
building up work queues as strings consisting of space-separated pathnames and
iterating over them with "for".  I'm told that in sh, the only thing that
correctly recognizes whitespace-containing quoted strings when splitting tokens
is "$@".  (You can use arrays to do this in bash, but we're not assuming bash
for this script.)  And is already using "$@" in a somewhat different
way, so that all needs to be rewritten too.  Fun, fun.

Long story short...  I'm not interested in doing such a rewrite, but anybody
else who wants to do it is welcome to try.  :-P

The hack I've proposed is just a workaround to allow a non-space-containing
symbolic link pathname to be used in place of the real space-containing
pathname.  As I said when I posted the patch, I would just have committed it as
obvious if we weren't in stage 4.  This isn't supposed to involve opening the
can of worms.


More information about the Gcc-patches mailing list