From ef3103a5c9b65ca3f7ef27301741cf8fe4ab8fb1 Mon Sep 17 00:00:00 2001 From: KO Myung-Hun Date: Thu, 11 Oct 2018 17:35:12 +0900 Subject: [PATCH] Replace std::wcslen() with wcslen() OS/2 kLIBC has wcslen(), but it is not in std namespace. --- googletest/include/gtest/internal/gtest-port.h | 7 ------- googletest/src/gtest-printers.cc | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/googletest/include/gtest/internal/gtest-port.h b/googletest/include/gtest/internal/gtest-port.h index 4a1bf0e8..64bf67f0 100644 --- a/googletest/include/gtest/internal/gtest-port.h +++ b/googletest/include/gtest/internal/gtest-port.h @@ -402,13 +402,6 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; # include #endif // GTEST_OS_WINDOWS -#if GTEST_OS_OS2 -namespace std { -// OS/2 kLIBC has wcslen(), but it is not in ::std namespace. -using ::wcslen; -} -#endif - #if GTEST_OS_LINUX_ANDROID // Used to define __ANDROID_API__ matching the target NDK API level. # include // NOLINT diff --git a/googletest/src/gtest-printers.cc b/googletest/src/gtest-printers.cc index 3c0e7582..12e6dbb6 100644 --- a/googletest/src/gtest-printers.cc +++ b/googletest/src/gtest-printers.cc @@ -348,7 +348,7 @@ void PrintTo(const wchar_t* s, ostream* os) { *os << "NULL"; } else { *os << ImplicitCast_(s) << " pointing to "; - PrintCharsAsStringTo(s, std::wcslen(s), os); + PrintCharsAsStringTo(s, wcslen(s), os); } } #endif // wchar_t is native