From d7995b807fc11129cc0a971ef5ee7a9a09a52bf2 Mon Sep 17 00:00:00 2001 From: Tsuda Kageyu Date: Tue, 24 Jun 2014 01:29:15 +0900 Subject: [PATCH] Fixed the tests to work with MSVC when UNICODE is set. --- tests/utils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/utils.h b/tests/utils.h index 00cef628..5f2f9814 100644 --- a/tests/utils.h +++ b/tests/utils.h @@ -29,8 +29,8 @@ inline string copyFile(const string &filename, const string &ext) string newname = string(tempnam(NULL, NULL)) + ext; string oldname = testFilePath(filename) + ext; #ifdef _WIN32 - CopyFile(oldname.c_str(), newname.c_str(), FALSE); - SetFileAttributes(newname.c_str(), GetFileAttributes(newname.c_str()) & ~FILE_ATTRIBUTE_READONLY); + CopyFileA(oldname.c_str(), newname.c_str(), FALSE); + SetFileAttributesA(newname.c_str(), GetFileAttributesA(newname.c_str()) & ~FILE_ATTRIBUTE_READONLY); #else char buffer[4096]; int bytes;