Page MenuHomeFreeBSD

Use ftell() instead of reading _offset from FILE directly.
ClosedPublic

Authored by jhb on Dec 10 2015, 9:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 1, 3:29 AM
Unknown Object (File)
Wed, May 1, 3:24 AM
Unknown Object (File)
Tue, Apr 30, 11:34 PM
Unknown Object (File)
Mon, Apr 22, 10:50 AM
Unknown Object (File)
Mon, Apr 22, 10:28 AM
Unknown Object (File)
Sun, Apr 14, 5:50 PM
Unknown Object (File)
Mon, Apr 8, 10:44 PM
Unknown Object (File)
Jan 8 2024, 7:56 PM
Subscribers

Details

Reviewers
pi
Summary

Don't access the _offset member of FILE directly. Instead, use
ftell() to obtain the current file offset.

Note: I did not use ftello() since the rest of this file uses
fseek() and ftell(). Also, it might be more direct to use fstat()
to obtain the file's size rather than fseek() / ftell(), but I went
with the simpler change.

The goal here is to permit us to make FILE more opaque to minimize
future ABI compat shims.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 1557
Build 1563: arc lint + arc unit

Event Timeline

jhb retitled this revision from to Use ftell() instead of reading _offset from FILE directly..
jhb updated this object.
jhb edited the test plan for this revision. (Show Details)
pi added a reviewer: pi.
pi added a subscriber: pi.

Looks ok, testbuilds fine

This revision is now accepted and ready to land.Jan 24 2016, 2:20 PM