[Top][All Lists]

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

Re: new module 'system-quote'

From: Bruno Haible
Subject: Re: new module 'system-quote'
Date: Wed, 09 May 2012 11:20:56 +0200
User-agent: KMail/4.7.4 (Linux/3.1.10-1.9-desktop; KDE/4.7.4; x86_64; ; )

Eli Zaretskii wrote:
> > The test suite of the module 'system-quote' reveals that the '*' is also
> > special for CreateProcess on Windows and needs to be escaped
> What about '?'?  Should we quote it as well?

The statements that I have in the unit test

    check_one (interpreter, prog, "?");
    check_one (interpreter, prog, "foo?bar");

did not fail (on Windows XP).

> wildcard
> characters ? and * _cannot_ be protected from expansions on Windows
> Vista and later.  According to this:
> http://connect.microsoft.com/VisualStudio/feedback/details/98756/vs2005-setargv-obj-wildcard-handling-broken
> MS modified their implementation of command-line globbing in versions
> of MSVCRT starting with those systems, such that the wildcards are
> expanded even if they are inside quotes.

It sounds like they did the change in the newer MSVC runtime libraries,
not in the old MSVCRT. Which would mean that mingw is not impacted, only
MSVC built binaries.

In any case, can someone please run the testsuite for this module on
Windows 7 and report the results?
  $ ./gnulib-tool --create-testdir --dir=/tmp/testdir \
                  --with-tests --single-configure system-quote
then copy the directory to a Windows machine and configure it for mingw
or MSVC use.

> This thread on the MinGW list:
> http://sourceforge.net/mailarchive/forum.php?thread_name=83ipgb656k.fsf%40gnu.org&forum_name=mingw-users
> indicates that MinGW in some future version will probably invoke its
> own globbing code instead, so at least MinGW programs will soon be
> exempt from this terrible misfeature.  But other programs, and in
> particularly those supplied as part of Windows or compiled with the MS
> compilers, cannot benefit from MinGW workarounds.  So I think a caveat
> is in order here, because sooner or later people will bump into this
> and will be mightily surprised.

Yes, this sounds dangerous. But can someone test what actually happens
on Windows 7?


reply via email to

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