From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22776 invoked by alias); 26 Aug 2005 21:23:47 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 22647 invoked by uid 22791); 26 Aug 2005 21:23:12 -0000 Received: from dumbledore.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.11) by sourceware.org (qpsmtpd/0.30-dev) with ESMTP; Fri, 26 Aug 2005 21:23:12 +0000 Received: (qmail 17229 invoked from network); 26 Aug 2005 21:23:10 -0000 Received: from unknown (HELO ?192.168.0.3?) (mitchell@127.0.0.2) by mail.codesourcery.com with ESMTPA; 26 Aug 2005 21:23:10 -0000 Message-ID: <430F8835.5010508@codesourcery.com> Date: Sat, 27 Aug 2005 00:08:00 -0000 From: Mark Mitchell User-Agent: Mozilla Thunderbird 1.0.2 (Windows/20050317) MIME-Version: 1.0 To: DJ Delorie CC: maihem@maihem.org, gcc@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: 4.2 Project: "@file" support References: <200508250450.j7P4oWkW029722@sparrowhawk.codesourcery.com> <430D59CE.7090904@codesourcery.com> <200508251451.j7PEpguC019369@greed.delorie.com> <430DDD71.1000105@codesourcery.com> <430E5323.5010207@codesourcery.com> <200508252359.j7PNxect009672@greed.delorie.com> In-Reply-To: <200508252359.j7PNxect009672@greed.delorie.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-SW-Source: 2005-08/txt/msg00820.txt.bz2 DJ Delorie wrote: > However, I don't see a way to do that for *all* OSs, and people seem > to want that. So while I won't actively support it in libiberty, I > won't hinder it either. Great! > To make it as unobtrusive as possible, I request that the > application-side only require one line: > > functionname(&argc, &argv); > > Let's name it something generic, and assume that *all* command line > fiddling will be done within that function, and that the application > never need worry about it - ever. OK. > I suggest that DJGPP's implementation define the functionality (at > least, the parts that make sense to implmement globally), as we've had > over a decade of experience with it, and thus it's likely to cause the > least surprises: > > http://www.delorie.com/bin/cvsweb.cgi/djgpp/src/libc/crt0/c1args.c?rev=1.10 > > (search for expand_response_files) First, let me say that I don't feel strongly about anything after this point in this mail. So, I can be pushed around pretty easily here; I'm more after some solution than any particular one. I found the DJGPP code a little complicated, but I'm sure I can work it out. I also did some additional experiments with MSVC and found some slightly odd behaviors, like double-quoting works, in general, but: "foo bar" is actually two arguments. I guess I'd argue that the behavior Windows people probably *most* expect is MSVC (rather than DJGPP), but that may not be true of GNU people in particular, who might be more likely to have used DJGPP. However, I have a counter-proposal, which is that we use libiberty's existing buildargv. That seems maximally consistent. I didn't do that originally because I didn't know it was there, until very late in the game. We would have to factor out the code so that we could avoid the buildargv behavior that creates a non-empty argv from an empty string, but other than that it seems like we could just leverage the quoting behavior that's already there. Thanks, -- Mark Mitchell CodeSourcery, LLC mark@codesourcery.com (916) 791-8304