X-Recipient: archive-cygwin AT delorie DOT com DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; q=dns; s=default; b=cL qLhPAdAJ1XFLCkoCJ725X6d7VlUfAoopUaHDhRvDxd39e23Mv+v3x5lOoflLKIvX L+tpi8grwDTXbEzFrjEN1oa1wi/98k7ULBHxzeeQQcG+Ix1PGn3C+IBrO3PVl+ug 9/s7kuqV5Awx+pyWLkkVee3RI7RYOCNbsJlZXsjsU= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:in-reply-to:references:date :message-id:subject:from:to:content-type; s=default; bh=OOnsY7WX rA05LH8zSrhKMwSz0z4=; b=PqIyKDAdhiArhkRhhLv34LuYhrq2/9cFTQBQ0G2x Ij883dG59QzwvASVbrBadl8wdPEEN4Mumd56ocEjxSVXHrg7iZlrSmf6KbHGT/f1 AtVgwOC0LK4E9lZvlbvJPMofFG1zxP9Y19g/C5WdVpD/wQIvUVQb8Ec7buZ4KNd5 4Kk= Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com 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 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) In-Reply-To: <91DCAC3CB99C724EB365BB64677FBE7B01DD6C@MX204CL04.corp.emc.com> References: <91DCAC3CB99C724EB365BB64677FBE7B01DD6C AT MX204CL04 DOT corp DOT emc DOT com> Date: Fri, 27 Nov 2015 10:30:02 +0100 Message-ID: Subject: Re: Argument parsing with gcc compiled program From: Jan Nijtmans To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes 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