Compile with MinGW

This commit is contained in:
Daniel Molkentin 2013-10-04 20:29:42 +02:00
parent 7c6fcf688c
commit 805e1330ad
3 changed files with 7 additions and 4 deletions

View file

@ -98,7 +98,7 @@ bool SyncJournalDb::checkConnect()
return true;
}
int64_t SyncJournalDb::getPHash(const QString& file) const
qint64 SyncJournalDb::getPHash(const QString& file) const
{
QByteArray utf8File = file.toUtf8();
int64_t h;

View file

@ -35,7 +35,7 @@ public:
QSqlDatabase *getDB(){ return &_db; }
bool exists();
bool checkConnect();
int64_t getPHash(const QString& ) const;
qint64 getPHash(const QString& ) const;
signals:

View file

@ -13,10 +13,13 @@
#include "syncjournalfilerecord.h"
#include "syncfileitem.h"
#include <qfileinfo.h>
#include <qdebug.h>
#ifndef _WIN32
#ifdef Q_OS_WIN
#include <windows.h>
#else
#include <sys/stat.h>
#endif
@ -39,7 +42,7 @@ SyncJournalFileRecord::SyncJournalFileRecord(const SyncFileItem &item, const QSt
// Query the inode:
// based on code from csync_vio_local.c (csync_vio_local_stat)
#ifdef _WIN32
#ifdef Q_OS_WIN
/* Get the Windows file id as an inode replacement. */
HANDLE h = CreateFileW( (wchar_t*)localFileName.utf16(), 0, FILE_SHARE_READ, NULL, OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL+FILE_FLAG_BACKUP_SEMANTICS, NULL );