aboutsummaryrefslogtreecommitdiff
path: root/src/util.cpp
diff options
context:
space:
mode:
authorJeff Garzik <[email protected]>2012-05-17 09:34:12 -0700
committerJeff Garzik <[email protected]>2012-05-17 09:34:12 -0700
commit0c7fd9458576ae4b182f561bfd25ce16ca8bb5da (patch)
treef9fe4bfb148999ae5ddd80e8358403fe609cca49 /src/util.cpp
parentMerge pull request #1295 from jgarzik/txn-retval (diff)
parentfix RenameOver() and FileCommit() functions, to not generate compilation errors (diff)
downloaddiscoin-0c7fd9458576ae4b182f561bfd25ce16ca8bb5da.tar.xz
discoin-0c7fd9458576ae4b182f561bfd25ce16ca8bb5da.zip
Merge pull request #1332 from Diapolo/fix_RenameOver_FileCommit_Win32
fix RenameOver() and FileCommit() functions, to not generate compilation errors
Diffstat (limited to 'src/util.cpp')
-rw-r--r--src/util.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/util.cpp b/src/util.cpp
index 82c16feda..7a163632c 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());