[GRASS-dev] native WinGRASS and attribute data deadlock, next try

Moritz Lennert mlennert at club.worldonline.be
Sun Sep 23 15:04:08 EDT 2007


On Sat, September 22, 2007 05:27, Glynn Clements wrote:
> My next suggestion is to re-write xdr_stdio to use read() and write()
> instead of fread() and fwrite(), e.g.:
>
> -	if (fread((caddr_t)lp, sizeof(long), 1, (FILE *)xdrs->x_private) != 1)
> +	if (read(fileno((FILE *)xdrs->x_private), (caddr_t)lp, sizeof(long)) !=
> sizeof(long))
>

That seems to work !
I just changed the four occurrences of fread/fwrite to read/write (see
diff attached) and now v.out.ogr runs smoothly both with Benjamin's test
point data and with the spearfish landcover areas.

I'll post new binaries as soon as compilation is over, so that others can
test as well.

Thanks a lot, Glynn !

Moritz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xdr_stdio.diff
Type: application/octet-stream
Size: 1161 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-dev/attachments/20070923/f87704c5/xdr_stdio.obj


More information about the grass-dev mailing list