mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-12 12:52:35 -03:00
Merge pull request #1332 from Diapolo/fix_RenameOver_FileCommit_Win32
fix RenameOver() and FileCommit() functions, to not generate compilation errors
This commit is contained in:
commit
0c7fd94585
2 changed files with 2 additions and 5 deletions
|
@ -10,10 +10,6 @@
|
||||||
#include "net.h"
|
#include "net.h"
|
||||||
#include "script.h"
|
#include "script.h"
|
||||||
|
|
||||||
#ifdef WIN32
|
|
||||||
#include <io.h> /* for _commit */
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include <list>
|
#include <list>
|
||||||
|
|
||||||
class CWallet;
|
class CWallet;
|
||||||
|
|
|
@ -47,6 +47,7 @@ namespace boost {
|
||||||
#ifndef NOMINMAX
|
#ifndef NOMINMAX
|
||||||
#define NOMINMAX
|
#define NOMINMAX
|
||||||
#endif
|
#endif
|
||||||
|
#include <io.h> /* for _commit */
|
||||||
#include "shlobj.h"
|
#include "shlobj.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -913,7 +914,7 @@ void CreatePidFile(const boost::filesystem::path &path, pid_t pid)
|
||||||
bool RenameOver(boost::filesystem::path src, boost::filesystem::path dest)
|
bool RenameOver(boost::filesystem::path src, boost::filesystem::path dest)
|
||||||
{
|
{
|
||||||
#ifdef WIN32
|
#ifdef WIN32
|
||||||
return MoveFileEx(src.string().c_str(), dest.string().c_str(),
|
return MoveFileExA(src.string().c_str(), dest.string().c_str(),
|
||||||
MOVEFILE_REPLACE_EXISTING);
|
MOVEFILE_REPLACE_EXISTING);
|
||||||
#else
|
#else
|
||||||
int rc = std::rename(src.string().c_str(), dest.string().c_str());
|
int rc = std::rename(src.string().c_str(), dest.string().c_str());
|
||||||
|
|
Loading…
Reference in a new issue