This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [gfortran,patch] Fix PR libfortran/23262 (on mingw32)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]