bug-gnulib
[Top][All Lists]
Advanced

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

Re: quotearg.c's shell_quoting_style and MinGW


From: Bruno Haible
Subject: Re: quotearg.c's shell_quoting_style and MinGW
Date: Sat, 05 May 2012 20:08:45 +0200
User-agent: KMail/4.7.4 (Linux/3.1.10-1.9-desktop; KDE/4.7.4; x86_64; ; )

Eli Zaretskii wrote:
> When quoting a shell command argument (using shell_quoting_style or
> shell_always_quoting_style), quotearg.c uses the '..' style of
> quoting.  This doesn't work for MinGW, which supports only the ".."
> style.  This causes, e.g., diff3 to fail for file names with embedded
> whitespace or other special characters, when compiled for MinGW.

What exactly did not work? Does 'diff3' give an error message that
it cannot find the file? Does a unit test from the diffutils package
not work? Does 'diff3' produce an output that is incompatible with
other tools (such as 'patch' or 'emacs')?

In other words, please state a "How to reproduce" recipe.

> +/* The (system-dependent) shell quoting character.  */
> +#ifdef __MINGW32__

This #ifdef is true for mingw but false for native Windows executables
built with MSVC. Is that what you intended?

> +          if (quoting_style == shell_always_quoting_style)
> +         {
> +           if (elide_outer_quotes)
> +             goto force_outer_quoting_style;
> +           if (c == '"' && c == shell_quoting_char)
> +             {
> +               STORE ('"');
> +               STORE ('\\');
> +               STORE ('"');
> +             }
> +         }

No tabs in gnulib source code, please. See gnulib/README for a way
to avoid tabs.

Bruno




reply via email to

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