[Box Backup] Cygwin build
boxbackup at fluffy.co.uk
Fri Apr 16 10:34:59 BST 2004
On 16 Apr 2004, at 10:14, Paul Arch wrote:
> BackupQueries.cpp:964: error: call of overloaded
> int)' is ambiguous
> Done, did the trick for the above (bbackupctl), but there seems to be
> instances of this occuring when compiling bbackupd. Is it worth
> casting to
> fix, or can it be done somewhere else ?
I'm not sure why it's doing that. Maybe some odd compiler thing?
Maybe add a signed variant too?
inline box_time_t SecondsToBoxTime(int32_t Seconds)
return ((box_time_t)Seconds * MICRO_SEC_IN_SEC_LL);
>> You must never alter system headers. Programs compiled with them won't
> np, I have a cygwin installation esp. for getting boxbackup going, but
> thanks for advice :)
There's just no point in modifying the system headers, it won't alter
the libraries which use them. And if you add stuff to the end, you'll
end up overwriting important stuff.
>> You should actually just alter the code in bbackupquery to use stat to
>> work out which is which. As a #define with PLATFORM_CYGWYN, of course,
>> wouldn't want to spoil it for the other platforms.
> OK, will have to give this a go.
>> need to make sure that the hton64 and ntoh64 defines do actually swap
>> stuff. It looks like the __cpu_to_be64 and __be64_to_cpu functions
>> don't do anything on Cygwin.
> ;) looking better now from Cygwin
> Apr 16 17:32:30 sdmgbackup bbstored: Send
> Apr 16 17:32:31 sdmgbackup bbstored: Receive
> Apr 16 17:32:31 sdmgbackup bbstored: Send Success(0x1)
> Apr 16 17:32:31 sdmgbackup bbstored: Sending stream, size 40
> Testrun a backup gives ( syslogd for cygwin goes to Event Log in
> windows ):
> following information is part of the event: bbackupd : PID 1520 : File
> statistics: total file size uploaded 18560926, bytes already on server
> encoded size 4855465.
> Backups seem to be happening to linux server.
Yes, I would agree that this appears to work.
> But, I cannot use "compare"
> for verify, probably has something to do with FILE/DIR stat stuff as
Here's a snippet of code for BackupQueries::Compare which should work
fn += '/';
fn += localDirEn->d_name;
struct stat st;
if(::lstat(fn.c_str(), &st) != 0)
// Entry -- file or dir?
if(S_ISREG(st.st_mode) || S_ISLNK(st.st_mode))
// File or symbolic link
It should be obvious where it goes, search for "Entry -- file or dir".
More information about the Boxbackup