On Fri, Jan 6, 2012 at 10:04 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> Date: Fri, 6 Jan 2012 08:48:12 -0500
> From: Earnie Boyd <earnie@users.sourceforge.net>
> > "Breaking" it would mean that there would be _some_ way of getting a *
> > into a program, albeit a way that requires slightly different commands
> > in each case.  That is a lesser evil than not having a way at all.
> >
> >
> Adding /mingw/lib/CRT_noglob.o to the build of showargv you will see:
> $ showargv '*'
> command line: <"c:\mnt\home\Earnie Boyd\spud\showargv.exe" *>
> argv[0]: c:\mnt\home\Earnie Boyd\spud\showargv.exe
> argv[1]: *
> So you have a way to get a * into the Windows program as long as you follow
> the Windows rules.

While this is true, such a showargv would not be a useful program when
invoked from the Windows shell.

Why not?

c:\mnt\home\Earnie Boyd\spud>showargv "*"
command line: <showargv "*">
argv[0]: showargv
argv[1]: *

To recap, all this came out of a discussion of how to run a MinGW
build of Grep through its test suite using the MSYS shell.  Surely,
you do not seriously suggest to build a MinGW Grep with globbing
disabled.  And Grep is just an example here; any package that has a
reasonably complex test suite will need the MSYS shell to run it,
after building with MinGW.

Oh, now you're talking yourself into silly circles.  *You* made an argument that MSYS couldn't pass an * into the program.  I showed that MSYS can in fact do just that.  *You* made an argument that you might want to parse the * yourself but you were not seeing a way to have MSYS send it just a * when in fact MSYS can.  As for the Grep test suite, unless you disable the globbing in the program with _CRT_glob = 0 then you cannot do what you want to do.
-- https://sites.google.com/site/earnieboyd