This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] include/math.h: Re-enable missing C++11 decls on SunOS
ClosedPublic

Authored by mgorny on Aug 15 2016, 6:08 AM.

Details

Summary

The SunOS (tested on OpenIndiana 5.11) C library <math.h> includes
<iso/math_iso.h> which provides declarations for the standard math
routines, both for C and C++(03). However, it lacks the additional
integral variants for C++11 and the additional functions.

Therefore, replace the '#ifndef sun' that disables almost all
declarations with disabling the C++03 variants of common functions which
happens to overlap the AIX checks.

Bug: https://llvm.org/bugs/show_bug.cgi?id=28506

Diff Detail

Event Timeline

mgorny updated this revision to Diff 68029.Aug 15 2016, 6:08 AM
mgorny retitled this revision from to include/math.h: Re-enable missing C++11 decls on SunOS.
mgorny updated this object.
mgorny added reviewers: EricWF, mclow.lists.
mgorny added a subscriber: cfe-commits.
mgorny retitled this revision from include/math.h: Re-enable missing C++11 decls on SunOS to [libcxx] include/math.h: Re-enable missing C++11 decls on SunOS.Aug 15 2016, 6:39 AM
mclow.lists accepted this revision.Aug 15 2016, 8:08 AM
mclow.lists edited edge metadata.

I can't vouch for the correctness (not having a sun system to play with), but this LGTM.

at some point, the repeated expression !(defined(_LIBCPP_MSVCRT) || defined(_AIX) || defined(__sun__)) will get unwieldy enough that we'll want to give it a name, but that's for another patch.

Do you need someone to commit this for you?

This revision is now accepted and ready to land.Aug 15 2016, 8:08 AM

Yes, I don't have commit access. However, Eric wanted to review it as well, so please don't commit it yet.

EricWF accepted this revision.Aug 15 2016, 12:03 PM
EricWF edited edge metadata.

Also LGTM.

EricWF closed this revision.Aug 15 2016, 12:07 PM

r278716.