diff options
author | Philip Kaufmann <phil.kaufmann@t-online.de> | 2012-05-17 18:30:09 +0200 |
---|---|---|
committer | Philip Kaufmann <phil.kaufmann@t-online.de> | 2012-05-17 18:30:09 +0200 |
commit | 5f9861953eff5f9755f29e9bab6254ae4206937e (patch) | |
tree | f9fe4bfb148999ae5ddd80e8358403fe609cca49 /src | |
parent | cf2f7c30a3b461c8db8703f3d522076fdacd81ba (diff) | |
download | bitcoin-5f9861953eff5f9755f29e9bab6254ae4206937e.tar.xz |
fix RenameOver() and FileCommit() functions, to not generate compilation errors
Diffstat (limited to 'src')
-rw-r--r-- | src/main.h | 4 | ||||
-rw-r--r-- | src/util.cpp | 3 |
2 files changed, 2 insertions, 5 deletions
diff --git a/src/main.h b/src/main.h index d9eea2a329..3da2e0c5b3 100644 --- a/src/main.h +++ b/src/main.h @@ -10,10 +10,6 @@ #include "net.h" #include "script.h" -#ifdef WIN32 -#include <io.h> /* for _commit */ -#endif - #include <list> class CWallet; diff --git a/src/util.cpp b/src/util.cpp index 82c16feda6..7a163632c8 100644 --- a/src/util.cpp +++ b/src/util.cpp @@ -47,6 +47,7 @@ namespace boost { #ifndef NOMINMAX #define NOMINMAX #endif +#include <io.h> /* for _commit */ #include "shlobj.h" #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) { #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); #else int rc = std::rename(src.string().c_str(), dest.string().c_str()); |