This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: PATCH: Support "@file"
- From: DJ Delorie <dj at redhat dot com>
- To: nickc at redhat dot com
- Cc: mark at codesourcery dot com, binutils at sources dot redhat dot com
- Date: Tue, 4 Oct 2005 15:02:15 -0400
- Subject: Re: PATCH: Support "@file"
- References: <200509262117.j8QLHGxG022375@sethra.codesourcery.com> <433D556D.7080009@redhat.com> <433DA660.90206@codesourcery.com> <4340F830.20701@redhat.com> <4341892C.7080900@codesourcery.com> <434228DE.7000705@redhat.com>
> >> --extra-switches-from-file=<file>
>
> > If we do it, I think we should do that in the existing expandargv. That
> > will ensure it's consistent across all programs which use expandargv,
> > which seems like a good thing.
>
> Agreed - DJ - do you think that this is a good idea ? I can submit a
> patch for exandargv if you like.
I don't see the need, and neither DJGPP nor MSVC support it (they both
support @file).
Plus, @file is for more than just switches - it's for arbitrary
command line arguments, including for example, file names found with
"find".
If you want to play with expandargv, I'd rather the effort go into
supporting find's -print0 option, by detecting NULs in the file and
switching to NUL-delimited arguments instead of whitespace (and
skipping the quoting logic too). This feature would give us a
security layer for managing files that the usual shell quoting
doesn't.