From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20123 invoked by alias); 27 Nov 2015 09:30:06 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 20110 invoked by uid 89); 27 Nov 2015 09:30:05 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.5 required=5.0 tests=AWL,BAYES_50,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-io0-f179.google.com Received: from mail-io0-f179.google.com (HELO mail-io0-f179.google.com) (209.85.223.179) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Fri, 27 Nov 2015 09:30:04 +0000 Received: by ioir85 with SMTP id r85so109325487ioi.1 for ; Fri, 27 Nov 2015 01:30:02 -0800 (PST) MIME-Version: 1.0 X-Received: by 10.107.10.199 with SMTP id 68mr43526371iok.75.1448616602348; Fri, 27 Nov 2015 01:30:02 -0800 (PST) Received: by 10.107.130.23 with HTTP; Fri, 27 Nov 2015 01:30:02 -0800 (PST) In-Reply-To: <91DCAC3CB99C724EB365BB64677FBE7B01DD6C@MX204CL04.corp.emc.com> References: <91DCAC3CB99C724EB365BB64677FBE7B01DD6C@MX204CL04.corp.emc.com> Date: Fri, 27 Nov 2015 10:10:00 -0000 Message-ID: Subject: Re: Argument parsing with gcc compiled program From: Jan Nijtmans To: cygwin@cygwin.com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-11/txt/msg00452.txt.bz2 2015-11-26 21:30 GMT+01:00 Gluszczak, Glenn : > Sorry I should have specified, this is not bash as this happens with the gcc compiled > program within a Command Prompt session. > > > K:\>a.exe -s something "something d\:\\hello" > > Command-line arguments: > argv[0] a > argv[1] -s > argv[2] something > argv[3] something d\:\hello > CL: K:\sat-misc\src\sat-main\sat\src\wiz\a -s something "something d\:\hello" I think it's both "bash" and "cmd.exe" who do backslash substitution, even though they don't follow the same rules. gcc cannot do anything about it. See: Regards, Jan Nijtmans -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple