This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [gfortran,patch] Fix PR libfortran/23262 (on mingw32)
- From: FX Coudert <fxcoudert at gmail dot com>
- To: Brooks Moses <bmoses at stanford dot edu>
- Cc: fortran at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org
- Date: Sun, 04 Sep 2005 08:23:49 +0200
- Subject: Re: [gfortran,patch] Fix PR libfortran/23262 (on mingw32)
- References: <4319F791.9080000@gmail.com> <431A1248.2000602@stanford.edu>
This patch is likely to do interesting things on Cygwin, which has an
option (at install time) to switch between DOS and Unix newlines.
According to my cursory understanding of how this works [1], if DOS mode
is selected at install (or, more particularly, when the disk is mounted;
it's a mount option), Cygwin uses the text-mode or binary-mode switch to
decide whether or not to translate the line endings from DOS-mode (on
disk) to Unix-mode (as seen by the program).
My guess is that the result of this patch will be to "freeze" the
newline handling on Cygwin to the setting that was active at compile
time, rather than allowing it to adapt to the current system settings.
For distributed binaries, this means the end user's settings would get
completely ignored.
I'm not sure how this works either, but from the FAQ link you posted, it
seems clear that only a few people use the mount switch. Plus, I do
think that specifying binary mode in the code does override the user
option (the opposite behaviour doesn't seem to make sense to me).
Moreover, the current situation is that the compiler souldn't work on
cygwin with text-mode switch, for the same reasons it doesn't work on
mingw32.
Can someone accointed with cygwin experiment a bit with this patch and
give us an update on the current situation? Maybe Paul T when his NIST
patch is done?
FX