-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 According to Larry Jones on 12/14/2007 9:41 AM: > Eric Blake writes: >> Larry Jones <lawrence.jones <at> siemens.com> writes: >>> On a more general note, it looks like fseeko and ftello both need more >>> work to be generally useful on platforms that have a wide off_t but >>> don't have native fseeko/ftello. >> Name such a platform, then we'll worry about it. > > BSD/OS 4.2, but it's obsolete and thus easily ignored. But isn't that > the main point of having fseeko and ftello in gnulib?
There are two reasons for fseeko. One is for platforms that lack it. But the other is for POSIX compliance for the requirement to position the underlying fd offset when seeking on input streams (many BSD-based implementations only follow the C99 rules, where such behavior is undefined; but several GNU programs rely on the POSIX semantics where such behavior is well-defined). > If not, then > there doesn't seem to be any reason for having the messy code in fseeko > that grubs around in the FILE structure so as to be able to call lseek; > just call the native fseek[o] and be done with it. The messy code is for the POSIX compliance bit. Providing the replacement fseeko for platforms that lack it is indeed much easier if it weren't for this other aspect. - -- Don't work too hard, make some time for fun as well! Eric Blake [EMAIL PROTECTED] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Cygwin) Comment: Public key at home.comcast.net/~ericblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFHY2eS84KuGfSFAYARAiV7AJ450i0jomWT06PQiktD7oMbDWMhPACfWmIg 5L7YGwBNGCNrLawzz0hn24M= =0/Dy -----END PGP SIGNATURE-----