[RFA, fixincludes] add quotes around directory pathname

Bruce Korb bruce.korb@gmail.com
Mon Jan 19 19:48:00 GMT 2009


On Mon, Jan 19, 2009 at 10:47 AM, Ralf Wildenhues
<Ralf.Wildenhues@gmx.de> wrote:
> As a note, the particular fix you refer to should probably escape single
> quotes that are part of the filename, replacing them with '\''.

OTOH, if you are using path names with characters not belonging to the set of
portable file name characters, you cannot be certain you will not run
into problems.
e.g. file names starting with a colon were generally shell scripts for
a really long time.
So, don't do that anymore.  That said, going to a little trouble handling
situations where some OS'es commonly like to put spaces in names is not
extreme.  Figuring out that someone has apostrophes in their path seems
a little over the top, however.  (But go ahead, if you want to....)

Finally, back to Mark:
> As far as I know, this isn't a regression; therefore, it should go in
> 4.5 only.

It seems to me I put that lapse into the code a decade ago.  Nevertheless,
we know it will trigger an issue on these "we like spaces in directory names"
platforms, so I don't see a strong argument for causing unnecessary problems
for those (poor :) folks.  Once past critical stabilizaion, go ahead and apply
it to 4.4.X.  It's safe.  It's simple.  It does not affect internal compiler
stability, merely the build-the-compiler environment.  End of pitch.
In the end, it's your choice.

Cheers - Bruce



More information about the Gcc-patches mailing list