[libc][NFC] Make few maths functions buildable outside of LLVM libc build.
authorSiva Chandra Reddy <sivachandra@google.com>
Tue, 16 Feb 2021 06:58:21 +0000 (22:58 -0800)
committerSiva Chandra Reddy <sivachandra@google.com>
Tue, 16 Feb 2021 17:14:29 +0000 (09:14 -0800)
commitdba14814a69143a8763ed4276a38fa9509b5973d
tree3891104f21d7085b40d28d24e38b373ff5ca69a2
parent1a323c8a96afc53ef965a4268cd419cfde2f1890
[libc][NFC] Make few maths functions buildable outside of LLVM libc build.

Few math functions manipulate errno. They assumed that LLVM libc's errno
is available. However, that might not be the case when these functions
are used in a libc which does not use LLVM libc's errno. This change
switches such uses of LLVM libc's errno to the normal public errno macro.
This does not affect LLVM libc's build because the include order ensures
we get LLVM libc's errno. Also, the header check rule ensures we are only
including LLVM libc's errno.h.
libc/test/src/math/RoundToIntegerTest.h
libc/utils/FPUtil/CMakeLists.txt
libc/utils/FPUtil/NearestIntegerOperations.h