From f0fb3e7c6f0659cc6bfc93b48d4fa660b3b39fb9 Mon Sep 17 00:00:00 2001 From: Jose Date: Fri, 24 Jun 2016 16:47:27 +0200 Subject: Fix (ICE-7200) - _tempnam usage in Windows --- cpp/src/Slice/Preprocessor.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cpp/src/Slice/Preprocessor.cpp') diff --git a/cpp/src/Slice/Preprocessor.cpp b/cpp/src/Slice/Preprocessor.cpp index b5470ff19a0..26f4bee7db1 100644 --- a/cpp/src/Slice/Preprocessor.cpp +++ b/cpp/src/Slice/Preprocessor.cpp @@ -236,10 +236,10 @@ Slice::Preprocessor::preprocess(bool keepComments, const string& extraArgs) // process call _tempnam before any of them call fopen and // they will end up using the same tmp file. // - char* name = _tempnam(0, ("slice-" + IceUtil::generateUUID()).c_str()); + wchar_t* name = _wtempnam(0, IceUtil::stringToWstring("slice-" + IceUtil::generateUUID()).c_str()); if(name) { - _cppFile = name; + _cppFile = IceUtil::wstringToString(name); free(name); _cppHandle = IceUtilInternal::fopen(_cppFile, "w+"); } -- cgit v1.2.3