[PATCH] [libc++] Support Newlib as libc++'s C library [cmath part, part 2]

Marshall Clow mclow.lists at gmail.com
Mon Sep 22 14:19:10 PDT 2014


================
Comment at: include/cstdio:175
@@ -174,2 +174,3 @@
 using ::rewind;
+#undef clearerr
 using ::clearerr;
----------------
I think that these will cause warnings/errors if clearerr is not defined as a macro.

Should they be wrapped in #ifdef xxx  ??

cmath has a pattern for this; should that be used here?

    #ifdef isunordered
    template <class _A1, class _A2>
    _LIBCPP_ALWAYS_INLINE
    bool
    __libcpp_isunordered(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
    {
        return isunordered(__lcpp_x, __lcpp_y);
    }

    #undef isunordered
    bool isunordered(_A1 __lcpp_x, _A2 __lcpp_y) _NOEXCEPT
    {
        return __libcpp_isunordered(__lcpp_x, __lcpp_y);
    }
    #endif

http://reviews.llvm.org/D5420






More information about the cfe-commits mailing list