This is an archive of the discontinued LLVM Phabricator instance.

[libc++] Add configuration define for off_t functions
ClosedPublic

Authored by smeenai on Oct 18 2016, 11:24 AM.

Details

Summary

Create this define in __config and use it elsewhere, instead of checking
the operating system/library defines in other files. The aim is to
reduce the usage of _WIN32 outside __config. No functional change.

Diff Detail

Repository
rL LLVM

Event Timeline

smeenai updated this revision to Diff 75051.Oct 18 2016, 11:24 AM
smeenai retitled this revision from to [libc++] Add configuration define for off_t functions.
smeenai updated this object.
smeenai added reviewers: EricWF, mclow.lists.
smeenai added a subscriber: cfe-commits.
smeenai updated this object.Oct 18 2016, 11:26 AM
mclow.lists edited edge metadata.Oct 18 2016, 3:06 PM

I like this; I would like to see no mentions of _WIN32 outside of <__config>.
That being said, we usually write things in the negative in libc++.

So the flag would be _LIBCPP_HAS_NO_OFF_T_FUNCTIONS, and the tests would be #ifdef _LIBCPP_HAS_NO_OFF_T_FUNCTIONS

smeenai updated this revision to Diff 75142.Oct 19 2016, 6:53 AM
smeenai edited edge metadata.

Addressing @mclow.lists's comment

EricWF accepted this revision.Oct 31 2016, 7:29 AM
EricWF edited edge metadata.
This revision is now accepted and ready to land.Oct 31 2016, 7:29 AM
This revision was automatically updated to reflect the committed changes.