This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Re: Argument parsing with gcc compiled program
- From: Jan Nijtmans <jan dot nijtmans at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 27 Nov 2015 10:30:02 +0100
- Subject: Re: Argument parsing with gcc compiled program
- Authentication-results: sourceware.org; auth=none
- References: <91DCAC3CB99C724EB365BB64677FBE7B01DD6C at MX204CL04 dot corp dot emc dot com>
2015-11-26 21:30 GMT+01:00 Gluszczak, Glenn <glenn.gluszczak@emc.com>:
> 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:
<http://blogs.msdn.com/b/twistylittlepassagesallalike/archive/2011/04/23/everyone-quotes-arguments-the-wrong-way.aspx>
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