Merge "libc/Android.bp: fix bpfmt lint." into main
diff --git a/libc/include/math.h b/libc/include/math.h
index fc6c228..3e80083 100644
--- a/libc/include/math.h
+++ b/libc/include/math.h
@@ -308,20 +308,6 @@
#define islessgreater(x, y) __builtin_islessgreater((x), (y))
#define isunordered(x, y) __builtin_isunordered((x), (y))
-/*
- * https://code.google.com/p/android/issues/detail?id=271629
- * To be fully compliant with C++, we need to not define these (C doesn't
- * specify them either). Exposing these means that isinf and isnan will have a
- * return type of int in C++ rather than bool like they're supposed to be.
- *
- * GNU libstdc++ 4.9 isn't able to handle a standard compliant C library. Its
- * <cmath> will `#undef isnan` from math.h and only adds the function overloads
- * to the std namespace, making it impossible to use both <cmath> (which gets
- * included by a lot of other standard headers) and ::isnan.
- */
-int (isinf)(double __x) __attribute_const__;
-int (isnan)(double __x) __attribute_const__;
-
/* POSIX extensions. */
extern int signgam;
@@ -362,6 +348,7 @@
double scalb(double __x, double __exponent);
double drem(double __x, double __y);
int finite(double __x) __attribute_const__;
+int isinff(float __x) __attribute_const__;
int isnanf(float __x) __attribute_const__;
double gamma_r(double __x, int* _Nonnull __sign);
double lgamma_r(double __x, int* _Nonnull __sign);
@@ -402,6 +389,8 @@
#define M_2_SQRTPIl 1.128379167095512573896158903121545172L /* 2/sqrt(pi) */
#define M_SQRT2l 1.414213562373095048801688724209698079L /* sqrt(2) */
#define M_SQRT1_2l 0.707106781186547524400844362104849039L /* 1/sqrt(2) */
+int isinfl(long double __x) __attribute_const__;
+int isnanl(long double __x) __attribute_const__;
#endif
__END_DECLS
diff --git a/tests/math_test.cpp b/tests/math_test.cpp
index 493f3af..7ca0e75 100644
--- a/tests/math_test.cpp
+++ b/tests/math_test.cpp
@@ -309,9 +309,7 @@
// Historical BSD cruft that isn't exposed in <math.h> any more.
extern "C" int __isinf(double);
extern "C" int __isinff(float);
-extern "C" int isinff(float);
extern "C" int __isinfl(long double);
-extern "C" int isinfl(long double);
TEST(math_h, __isinf) {
#if defined(ANDROID_HOST_MUSL)
@@ -367,9 +365,7 @@
// Historical BSD cruft that isn't exposed in <math.h> any more.
extern "C" int __isnan(double);
extern "C" int __isnanf(float);
-extern "C" int isnanf(float);
extern "C" int __isnanl(long double);
-extern "C" int isnanl(long double);
TEST(math_h, __isnan) {
#if defined(ANDROID_HOST_MUSL)