[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fseeko bug
From: |
Eric Blake |
Subject: |
Re: fseeko bug |
Date: |
Fri, 14 Dec 2007 22:32:41 -0700 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Thunderbird/2.0.0.9 Mnenhy/0.7.5.666 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
According to Larry Jones on 12/14/2007 12:25 PM:
> Eric Blake writes:
>> maybe it's at least worth adding a compile-time assertion that sizeof(off_t)
>> ==sizeof(long) when !HAVE_FSEEKO.
>
> Since I actually have a platform where that's not the case, I'd prefer a
> run-time test that only objects when there's an actual problem:
Which platform? And is there a ChangeLog entry for your patch? Does the
platform lseek actually respect off_t? I still find it strange that there
would not be an fseeko when the platform is capable of larger-than-long
file offsets. But given your claim, it looks like you are correct that we
are stuck with adding overflow checking in that case, and likewise for
ftello. But can we at least avoid compiler warnings for platforms where
off_t is the same size as long, such that this condition can never be true?
> + else if (offset < LONG_MIN || offset > LONG_MAX)
- --
Don't work too hard, make some time for fun as well!
Eric Blake address@hidden
-----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
iD8DBQFHY2bc84KuGfSFAYARAo1fAJ9dzf+WnL0SWWge8sqqf9NGtxotwgCfZQiG
VHqj34ah5Q+inOxaYbJei7M=
=vpL/
-----END PGP SIGNATURE-----
- Re: fseeko bug, (continued)
Re: fseeko bug,
Eric Blake <=
Re: fseeko bug, Eric Blake, 2007/12/16