Further to bug report

Russ Allbery rra at stanford.edu
Tue Jul 18 22:14:26 UTC 2000



David Luyer <david_luyer at pacific.net.au> writes:

> Further to my report of problems under BSD/OS caused by a history file
> over 2G in size, just to note, GNU libc on Linux uses "fseeko" and
> "ftello" to "correct the POSIX interfaces" by using an off_t instead of
> a long.

> Maybe the solution is to use these where available when a seek may be >
> 32 bits.

INN already does this.  See include/clibrary.h.  That won't fix the QIO
problem, but I was planning on fixing that shortly anyway and due to your
bug report will try to get it into INN 2.3.0 before it's released.

fgetpos and fsetpos are defined in the ANSI C standard, IIRC, as returning
int, so they're not portably usable for fseeko/ftello replacements.  The
return value from fgetpos is also specifically stated as unusable for
anything other than passing to fsetpos:

     The fgetpos() function stores the current value of the file position
     indicator for the stream pointed to by stream in the object pointed
     to by pos.  The value stored contains unspecified information usable
     by fsetpos(3S) for repositioning the stream to its position at the
     time of the call to fgetpos().

They may be usable on BSD/OS, though.  The real solution would be for
BSD/OS to get with the program and implement fseeko and ftello like every
other vendor who supports large files....

-- 
Russ Allbery (rra at stanford.edu)             <http://www.eyrie.org/~eagle/>



More information about the inn-bugs mailing list