diff options
Diffstat (limited to 'cpp/test/IceUtil/unicode/Client.cpp')
-rw-r--r-- | cpp/test/IceUtil/unicode/Client.cpp | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/cpp/test/IceUtil/unicode/Client.cpp b/cpp/test/IceUtil/unicode/Client.cpp index 32425cc7454..f05cb7646b7 100644 --- a/cpp/test/IceUtil/unicode/Client.cpp +++ b/cpp/test/IceUtil/unicode/Client.cpp @@ -23,8 +23,8 @@ using namespace std; // converts these BOMs back and forth. // -//COMPILERFIX: Borland C++ 2010 doesn't support wmain for console applications. -#if defined(_WIN32) && !defined(__BCPLUSPLUS__) +//COMPILERFIX: MINGW doesn't support wmain for console applications. +#if defined(_WIN32) && !defined(__MINGW32__) int wmain(int argc, wchar_t* argv[]) @@ -42,11 +42,11 @@ main(int argc, char* argv[]) { #ifdef _WIN32 -#ifdef __BCPLUSPLUS__ +# ifdef __MINGW32__ dir = argv[1]; -#else +# else dir = IceUtil::wstringToString(argv[1]); -#endif +# endif dir += "\\"; #else dir = argv[1]; @@ -179,7 +179,8 @@ main(int argc, char* argv[]) cout << "ok" << endl; } -#ifndef __BCPLUSPLUS__ + +#ifndef __MINGW32__ { cout << "testing UTF-8 filename... "; IceUtilInternal::ifstream fn(dir + "filename.txt"); @@ -206,11 +207,11 @@ main(int argc, char* argv[]) int fd = IceUtilInternal::open(filepath, O_RDONLY); test(fd > 0); -#if defined(_MSC_VER) && (_MSC_VER >= 1400) +# if defined(_MSC_VER) && (_MSC_VER >= 1400) test(_close(fd) == 0); -#else +# else test(close(fd) == 0); -#endif +# endif FILE* f = IceUtilInternal::fopen(filepath, "r"); test(f != 0); |