dim created this revision. dim added reviewers: mclow.lists, EricWF, emaste. dim added subscribers: cfe-commits, bdrewery. Herald added a subscriber: emaste.
On FreeBSD, a number of math.h functions are actually defined as macros, such as `signbit()`, `fpclassify()` and others. Since libc++'s <cmath> attempts to do `using ::signbit;`, `using ::fpclassify;`, and so on, this results in compile errors: libcxx/include/cmath:309:9: error: '::signbit' has not been declared using ::signbit; ^ libcxx/include/cmath:310:9: error: '::fpclassify' has not been declared using ::fpclassify; ^ Here is a patch to exclude `signbit` through `isunordered`, and also `abs`, which we don't have in math.h. (Actually, I'm not sure that `::abs` should even be in here, since it is a stdlib.h function? We don't have it in math.h, in any case.) http://reviews.llvm.org/D18501 Files: include/cmath Index: include/cmath =================================================================== --- include/cmath +++ include/cmath @@ -306,6 +306,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD +#ifndef __FreeBSD__ using ::signbit; using ::fpclassify; using ::isfinite; @@ -319,13 +320,14 @@ using ::islessgreater; using ::isunordered; using ::isunordered; +#endif // __FreeBSD__ using ::float_t; using ::double_t; -#ifndef _AIX +#if !defined(_AIX) && !defined(__FreeBSD__) using ::abs; -#endif +#endif // !AIX && !__FreeBSD__ #ifndef __sun__ using ::acos;
Index: include/cmath =================================================================== --- include/cmath +++ include/cmath @@ -306,6 +306,7 @@ _LIBCPP_BEGIN_NAMESPACE_STD +#ifndef __FreeBSD__ using ::signbit; using ::fpclassify; using ::isfinite; @@ -319,13 +320,14 @@ using ::islessgreater; using ::isunordered; using ::isunordered; +#endif // __FreeBSD__ using ::float_t; using ::double_t; -#ifndef _AIX +#if !defined(_AIX) && !defined(__FreeBSD__) using ::abs; -#endif +#endif // !AIX && !__FreeBSD__ #ifndef __sun__ using ::acos;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits