[Gdal-dev] apps / MinGW

Frank Warmerdam warmerdam at pobox.com
Wed Apr 12 09:37:15 EDT 2006


Radim Blazek wrote:
> Hi,
> I found that GDAL applications compiled with MinGW do not
> work correctly because they open binary files in text mode
> and convert CR/LF.
> 
> It can be fixed by
> #ifdef WIN32
> #include <stdlib.h> /*  _fmode */
> #include <fcntl.h> /*  _O_BINARY */
> #undef _fmode
> int _fmode = _O_BINARY;
> #endif
> 
> Can I add this to the applications in gda/apps?
> 
> See also http://grass.itc.it/pipermail/grass5/2006-February/021066.html

Radim,

Where exactly are you thinking to put this?  You refer to gdal/apps,
but the mainline programs in that directly would not normally open
files directly, they would use VSI services.  If MinGW builds are using
the Win32 VSI code - as they ought - then I would think this would already
be taken care of.

Best regards,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org




More information about the Gdal-dev mailing list