[GRASS5] Re: [bug #3974] (grass) r.mapcalc/libgis failure with LFS enabled

Markus Neteler neteler at itc.it
Tue Jan 10 12:44:28 EST 2006


On Tue, Jan 10, 2006 at 06:15:07PM +0100, Glynn Clements via RT wrote:
> 
> Request Tracker wrote:
> 
> > this bug's URL: http://intevation.de/rt/webrt?serial_num=3974
> > -------------------------------------------------------------------------
> > 
> > Subject: r.mapcalc/libgis failure with LFS enabled
> 
> One thing which I note about the implemention of LFS in GRASS is that
> it works by defining the macros in config.h.
> 
> Consequently, every file which uses off_t must include config.h before
> including any other headers. Otherwise, you will have different source
> files assuming different sizes for off_t.
> 
> Historically, files have typically only included config.h if they need
> to explicitly use a specific macro which it defines.

The situation is:

find . -type f -name "*.c" -exec grep -l off_t {} \;
./raster3d/r3.in.v5d/v5d.c
./raster3d/r3.out.v5d/v5d.c
./raster/r.thin/io.c
./raster/r.support/modhead/modhead.c
./raster/r.support/modhead/row_addr.c
./lib/gis/get_row.c
./lib/gis/format.c
./lib/gis/put_row.c
./lib/gis/opencell.c
./lib/image/rdwr.c
./lib/segment/seek.c
./lib/segment/format.c

find . -type f -name "*.c" -exec grep -l off_t {} \; | xargs fgrep --files-without-match 'config.h'
./raster3d/r3.in.v5d/v5d.c
./raster3d/r3.out.v5d/v5d.c
./raster/r.thin/io.c
./lib/gis/opencell.c
./lib/image/rdwr.c
./lib/segment/seek.c

Are these the files to be fixed? Doesn't look like a big job.

The ./lib/segment/seek.c case would probably solve these bugs:
  http://www.intevation.de/rt/webrt?serial_num=3514&display=History
  (r.cost + r.walk as well, see at bottom of the page)
?

Markus




More information about the grass-dev mailing list