bug-gnulib
[Top][All Lists]
Advanced

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

Re: new modules 'open', 'fopen', 'freopen'


From: Eric Blake
Subject: Re: new modules 'open', 'fopen', 'freopen'
Date: Sat, 06 Oct 2007 22:26:24 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070728 Thunderbird/2.0.0.6 Mnenhy/0.7.5.666

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

According to Bruno Haible on 10/6/2007 8:50 PM:
> 
> The precise circumstances are not clear to me. When I run, from an rxvt
> running the msys /bin/sh,
> 
>   $ H:/msys/local/bin/msgfmt.exe --statistics /dev/null
> 
> it succeeds.

This is because the msys shell is specially compiled with a hack that
alters command line arguments that look like filenames into their windows
equivalent, before invoking the child program.  And sometimes this hack
backfires, when a command line argument is translated even though it
shouldn't have been.

> When from this shell, I run "cmd" (the Microsoft command
> interpreter), and from there
> 
>   H:...> H:/msys/local/bin/msgfmt.exe --statistics /dev/null
> 
> it fails:

That is because cmd.exe does not do this command line mutilation, and the
mingw runtime does not do it either.  [It's also one of the reasons I
personally prefer cygwin over mingw - it is much nicer to have the libc
runtime do the file name mapping rather than the shell, so that all
programs do the mapping the same way without the need for wrapper functions.]

> 
> Should other Cygwin syntaxes, like "/cygdrive/c/autoexec.bat", be converted
> to native Woe32 syntax as well? Maybe. It has not been reported so far.

I wouldn't worry about it unless people complain - the idea of using a
cygwin environment to cross-compile to a mingw environment is full of
enough other pitfalls that you don't need to bend over backwards to make
it easy - anyone capable of actually pulling it off should also be smart
enough to recognize the limits inherent in such a setup.

- --
Don't work too hard, make some time for fun as well!

Eric Blake             address@hidden
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Cygwin)
Comment: Public key at home.comcast.net/~ericblake/eblake.gpg
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD4DBQFHCF/u84KuGfSFAYARAsWkAJ9vCwKOqDicFvXWZWPXENYp89FxJwCY43gy
HkzjJfvmytaO+3nOL55nPA==
=0SXR
-----END PGP SIGNATURE-----




reply via email to

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