[Gdal-dev] apps / MinGW

Radim Blazek radim.blazek at gmail.com
Wed Apr 12 10:26:07 EDT 2006


On 4/12/06, Frank Warmerdam <warmerdam at pobox.com> wrote:
> 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.

I had problems with GRASS raster driver, it is using functions from
GRASS library not VSI functions.
I thought to add the code above to gdalinfo.c etc. but if it is problem
only for GRASS I understand that it is not best.
I dont know how to fix that better.

Radim

> 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