llvm-project/libcxx/test/std/depr/depr.c.headers
Eric Fiselier 1670772adc Fix implementation of ::abs and std::abs LWG 2192.
Summary:
All overloads of `::abs` and `std::abs` must be present in both `<cmath>` and `<cstdlib>`. This is problematic to implement because C defines `fabs` in `math.h` and `labs` in `stdlib.h`. This introduces a circular dependency between the two headers. 

This patch implements that requirement by moving `abs` into `math.h` and making `stdlib.h` include `math.h`. In order to get the underlying C declarations from the "real" `stdlib.h` inside our `math.h` we need some trickery. Specifically we need to make `stdlib.h` include next itself.

Suggestions for a cleaner implementation are welcome.

Reviewers: mclow.lists, ldionne

Reviewed By: ldionne

Subscribers: krytarowski, fedor.sergeev, dexonsmith, jdoerfert, jsji, libcxx-commits

Differential Revision: https://reviews.llvm.org/D60097

llvm-svn: 359020
2019-04-23 18:01:58 +00:00
..
assert_h.pass.cpp Support tests in freestanding 2019-02-04 20:31:13 +00:00
ciso646.pass.cpp Support tests in freestanding 2019-02-04 20:31:13 +00:00
complex.h.pass.cpp Support tests in freestanding 2019-02-04 20:31:13 +00:00
ctype_h.pass.cpp Support tests in freestanding 2019-02-04 20:31:13 +00:00
errno_h.pass.cpp Support tests in freestanding 2019-02-04 20:31:13 +00:00
fenv_h.pass.cpp Add fenv.h header 2019-02-11 23:47:19 +00:00
float_h.pass.cpp Support tests in freestanding 2019-02-04 20:31:13 +00:00
inttypes_h.pass.cpp Support tests in freestanding 2019-02-04 20:31:13 +00:00
iso646_h.pass.cpp Support tests in freestanding 2019-02-04 20:31:13 +00:00
limits_h.pass.cpp Support tests in freestanding 2019-02-04 20:31:13 +00:00
locale_h.pass.cpp Support tests in freestanding 2019-02-04 20:31:13 +00:00
math_h.pass.cpp Fix implementation of ::abs and std::abs LWG 2192. 2019-04-23 18:01:58 +00:00
setjmp_h.pass.cpp Support tests in freestanding 2019-02-04 20:31:13 +00:00
signal_h.pass.cpp Support tests in freestanding 2019-02-04 20:31:13 +00:00
stdarg_h.pass.cpp Support tests in freestanding 2019-02-04 20:31:13 +00:00
stdbool_h.pass.cpp Support tests in freestanding 2019-02-04 20:31:13 +00:00
stddef_h.pass.cpp Support tests in freestanding 2019-02-04 20:31:13 +00:00
stdint_h.pass.cpp Support tests in freestanding 2019-02-04 20:31:13 +00:00
stdio_h.pass.cpp Support tests in freestanding 2019-02-04 20:31:13 +00:00
stdlib_h.pass.cpp Fix implementation of ::abs and std::abs LWG 2192. 2019-04-23 18:01:58 +00:00
string_h.pass.cpp Support tests in freestanding 2019-02-04 20:31:13 +00:00
tgmath_h.pass.cpp Support tests in freestanding 2019-02-04 20:31:13 +00:00
time_h.pass.cpp Support tests in freestanding 2019-02-04 20:31:13 +00:00
uchar_h.pass.cpp Support tests in freestanding 2019-02-04 20:31:13 +00:00
wchar_h.pass.cpp Support tests in freestanding 2019-02-04 20:31:13 +00:00
wctype_h.pass.cpp Support tests in freestanding 2019-02-04 20:31:13 +00:00