[GRASS-dev] fseeko() in libiostream

Paul Kelly paul-grass at stjohnspoint.co.uk
Mon Oct 6 12:09:50 EDT 2008


In some recent enhancements to the iostream library, 
include/iostream/ami_stream.h had a call to fseek() changed to fseeko(). 
This now doesn't compile on Windows; a sample error is:

sh-2.04$ make
make OBJ.i686-pc-mingw32
make[1]: Entering directory `/c/grass/grass7/lib/iostream'
make[1]: `OBJ.i686-pc-mingw32' is up to date.
make[1]: Leaving directory `/c/grass/grass7/lib/iostream'
c++ -I/c/grass/grass7/dist.i686-pc-mingw32/include -I/c/grass/extra/include -O2 -s -I/c/grass/extra/include  -D_FILE_OFFSET_BITS=64 -DPACKAGE=\""grasslibs"\"   -I/c/grass/grass7/dist.i686-pc-mingw32/include -o OBJ.i686-pc-mingw32/ami_stream.o -c ami_stream.cc
In file included from ami_stream.cc:47:
c:/grass/grass7/dist.i686-pc-mingw32/include/grass/iostream/ami_stream.h: In member function `AMI_err AMI_STREAM<T>::seek(off_t)':
c:/grass/grass7/dist.i686-pc-mingw32/include/grass/iostream/ami_stream.h:432: error: there are no arguments to `fseeko' that depend on a template parameter, so a declaration of `fseeko' must be available
c:/grass/grass7/dist.i686-pc-mingw32/include/grass/iostream/ami_stream.h:432: error: (if you use `-fpermissive', G++ will accept your code, but allowing the use of an undeclared name is deprecated)
make: *** [OBJ.i686-pc-mingw32/ami_stream.o] Error 1
sh-2.04$

Am I right in thinking that if large file support is configured properly 
there should be no need to use fseeko() to seek in large files, and 
fseek() should be fine? I looked in r.in.xyz which only uses fseek() and 
ISTR discussion about it handling huge files recently, although perhaps 
that involved reading from stdin.

Paul



More information about the grass-dev mailing list