summaryrefslogtreecommitdiff
path: root/bin/bbackupd
diff options
context:
space:
mode:
authorChris Wilson <chris+github@qwirx.com>2009-03-21 18:48:19 +0000
committerChris Wilson <chris+github@qwirx.com>2009-03-21 18:48:19 +0000
commit4d33206efeeacf0a20d6daabb0f5bcfa6da78a39 (patch)
tree23283a52f7dead12a340f96a194582fc3974fb07 /bin/bbackupd
parenta3d70474128afaab98bbd6fa343760eb61178302 (diff)
Fix tests (hopefully) on Win32 for struct stat ino_t change from 16 to
64 bits.
Diffstat (limited to 'bin/bbackupd')
-rw-r--r--bin/bbackupd/BackupClientDirectoryRecord.cpp26
-rw-r--r--bin/bbackupd/Win32ServiceFunctions.cpp2
2 files changed, 14 insertions, 14 deletions
diff --git a/bin/bbackupd/BackupClientDirectoryRecord.cpp b/bin/bbackupd/BackupClientDirectoryRecord.cpp
index 10ffe604..4ecb81d9 100644
--- a/bin/bbackupd/BackupClientDirectoryRecord.cpp
+++ b/bin/bbackupd/BackupClientDirectoryRecord.cpp
@@ -149,12 +149,12 @@ void BackupClientDirectoryRecord::SyncDirectory(
// so byte order isn't considered.
MD5Digest currentStateChecksum;
- struct stat dest_st;
+ EMU_STRUCT_STAT dest_st;
// Stat the directory, to get attribute info
// If it's a symbolic link, we want the link target here
// (as we're about to back up the contents of the directory)
{
- if(::stat(rLocalPath.c_str(), &dest_st) != 0)
+ if(EMU_STAT(rLocalPath.c_str(), &dest_st) != 0)
{
// The directory has probably been deleted, so
// just ignore this error. In a future scan, this
@@ -199,8 +199,8 @@ void BackupClientDirectoryRecord::SyncDirectory(
std::vector<std::string> files;
bool downloadDirectoryRecordBecauseOfFutureFiles = false;
- struct stat link_st;
- if(::lstat(rLocalPath.c_str(), &link_st) != 0)
+ EMU_STRUCT_STAT link_st;
+ if(EMU_LSTAT(rLocalPath.c_str(), &link_st) != 0)
{
// Report the error (logs and
// eventual email to administrator)
@@ -258,7 +258,7 @@ void BackupClientDirectoryRecord::SyncDirectory(
::memset(&checksum_info, 0, sizeof(checksum_info));
struct dirent *en = 0;
- struct stat file_st;
+ EMU_STRUCT_STAT file_st;
std::string filename;
while((en = ::readdir(dirHandle)) != 0)
{
@@ -292,7 +292,7 @@ void BackupClientDirectoryRecord::SyncDirectory(
// prefer S_IFREG, S_IFDIR...
int type = en->d_type;
#else
- if(::lstat(filename.c_str(), &file_st) != 0)
+ if(EMU_LSTAT(filename.c_str(), &file_st) != 0)
{
// Report the error (logs and
// eventual email to administrator)
@@ -387,7 +387,7 @@ void BackupClientDirectoryRecord::SyncDirectory(
#ifdef WIN32
// We didn't stat the file before,
// but now we need the information.
- if(::lstat(filename.c_str(), &file_st) != 0)
+ if(emu_stat(filename.c_str(), &file_st) != 0)
{
rNotifier.NotifyFileStatFailed(this,
filename,
@@ -687,8 +687,8 @@ bool BackupClientDirectoryRecord::UpdateItems(
// BLOCK
{
// Stat the file
- struct stat st;
- if(::lstat(filename.c_str(), &st) != 0)
+ EMU_STRUCT_STAT st;
+ if(EMU_LSTAT(filename.c_str(), &st) != 0)
{
rNotifier.NotifyFileStatFailed(this,
filename, strerror(errno));
@@ -757,8 +757,8 @@ bool BackupClientDirectoryRecord::UpdateItems(
if(!isDir && isCurrentVersion)
{
// Check that the object we found in the ID map doesn't exist on disc
- struct stat st;
- if(::stat(localPotentialOldName.c_str(), &st) != 0 && errno == ENOENT)
+ EMU_STRUCT_STAT st;
+ if(EMU_STAT(localPotentialOldName.c_str(), &st) != 0 && errno == ENOENT)
{
// Doesn't exist locally, but does exist on the server.
// Therefore we can safely rename it to this new file.
@@ -1278,8 +1278,8 @@ bool BackupClientDirectoryRecord::UpdateItems(
if(isDir && isCurrentVersion)
{
// Check that the object doesn't exist already
- struct stat st;
- if(::stat(localPotentialOldName.c_str(), &st) != 0 && errno == ENOENT)
+ EMU_STRUCT_STAT st;
+ if(EMU_STAT(localPotentialOldName.c_str(), &st) != 0 && errno == ENOENT)
{
// Doesn't exist locally, but does exist on the server.
// Therefore we can safely rename it.
diff --git a/bin/bbackupd/Win32ServiceFunctions.cpp b/bin/bbackupd/Win32ServiceFunctions.cpp
index 53be3bc7..2df914a7 100644
--- a/bin/bbackupd/Win32ServiceFunctions.cpp
+++ b/bin/bbackupd/Win32ServiceFunctions.cpp
@@ -203,7 +203,7 @@ int InstallService(const char* pConfigFileName, const std::string& rServiceName)
{
if (pConfigFileName != NULL)
{
- struct stat st;
+ EMU_STRUCT_STAT st;
if (emu_stat(pConfigFileName, &st) != 0)
{