diff options
author | Brad King <brad.king@kitware.com> | 2020-05-13 11:08:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-05-13 11:08:22 (GMT) |
commit | 833ae0a63beb790ee606221ee5ce178d08b441ae (patch) | |
tree | 8470bdfc58340338d12ba539a47270fcaf0e2b61 /Source/kwsys/testEncoding.cxx | |
parent | ad11526dc477f988d157eb0e78327addc8e9aa5f (diff) | |
parent | 3674f6a47000db2b519a44062b8ce46db4f12691 (diff) | |
download | CMake-833ae0a63beb790ee606221ee5ce178d08b441ae.zip CMake-833ae0a63beb790ee606221ee5ce178d08b441ae.tar.gz CMake-833ae0a63beb790ee606221ee5ce178d08b441ae.tar.bz2 |
Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream
* upstream-KWSys:
KWSys 2020-05-13 (d4da6980)
Diffstat (limited to 'Source/kwsys/testEncoding.cxx')
-rw-r--r-- | Source/kwsys/testEncoding.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/kwsys/testEncoding.cxx b/Source/kwsys/testEncoding.cxx index d672aed..ee93e8d 100644 --- a/Source/kwsys/testEncoding.cxx +++ b/Source/kwsys/testEncoding.cxx @@ -10,10 +10,10 @@ #include KWSYS_HEADER(Encoding.h) #include <algorithm> +#include <clocale> +#include <cstdlib> +#include <cstring> #include <iostream> -#include <locale.h> -#include <stdlib.h> -#include <string.h> // Work-around CMake dependency scanning limitation. This must // duplicate the above list of headers. @@ -59,7 +59,7 @@ static int testHelloWorldEncoding() std::string str2 = kwsys::Encoding::ToNarrow(wstr); wchar_t* c_wstr = kwsysEncoding_DupToWide(str.c_str()); char* c_str2 = kwsysEncoding_DupToNarrow(c_wstr); - if (!wstr.empty() && (str != str2 || strcmp(c_str2, str.c_str()))) { + if (!wstr.empty() && (str != str2 || strcmp(c_str2, str.c_str()) != 0)) { std::cout << "converted string was different: " << str2 << std::endl; std::cout << "converted string was different: " << c_str2 << std::endl; ret++; |