Add fenv.h header

Summary:
Some implementations of fenv.h use macros to define the functions they provide. This can cause problems when `std::fegetround()` is spelled in source.

This patch adds a `fenv.h` header to libc++ for the sole purpose of turning those macros into real functions.

Reviewers: rsmith, mclow.lists, ldionne

Reviewed By: rsmith

Subscribers: mgorny, christof, libcxx-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/libcxx/trunk@353767 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Eric Fiselier
2019-02-11 23:47:19 +00:00
parent fc1ec361d3
commit ecc2c089fd
7 changed files with 241 additions and 12 deletions

View File

@@ -24,7 +24,10 @@ module std [system] {
header "errno.h"
export *
}
// <fenv.h> provided by C library.
module fenv_h {
header "fenv.h"
export *
}
// <float.h> provided by compiler or C library.
module inttypes_h {
header "inttypes.h"