Web lists-archives.com

Re: [Mingw-msys] Strange path transformation with Emacs

????? ???????? wrote:

> As you see, it works fine from under Windows command interpreter, but sh
> translates the Doctype into something incomprehensible. Unfortunately,

To be pendantic, it's not sh that is doing the translation, it's the
MSYS runtime.  Any MSYS app exec'ing any non-MSYS app would exhibit this
behavior, not just sh.

> xmlcatalog is called from a configure script, which obviously needs to be
> executed by sh.
> Can I do anything about it? Why is it translating the doctype at all, surely
> it doesn't look like an absolute path?

It's because the MSYS runtime treats arguments starting with - as
options, and looks inside them for POSIX-y paths.  It skips over the
character immediately following the - and then sees the second slash
which looks like the start of a POSIX path, triggering the translation.

If you escape-quote the argument it goes through untranslated:

$ xmlcatalog /etc/xml/catalog \"'-//OASIS//DTD DocBook XML V4.5//EN'\"

...but then the receiving app gets a literal " in its argv[] and it may
not be prepared to deal with that.  Otherwise I'm at a loss as to how to
force it through untranslated.  In response to this bug in the past it
has been proposed to modify the MSYS runtime to recognise an environment
variable that could be used to disable translation, but I don't think
anyone has implemented such a feature.


This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
Mingw-msys mailing list