From: carlo\.bramix <car...@li...> - 2009-07-01 18:50:12
|
Hello! Problem solved. I updated to 1.0.10 like you and the problem disappeared: argc/argv are in dos format when executable is lauched from CMD and in unix format when it's launched from bash. Thank you very much! Sincerely, Carlo Bramini. ---------- Initial Header ----------- >From : "Keith Marshall" kei...@us... To : min...@li... Cc : Date : Tue, 30 Jun 2009 20:30:22 +0100 Subject : Re: [Mingw-users] Problem with (argc,argv) under MSYS > On Tuesday 30 June 2009 14:34:07 Earnie Boyd wrote: > > > and it's ok... now I retry the same test.exe under bash but I > > > get the same output! > > > > The test.exe is a native program and therefore the arguments are > > given as windows expects it. > > > > > Instead, I was expecting this one: > > > > > > argc=3 > > > argv[0]=test > > > argv[1]=-c > > > argv[2]=(display "foo") > > > > > > I though that bash had to convert the arguments to something > > > like to: > > > > MSYS will only convert posix paths to native windows paths. It > > will pass arguments to native programs untouched otherwise. > > Hmm. I'm *not* seeing the behaviour reported by the OP; with > dumpargs.c as in: > http://thread.gmane.org/gmane.comp.gnu.mingw.msys/3719 > > and with: > > $ uname -a > MINGW32_NT-5.0 ... 1.0.11(0.46/3/2) 2009-01-29 00:39 i686 Msys > > $ sh --version > GNU bash, version 3.1.0(1)-release (i686-pc-msys) > Copyright (C) 2005 Free Software Foundation, Inc. > > $ dumpargs -c '(display "foo")' > argv[0]: d:\usr\sandbox\local\bin\dumpargs.exe > argv[1]: -c > argv[2]: (display "foo") > > which seems to match the OP's expectations--but not experience--while > cmd.exe says, (as for the OP): > > D:\usr\sandbox\local\bin> dumpargs -c '(display "foo")' > argv[0]: dumpargs > argv[1]: -c > argv[2]: '(display > argv[3]: foo)' > > -- > > Regards, > Keith. > > ------------------------------------------------------------------------------ > _______________________________________________ > MinGW-users mailing list > Min...@li... > > This list observes the Etiquette found at > http://www.mingw.org/Mailing_Lists. > We ask that you be polite and do the same. > > Most annoying abuses are: > 1) Top posting > 2) Thread hijacking > 3) HTML/MIME encoded mail > 4) Improper quoting > 5) Improper trimming > _______________________________________________ > You may change your MinGW Account Options or unsubscribe at: > https://lists.sourceforge.net/lists/listinfo/mingw-users > |