summaryrefslogtreecommitdiffabout
path: root/pwmanager
authorzautrix <zautrix>2004-10-20 08:28:39 (UTC)
committer zautrix <zautrix>2004-10-20 08:28:39 (UTC)
commit268e69a533c5db110600758366644c9827957364 (patch) (side-by-side diff)
treea2375a67c76beaf861ae8a67ca11ca0f5743c705 /pwmanager
parentdd66c63b4e953f1e4bb89386bdaed06cbf84a7a5 (diff)
downloadkdepimpi-268e69a533c5db110600758366644c9827957364.zip
kdepimpi-268e69a533c5db110600758366644c9827957364.tar.gz
kdepimpi-268e69a533c5db110600758366644c9827957364.tar.bz2
several fixes
Diffstat (limited to 'pwmanager') (more/less context) (ignore whitespace changes)
-rw-r--r--pwmanager/pwmanager/compiler.h10
-rw-r--r--pwmanager/pwmanager/pwm.h3
-rw-r--r--pwmanager/pwmanager/pwmanager.pro4
-rw-r--r--pwmanager/pwmanager/pwmdoc.h4
-rw-r--r--pwmanager/pwmanager/randomizer.cpp8
-rw-r--r--pwmanager/pwmanager/setmasterpwwndimpl.h4
-rw-r--r--pwmanager/pwmanager/sha1.h9
7 files changed, 32 insertions, 10 deletions
diff --git a/pwmanager/pwmanager/compiler.h b/pwmanager/pwmanager/compiler.h
index be08c6d..a942246 100644
--- a/pwmanager/pwmanager/compiler.h
+++ b/pwmanager/pwmanager/compiler.h
@@ -13,2 +13,10 @@
+#ifdef _WIN32_
+# define __builtin_expect(x, expected_value) (x)
+#define NOREGPARM __attribute__((regparm(0)))
+#define REGPARM __attribute__((regparm(3)))
+#define likely(x) __builtin_expect(!!(x), 1)
+#define unlikely(x) __builtin_expect(!!(x), 0)
+
+#else
#ifdef __deprecated
@@ -59,3 +67,3 @@
#define REGPARM __attribute__((regparm(3)))
-
+#endif
#endif // __PWMANAGER_COMPILER_H
diff --git a/pwmanager/pwmanager/pwm.h b/pwmanager/pwmanager/pwm.h
index 116bc66..6ab9d6b 100644
--- a/pwmanager/pwmanager/pwm.h
+++ b/pwmanager/pwmanager/pwm.h
@@ -143,4 +143,3 @@ public slots:
void editPwd_slot1(const QString *category);
- void editPwd_slot3(const QString *category = 0, const int *index = 0,
- PwMDoc *_doc = 0);
+ void editPwd_slot3(const QString *category, const int *index ,PwMDoc *_doc );
diff --git a/pwmanager/pwmanager/pwmanager.pro b/pwmanager/pwmanager/pwmanager.pro
index 7f39c76..49c1f46 100644
--- a/pwmanager/pwmanager/pwmanager.pro
+++ b/pwmanager/pwmanager/pwmanager.pro
@@ -1,3 +1,3 @@
TEMPLATE = app
-CONFIG += qt warn_on
+CONFIG += qt warn_off
DESTDIR= ../../bin
@@ -32,3 +32,3 @@ MOC_DIR = moc/win
QMAKE_LINK += /NODEFAULTLIB:LIBC
-
+QMAKE_CXXFLAGS += /TP /GX /GR /Ehsc
}
diff --git a/pwmanager/pwmanager/pwmdoc.h b/pwmanager/pwmanager/pwmdoc.h
index 635361a..55e3231 100644
--- a/pwmanager/pwmanager/pwmdoc.h
+++ b/pwmanager/pwmanager/pwmdoc.h
@@ -21,3 +21,5 @@
#define __PWMDOC_H
-
+#ifdef _WIN32_
+#define ssize_t unsigned int
+#endif
#define PWM_FILE_VER (static_cast<char>(0x05))
diff --git a/pwmanager/pwmanager/randomizer.cpp b/pwmanager/pwmanager/randomizer.cpp
index e1085ff..da4df78 100644
--- a/pwmanager/pwmanager/randomizer.cpp
+++ b/pwmanager/pwmanager/randomizer.cpp
@@ -37,4 +37,8 @@
#endif //PWM_EMBEDDED
-
-
+#ifdef _WIN32_
+int rand_r( uint * seed ) {
+ srand(*seed);
+ return rand();
+}
+#endif
Randomizer * Randomizer::rndObj (0);
diff --git a/pwmanager/pwmanager/setmasterpwwndimpl.h b/pwmanager/pwmanager/setmasterpwwndimpl.h
index 3203d4d..08f3654 100644
--- a/pwmanager/pwmanager/setmasterpwwndimpl.h
+++ b/pwmanager/pwmanager/setmasterpwwndimpl.h
@@ -31,3 +31,7 @@
+#ifdef _WIN32_
+#define uint32_t Q_UINT32
+#else
#include <stdint.h>
+#endif
#include <string>
diff --git a/pwmanager/pwmanager/sha1.h b/pwmanager/pwmanager/sha1.h
index 29442a7..c649bae 100644
--- a/pwmanager/pwmanager/sha1.h
+++ b/pwmanager/pwmanager/sha1.h
@@ -21,4 +21,10 @@
#define SHA1_H
-
+#ifdef _WIN32_
+#define uint32_t unsigned int
+#define uint8_t unsigned char
+#define byte unsigned char
+#else
#include <stdint.h>
+typedef uint8_t byte;
+#endif
#include <string>
@@ -26,3 +32,2 @@ using std::string;
-typedef uint8_t byte;