diff --git a/libc/src/ctype/isascii.h b/libc/src/ctype/isascii.h --- a/libc/src/ctype/isascii.h +++ b/libc/src/ctype/isascii.h @@ -9,6 +9,8 @@ #ifndef LLVM_LIBC_SRC_CTYPE_ISASCII_H #define LLVM_LIBC_SRC_CTYPE_ISASCII_H +#undef isascii + namespace __llvm_libc { int isascii(int c); diff --git a/libc/test/src/ctype/isascii_test.cpp b/libc/test/src/ctype/isascii_test.cpp --- a/libc/test/src/ctype/isascii_test.cpp +++ b/libc/test/src/ctype/isascii_test.cpp @@ -6,10 +6,10 @@ // //===----------------------------------------------------------------------===// -#include "src/ctype/isascii.h" - #include "utils/UnitTest/Test.h" +#include "src/ctype/isascii.h" + TEST(IsAscii, DefaultLocale) { // Loops through all characters, verifying that ascii characters // (which are all 7 bit unsigned integers) diff --git a/libc/utils/UnitTest/FuchsiaTest.h b/libc/utils/UnitTest/FuchsiaTest.h --- a/libc/utils/UnitTest/FuchsiaTest.h +++ b/libc/utils/UnitTest/FuchsiaTest.h @@ -10,11 +10,5 @@ #define LLVM_LIBC_UTILS_UNITTEST_FUCHSIATEST_H #include -// isascii is being undef'd because Fuchsia's headers define a macro for -// isascii. that macro causes errors when isascii_test.cpp references -// __llvm_libc::isascii since the macro is applied first. -#ifdef isascii -#undef isascii -#endif #endif // LLVM_LIBC_UTILS_UNITTEST_FUCHSIATEST_H