This is an archive of the discontinued LLVM Phabricator instance.

[libcxx] Add the missing limits.h header
ClosedPublic

Authored by rmaprath on Oct 7 2016, 3:16 AM.

Details

Summary

The implementation of [depr.c.headers] in D12747 introduced the necessary
C headers into libc++. This patch adds one more missing headers: limits.h

We spotted this due to a failing C++03 test [limits_h.pass.cpp] in our libc++
configuration; when the limits.h header is included from a C++ program, it now
bypassed the __config header and went directly into the underlying C library's
limits.h header, which is problematic for us because we use __config header to
configure the underlying C library's behaviour when used from a C++ context.

Diff Detail

Event Timeline

rmaprath updated this revision to Diff 73902.Oct 7 2016, 3:16 AM
rmaprath retitled this revision from to [libcxx] Add the missing limits.h header.
rmaprath updated this object.
rmaprath added reviewers: EricWF, mclow.lists, rsmith.
rmaprath updated this object.
rmaprath updated this object.
rmaprath added a subscriber: cfe-commits.
mclow.lists edited edge metadata.Oct 7 2016, 5:24 PM

This looks fine to me, but since @rsmith added all the other C headers, I'd like him to weigh in.

rsmith edited edge metadata.Oct 7 2016, 6:01 PM

I only skipped this one because it seemed pointless to me. I have no objection to providing it, and this change makes perfect sense if libc++ wants to guarantee that <__config> is included whenever any standard C++ header is included.

mclow.lists accepted this revision.Oct 7 2016, 6:48 PM
mclow.lists edited edge metadata.
This revision is now accepted and ready to land.Oct 7 2016, 6:48 PM
rmaprath closed this revision.Oct 10 2016, 1:49 AM

Thanks.

Committed as r283726.