summaryrefslogtreecommitdiffabout
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/blowfish.h11
-rw-r--r--pwmanager/pwmanager/gpasmanfile.cpp16
-rw-r--r--pwmanager/pwmanager/htmlgen.cpp2
-rw-r--r--pwmanager/pwmanager/ipc.cpp7
-rw-r--r--pwmanager/pwmanager/ipc.h5
-rw-r--r--pwmanager/pwmanager/libgcryptif.h7
-rw-r--r--pwmanager/pwmanager/pwm.cpp1
-rw-r--r--pwmanager/pwmanager/pwmanager.pro2
-rw-r--r--pwmanager/pwmanager/pwmdoc.cpp9
-rw-r--r--pwmanager/pwmanager/spinforsignal.h2
10 files changed, 50 insertions, 12 deletions
diff --git a/pwmanager/pwmanager/blowfish.h b/pwmanager/pwmanager/blowfish.h
index c05de77..5129eab 100644
--- a/pwmanager/pwmanager/blowfish.h
+++ b/pwmanager/pwmanager/blowfish.h
@@ -26,4 +26,7 @@
#include "pwmexception.h"
-
+#ifndef _WIN32_
#include <stdint.h>
+#else
+
+#endif
#include <string>
@@ -35,3 +38,9 @@ using std::string;
+#ifndef _WIN32_
typedef uint8_t byte;
+#else
+#define uint8_t Q_UINT8
+#define byte Q_UINT8
+#define uint32_t Q_UINT32
+#endif
diff --git a/pwmanager/pwmanager/gpasmanfile.cpp b/pwmanager/pwmanager/gpasmanfile.cpp
index f80bc13..ae34c83 100644
--- a/pwmanager/pwmanager/gpasmanfile.cpp
+++ b/pwmanager/pwmanager/gpasmanfile.cpp
@@ -46,3 +46,10 @@
#include <stdlib.h>
+#ifndef _WIN32_
#include <unistd.h>
+#else
+#include <io.h>
+#define S_IRUSR _S_IREAD
+#define S_IWUSR _S_IWRITE
+#define creat _creat
+#endif
#include <string.h>
@@ -64,3 +71,3 @@
-
+#ifndef _WIN32_
#if defined(PWM_DEBUG) && defined(GPASMANFILE_DEBUG)
@@ -70,2 +77,5 @@
#endif
+#else
+# define DBG
+#endif
@@ -412,3 +422,3 @@ int GpasmanFile::check_file(const char *filename)
}
-
+#ifndef _WIN32_
if (!S_ISREG(naamstat.st_mode)) {
@@ -420,3 +430,3 @@ int GpasmanFile::check_file(const char *filename)
}
-
+#endif
return (1);
diff --git a/pwmanager/pwmanager/htmlgen.cpp b/pwmanager/pwmanager/htmlgen.cpp
index 166b987..bee8198 100644
--- a/pwmanager/pwmanager/htmlgen.cpp
+++ b/pwmanager/pwmanager/htmlgen.cpp
@@ -62,3 +62,3 @@ QString HtmlGen::escapeHtmlText(const QString &str)
for (i = 0; i < len; ++i) {
- c = str[i];
+ c = str.at(i);
switch (c) {
diff --git a/pwmanager/pwmanager/ipc.cpp b/pwmanager/pwmanager/ipc.cpp
index b1d2c68..643b022 100644
--- a/pwmanager/pwmanager/ipc.cpp
+++ b/pwmanager/pwmanager/ipc.cpp
@@ -23,5 +23,5 @@
#include <qsocketnotifier.h>
-
+#ifndef _WIN32_
#include <sys/socket.h>
-
+#endif
#ifndef PWM_EMBEDDED
@@ -74,2 +74,3 @@ Ipc::Ipc()
{
+#ifndef _WIN32_
if (socketpair(AF_LOCAL, SOCK_STREAM, 0, sock)) {
@@ -77,3 +78,3 @@ Ipc::Ipc()
}
-
+#endif
QSocket* qsock = new QSocket();
diff --git a/pwmanager/pwmanager/ipc.h b/pwmanager/pwmanager/ipc.h
index e5a496d..7bfca02 100644
--- a/pwmanager/pwmanager/ipc.h
+++ b/pwmanager/pwmanager/ipc.h
@@ -23,4 +23,7 @@
#include <qobject.h>
+#ifndef _WIN32_
#include <unistd.h>
-
+#else
+#include <io.h>
+#endif
#ifndef PWM_EMBEDDED
diff --git a/pwmanager/pwmanager/libgcryptif.h b/pwmanager/pwmanager/libgcryptif.h
index dffd55b..1a7b658 100644
--- a/pwmanager/pwmanager/libgcryptif.h
+++ b/pwmanager/pwmanager/libgcryptif.h
@@ -33,4 +33,9 @@
#include <sys/types.h>
+#ifndef _WIN32_
#include <stdint.h>
-
+#else
+#define uint8_t Q_UINT8
+#define byte Q_UINT8
+#define uint32_t Q_UINT32
+#endif
#define STRING2KEY_SALTLEN 8
diff --git a/pwmanager/pwmanager/pwm.cpp b/pwmanager/pwmanager/pwm.cpp
index d92c90d..1ab2b71 100644
--- a/pwmanager/pwmanager/pwm.cpp
+++ b/pwmanager/pwmanager/pwm.cpp
@@ -1412,2 +1412,3 @@ void PwM::createAboutData_slot()
#include <../version>
+;
QMessageBox::about( this, "About PwManager/Pi",
diff --git a/pwmanager/pwmanager/pwmanager.pro b/pwmanager/pwmanager/pwmanager.pro
index 80b2519..fbc0554 100644
--- a/pwmanager/pwmanager/pwmanager.pro
+++ b/pwmanager/pwmanager/pwmanager.pro
@@ -6,3 +6,3 @@ include( ../../variables.pri )
-INCLUDEPATH += . ../../ ../../libkdepim ../../microkde ../../microkde/kdecore ../../microkde/kdeui ../../microkde/kutils
+INCLUDEPATH += . ../../ ../../libkdepim ../../microkde ../../microkde/kdecore ../../microkde/kdeui ../../microkde/kutils ../libcrypt/crypt ../libcrypt/error ../libcrypt/zlib
DEFINES += PWM_EMBEDDED CONFIG_PWMANAGER_GCRY DESKTOP_VERSION
diff --git a/pwmanager/pwmanager/pwmdoc.cpp b/pwmanager/pwmanager/pwmdoc.cpp
index 86b6273..129bf7b 100644
--- a/pwmanager/pwmanager/pwmdoc.cpp
+++ b/pwmanager/pwmanager/pwmdoc.cpp
@@ -57,5 +57,6 @@
#include <sys/stat.h>
+#ifndef _WIN32_
#include <unistd.h>
#include <stdint.h>
-
+#endif
@@ -507,2 +508,3 @@ PwMerror PwMDoc::saveDoc(char compress, const QString *file)
f.close();
+#ifndef _WIN32_
if (chmod(filename.latin1(),
@@ -511,2 +513,3 @@ PwMerror PwMDoc::saveDoc(char compress, const QString *file)
}
+#endif
openDocList.edit(this, getTitle().latin1());
@@ -2220,2 +2223,3 @@ bool PwMDoc::execLauncher(unsigned int category, unsigned int entryIndex)
{
+#ifndef _WIN32_
if (geteuid() == 0) {
@@ -2224,2 +2228,3 @@ bool PwMDoc::execLauncher(unsigned int category, unsigned int entryIndex)
}
+#endif
QString command(dti.dta[category].d[entryIndex].launcher.c_str());
@@ -2272,2 +2277,3 @@ bool PwMDoc::goToURL(unsigned int category, unsigned int entryIndex)
{
+#ifndef _WIN32_
if (geteuid() == 0) {
@@ -2276,2 +2282,3 @@ bool PwMDoc::goToURL(unsigned int category, unsigned int entryIndex)
}
+#endif
QString url(dti.dta[category].d[entryIndex].url.c_str());
diff --git a/pwmanager/pwmanager/spinforsignal.h b/pwmanager/pwmanager/spinforsignal.h
index ec6103b..f3cabee 100644
--- a/pwmanager/pwmanager/spinforsignal.h
+++ b/pwmanager/pwmanager/spinforsignal.h
@@ -24,3 +24,5 @@
+#ifndef _WIN32_
#include <stdint.h>
+#endif
#include <string>