This is an archive of the discontinued LLVM Phabricator instance.

Use fseek/ftell instead of fseeko/ftello when Newlib is the libc
ClosedPublic

Authored by jroelofs on Dec 11 2014, 1:22 PM.

Details

Reviewers
mclow.lists
jfb
Summary

... because fseeko and ftello are under STRICT_ANSI, and off_t is long (so they're the same anyway).

Diff Detail

Event Timeline

jroelofs updated this revision to Diff 17187.Dec 11 2014, 1:22 PM
jroelofs retitled this revision from to Use fseek/ftell instead of fseeko/ftello when Newlib is the libc.
jroelofs updated this object.
jroelofs edited the test plan for this revision. (Show Details)
jroelofs added reviewers: jfb, mclow.lists.
jroelofs added a subscriber: Unknown Object (MLST).
jfb added inline comments.Dec 11 2014, 1:32 PM
include/fstream
810

#if defined(_WIN32) || defined(_NEWLIB_VERSION)

829

Ditto.

894

Ditto.

include/iosfwd
184

Where does this come from?

jroelofs added inline comments.Dec 11 2014, 1:34 PM
include/iosfwd
184

<__config>

jroelofs updated this revision to Diff 17190.Dec 11 2014, 1:36 PM

Fix defined(_WIN32)'s, and this time with more context.

jfb added inline comments.Dec 11 2014, 1:41 PM
include/iosfwd
184

I meant: add a comment to the code so people reading it know why long int is used.

jroelofs updated this revision to Diff 17192.Dec 11 2014, 1:44 PM

Add comment explaining why streamoff should be 'long int' for newlib.

jfb edited edge metadata.Dec 11 2014, 1:59 PM

lgtm, will let Marshall comment.

Any opinion on this, @mclow.lists?

mclow.lists accepted this revision.Feb 2 2015, 6:43 AM
mclow.lists edited edge metadata.

LGTM.

This revision is now accepted and ready to land.Feb 2 2015, 6:43 AM
jroelofs closed this revision.Feb 2 2015, 7:06 AM

Committed r227804. Thanks @mclow.lists!