[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unavoidable wildcard expansion on Windows 7

From: Eli Zaretskii
Subject: Re: unavoidable wildcard expansion on Windows 7
Date: Mon, 14 May 2012 00:40:08 +0300

> From: Bruno Haible <address@hidden>
> Cc: address@hidden
> Date: Sun, 13 May 2012 22:38:58 +0200
> There are many programs that except to get a wildcard expression or
> regular expression on the command line, such as
>   csplit expr find grep nl ptx sed tac tr

And Diff (the -x and -I switches), and 'ls' (the -I switch), and
'locate' (the -b switch), and many more.

> What's the recommendation for using these as mingw binaries?

My recommendation is to wait for the next release 3.21 of the MinGW
runtime, which will have its own globbing that bypasses the MSVCRT
one.  See


and especially this message:


where the MinGW maintainer announced a snapshot of MinGW runtime that
includes this new feature.  People who cannot wait could simply switch
to using the snapshot.

> Or shall we claim they're unsupported on mingw, and only supported as
> Cygwin binaries (where Cygwin handles the wildcard expansion according
> to the old rules)?

If compiled with earlier versions of MinGW, the wildcard expansion
should be expected to have subtle "issues" in MinGW programs on Vista
and later.  Most of those issues can be worked around in most
situations (e.g., use "*.[c]" instead of "*.c", "*.[c]c" instead of
"*.cc", etc.), but one needs to know what they are doing and be alert.

It is also possible to glob the original command line by hand inside
'main' or its subroutines.

Other than that, tough.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]