segment lib does not use LFS
|Reported by:||mmetz||Owned by:|
|Keywords:||segment lib with LFS||Cc:|
The segment library, managing temporary data stored on disk, does not support LFS, although file sizes can easily break the 2GB boundary. Fixed in trunk r39760. All is needed is to add
#compile if LFS Large File Support present: ifneq ($(USE_LARGEFILES),) EXTRA_CFLAGS = -D_FILE_OFFSET_BITS=64 endif
to the Makefile. I have also added checks and warnings if LFS is not available but file size would exceed 2GB. In this case it exits with an error. Tested on Linux 32 bit (does not apply to Linux 64 bit). Not sure if this would be an enhancement or if the segment lib is defect because it tries to read/write to temporary files although it can't, lot's of ugly warnings that don't help much. Should this change be backported to grass6?