GNOME Bugzilla – Bug 300204
[PATCH] Doxygen disobeys Cygwin 'text/binary mount mode'
Last modified: 2005-05-16 19:34:20 UTC
Cygwin has a per path setting that controls whether text files default to behaving in a unix-like (LF) or a DOS-like (CRLF) way. Explicitly passing a text-mode open flag to open() or fopen() forces the issue, but most Cygwin users will expect and prefer the default to be followed. Here is a patch that corrects the issue: Index: qtools/qfile_unix.cpp =================================================================== RCS file: /u/kp3softd/cvsroot/qtools/qfile_unix.cpp,v retrieving revision 1.8 diff -u -p -r1.8 qfile_unix.cpp --- qtools/qfile_unix.cpp 3 Nov 2003 18:04:42 -0000 1.8 +++ qtools/qfile_unix.cpp 11 Apr 2005 15:20:00 -0000 @@ -175,7 +175,11 @@ bool QFile::open( int m ) } #if defined(HAS_TEXT_FILEMODE) if ( isTranslated() ) +#ifdef __CYGWIN__ + /* Do nothing, allowing the Cygwin mount mode to take effect. */; +#else oflags |= OPEN_TEXT; +#endif else oflags |= OPEN_BINARY; #endif @@ -214,7 +218,11 @@ bool QFile::open( int m ) qstrcpy( perm2, perm ); #if defined(HAS_TEXT_FILEMODE) if ( isTranslated() ) +#ifdef __CYGWIN__ + /* Do nothing, allowing the Cygwin mount mode to take effect. */; +#else strcat( perm2, "t" ); +#endif else strcat( perm2, "b" ); #endif
Raising priority to make maintainers aware of patch.
This fixed my problem with Cygwin. Thanks, Max!
This of course works on the basis that Cygwin is a Unixy environment. (I configure using platform linux-g++ on Cygwin). I am aware that there appear to be stale remnants of a win32-g++ platform targeting Cygwin, but this I believe to be the wrong approach, since the environment Cygwin exposes to programs is far more like Linux than like Windows.
This is good to know. If linux-g++ fixes the problem then only the docs and/or the configure script needs to be changed to indicate this. I agree that the patch is not necessary assuming the linux-g++ works ( I haven't verified the linux-g++ works ).
No, you've got it all backwards. This patch will have absolutely no effect if doxygen is being compiled with a win32 platform ID, because the file it touches will be completely ignored. I am pointing out I compile and happily use Doxygen using the linux-g++ platform ID on Cygwin, despite the fact that there is some kind of (possibly stale) Cygwin configuration in the win32-g++ platform ID.
Thanks, I'll include the patch in the next CVS update.
This should now be fixed in release 1.4.3. Please verify.
Confirmed fixed.