[winGRASS] GRASS6beta1 on WINDOWS/MINGW / raster read error

Javier A. Yebrin javier.yebrin at ing.unitn.it
Wed Apr 13 06:34:08 EDT 2005


Thanks a lot Glynn. 

Thanks to you and Luke from the MINGW-users list I've manage to fix this.

 http://www.mingw.org/MinGWiki/index.php/binary

For the moment I'm using the 4th method listed in the previous formentioned
site:

[...]
4) Yet again another way:

#include <stdlib.h> /* _fmode */
#include <fcntl.h> /*  _O_BINARY */

unsigned int _CRT_fmode = _O_BINARY;

main ()
{
}
[...]

Cheers

Javier

> -----Original Message-----
> From: Glynn Clements [mailto:glynn at gclements.plus.com] 
> Sent: Saturday, April 09, 2005 5:19 AM
> To: Javier A. Yebrin
> Cc: wingrass at grass.itc.it
> Subject: Re: [winGRASS] GRASS6beta1 on WINDOWS/MINGW / raster 
> read error
> 
> 
> 
> Javier A. Yebrin wrote:
> 
> > Finally I've got most of grass modules compiled under 
> Mingw/Msys. Then 
> > started to test them (first the raster modules, of course), 
> and found 
> > some strange behaviour depending on the studied raster. 
> I've used the 
> > Spearfish database and ran r.sum for all the present rasters (using 
> > spot.image to define the current region). These are the 
> results(first 
> > line the raster name, then the stdout or
> > stderr):
> 
> > aspect
> > WARNING: Fail of initial read of compressed file [aspect in 
> PERMANENT]
> 
> > You may see that the response changes from one type of raster to 
> > another, whether it is compresed or not. I'm trying to debug this 
> > module at the moment...
> > 
> > In the meanwhile, do you have any ideas?
> 
> The usual reason for that error message on Windows is that 
> something is performing CRLF->LF conversion, which is 
> inappropriate for a binary file.
> 
> ISTR that the MinGW runtime includes a function to 
> enable/disable the conversions. You need to ensure that all 
> I/O is done without conversions.
> 
> -- 
> Glynn Clements <glynn at gclements.plus.com>
> 
> 




More information about the grass-windows mailing list