From 68f1d12d7447bff5dfba5ba605ecdbc4e9e10aba Mon Sep 17 00:00:00 2001 From: tariq Date: Fri, 17 Feb 2006 17:58:28 +0000 Subject: [PATCH] some changes for compalibility with Visual C++ 2005 compiler git-svn-id: https://svn.code.sf.net/p/keepassx/code/trunk@48 b624d157-de02-0410-bad0-e51aec6abb33 --- src/crypto/blowfish.h | 6 +++++- src/crypto/sha1.cpp | 6 +----- src/lib/IniReader.cpp | 2 -- src/lib/IniReader.h | 4 +++- src/lib/random.cpp | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/crypto/blowfish.h b/src/crypto/blowfish.h index 15520e2..74dbd82 100755 --- a/src/crypto/blowfish.h +++ b/src/crypto/blowfish.h @@ -16,6 +16,7 @@ #define BLOWFISH_H #include "global.h" +#include //#include #include using std::string; @@ -24,7 +25,10 @@ using std::string; #define BLOWFISH_ROUNDS 16 #define CIPHER_ALGO_BLOWFISH 4 /* blowfish 128 bit key */ -typedef uint8_t byte; +#define uint8_t Q_UINT8 +#define uint16_t Q_UINT16 +#define uint32_t Q_UINT32 +#define byte Q_UINT8 /** blowfish encryption algorithm. * Derived from libgcrypt-1.1.12 diff --git a/src/crypto/sha1.cpp b/src/crypto/sha1.cpp index c5f96b4..d5577df 100755 --- a/src/crypto/sha1.cpp +++ b/src/crypto/sha1.cpp @@ -26,11 +26,7 @@ // Rotate x bits to the left #ifndef ROL32 -#ifdef _MSC_VER -#define ROL32(_val32, _nBits) _rotl(_val32, _nBits) -#else -#define ROL32(_val32, _nBits) (((_val32)<<(_nBits))|((_val32)>>(32-(_nBits)))) -#endif + #define ROL32(_val32, _nBits) (((_val32)<<(_nBits))|((_val32)>>(32-(_nBits)))) #endif #ifdef KEEPASS_LITTLE_ENDIAN diff --git a/src/lib/IniReader.cpp b/src/lib/IniReader.cpp index 1e31505..2a21c92 100755 --- a/src/lib/IniReader.cpp +++ b/src/lib/IniReader.cpp @@ -17,8 +17,6 @@ #include #include -using namespace std; - // C Includes #include #include diff --git a/src/lib/IniReader.h b/src/lib/IniReader.h index 803d551..e570e51 100755 --- a/src/lib/IniReader.h +++ b/src/lib/IniReader.h @@ -13,7 +13,7 @@ #ifndef CIniFile_H #define CIniFile_H -using namespace std; + // C++ Includes #include #include @@ -21,6 +21,8 @@ using namespace std; // C Includes #include +using namespace std; + #define MAX_KEYNAME 128 #define MAX_VALUENAME 128 #define MAX_VALUEDATA 2048 diff --git a/src/lib/random.cpp b/src/lib/random.cpp index dc7d6b5..87cab4f 100755 --- a/src/lib/random.cpp +++ b/src/lib/random.cpp @@ -18,7 +18,7 @@ * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #include -#include +#include #include #include #include "random.h"