Ticket #7076: fs.patch
File fs.patch, 2.4 KB (added by , 10 years ago) |
---|
-
libs\filesystem\src\operations.cpp
1758 1758 return p; 1759 1759 1760 1760 # else // Windows 1761 1761 1762 1762 std::vector<path::value_type> buf(GetTempPathW(0, NULL)); 1763 1763 1764 if (buf.empty() || GetTempPathW( buf.size(), &buf[0])==0)1764 if (buf.empty() || GetTempPathW(static_cast<DWORD>(buf.size()), &buf[0])==0) 1765 1765 { 1766 1766 if(!buf.empty()) ::SetLastError(ENOTDIR); 1767 1767 error(true, ec, "boost::filesystem::temp_directory_path"); 1768 1768 return path(); 1769 1769 } 1770 1770 -
libs\filesystem\src\unique_path.cpp
88 88 else errval = 0; 89 89 } 90 90 } 91 91 92 92 if (!errval) 93 93 { 94 BOOL gen_ok = ::CryptGenRandom(handle, len, static_cast<unsigned char*>(buf));94 BOOL gen_ok = ::CryptGenRandom(handle, static_cast<DWORD>(len), static_cast<unsigned char*>(buf)); 95 95 if (!gen_ok) 96 96 errval = ::GetLastError(); 97 97 ::CryptReleaseContext(handle, 0); 98 98 } 99 99 100 100 if (!errval) return; -
libs\filesystem\src\windows_file_codecvt.cpp
37 37 wchar_t* to, wchar_t* to_end, wchar_t*& to_next) const 38 38 { 39 39 UINT codepage = AreFileApisANSI() ? CP_ACP : CP_OEMCP; 40 40 41 41 int count; 42 42 if ((count = ::MultiByteToWideChar(codepage, MB_PRECOMPOSED, from, 43 from_end - from, to, to_end - to)) == 0)43 static_cast<int>(from_end - from), to, static_cast<int>(to_end - to))) == 0) 44 44 { 45 45 return error; // conversion failed 46 46 } 47 47 48 48 from_next = from_end; 49 49 to_next = to + count; … … 57 57 char* to, char* to_end, char* & to_next) const 58 58 { 59 59 UINT codepage = AreFileApisANSI() ? CP_ACP : CP_OEMCP; 60 60 61 61 int count; 62 62 if ((count = ::WideCharToMultiByte(codepage, WC_NO_BEST_FIT_CHARS, from, 63 from_end - from, to, to_end - to, 0, 0)) == 0)63 static_cast<int>(from_end - from), to, static_cast<int>(to_end - to), 0, 0)) == 0) 64 64 { 65 65 return error; // conversion failed 66 66 } 67 67 68 68 from_next = from_end; 69 69 to_next = to + count; 70 70 *to_next = '\0'; 71 71 return ok; 72 72 } 73 73 74 74 # endif // BOOST_WINDOWS_API 75 75