summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlon Bar-Lev <alonbl@gentoo.org>2008-02-09 20:42:27 +0000
committerAlon Bar-Lev <alonbl@gentoo.org>2008-02-09 20:42:27 +0000
commit5e1053f13a51d6bf681b1593f87dcbae04f3c2b7 (patch)
tree3c39bf9d40d9f55f8af66fc9b36f300b6907a178 /app-crypt/truecrypt/files
parentVersion bump #209233. (diff)
downloadhistorical-5e1053f13a51d6bf681b1593f87dcbae04f3c2b7.tar.gz
historical-5e1053f13a51d6bf681b1593f87dcbae04f3c2b7.tar.bz2
historical-5e1053f13a51d6bf681b1593f87dcbae04f3c2b7.zip
Fix 64bit issues, bug#209449, thanks to Aron for testing
Package-Manager: portage-2.1.4.1
Diffstat (limited to 'app-crypt/truecrypt/files')
-rw-r--r--app-crypt/truecrypt/files/truecrypt-5.0-64bit.patch95
1 files changed, 95 insertions, 0 deletions
diff --git a/app-crypt/truecrypt/files/truecrypt-5.0-64bit.patch b/app-crypt/truecrypt/files/truecrypt-5.0-64bit.patch
new file mode 100644
index 000000000000..69d13839a8bf
--- /dev/null
+++ b/app-crypt/truecrypt/files/truecrypt-5.0-64bit.patch
@@ -0,0 +1,95 @@
+diff -urNP truecrypt-5.0-source.org/Platform/StringConverter.cpp truecrypt-5.0-source/Platform/StringConverter.cpp
+--- truecrypt-5.0-source.org/Platform/StringConverter.cpp 2008-02-04 13:14:18.000000000 +0200
++++ truecrypt-5.0-source/Platform/StringConverter.cpp 2008-02-09 21:38:23.000000000 +0200
+@@ -32,12 +32,14 @@
+ return s.str();
+ }
+
++#if __WORDSIZE == 32
+ wstring StringConverter::FromNumber (int64 number)
+ {
+ wstringstream s;
+ s << number;
+ return s.str();
+ }
++#endif
+
+ wstring StringConverter::FromNumber (int number)
+ {
+@@ -60,12 +62,14 @@
+ return s.str();
+ }
+
++#if __WORDSIZE == 32
+ wstring StringConverter::FromNumber (uint64 number)
+ {
+ wstringstream s;
+ s << number;
+ return s.str();
+ }
++#endif
+
+ string StringConverter::GetTrailingNumber (const string &str)
+ {
+diff -urNP truecrypt-5.0-source.org/Platform/StringConverter.h truecrypt-5.0-source/Platform/StringConverter.h
+--- truecrypt-5.0-source.org/Platform/StringConverter.h 2008-02-04 13:14:16.000000000 +0200
++++ truecrypt-5.0-source/Platform/StringConverter.h 2008-02-09 21:38:03.000000000 +0200
+@@ -19,11 +19,15 @@
+ public:
+ static wstring FromNumber (double number);
+ static wstring FromNumber (int number);
++#if __WORDSIZE == 32
+ static wstring FromNumber (int64 number);
++#endif
+ static wstring FromNumber (long number);
+ static wstring FromNumber (unsigned int number);
+ static wstring FromNumber (unsigned long number);
++#if __WORDSIZE == 32
+ static wstring FromNumber (uint64 number);
++#endif
+ static string GetTrailingNumber (const string &str);
+ static string GetTypeName (const type_info &typeInfo);
+ static wstring QuoteSpaces (const wstring &str);
+--- truecrypt-5.0-source.org/Platform/PlatformTest.cpp 2008-02-04 13:14:16.000000000 +0200
++++ truecrypt-5.0-source/Platform/PlatformTest.cpp 2008-02-09 21:49:15.000000000 +0200
+@@ -270,7 +270,11 @@ namespace TrueCrypt
+ // shared_ptr, make_shared, StringConverter, foreach
+ list <shared_ptr <uint64> > numList;
+
++#if __WORDSIZE == 32
+ numList.push_front (make_shared <uint64> (StringConverter::ToUInt64 (StringConverter::FromNumber (0xFFFFffffFFFFfffeULL))));
++#else
++ numList.push_front (make_shared <uint64> (StringConverter::ToUInt64 (StringConverter::FromNumber (0xFFFFffffFFFFfffeUL))));
++#endif
+ numList.push_front (make_shared <uint64> (StringConverter::ToUInt32 (StringConverter::GetTrailingNumber ("str2"))));
+ numList.push_front (make_shared <uint64> (3));
+
+--- truecrypt-5.0-source.org/Main/StringFormatter.h 2008-02-04 13:14:14.000000000 +0200
++++ truecrypt-5.0-source/Main/StringFormatter.h 2008-02-09 22:15:04.000000000 +0200
+@@ -27,11 +27,15 @@ namespace TrueCrypt
+ StringFormatterArg (const wstring &str) : Empty (false), Referenced (false), StringArg (str) { }
+ StringFormatterArg (const wxString &str) : Empty (false), Referenced (false), StringArg (str) { }
+ StringFormatterArg (int number) : Empty (false), Referenced (false), StringArg (StringConverter::FromNumber (number)) { }
++#if __WORDSIZE == 32
+ StringFormatterArg (int64 number) : Empty (false), Referenced (false), StringArg (StringConverter::FromNumber (number)) { }
++#endif
+ StringFormatterArg (long number) : Empty (false), Referenced (false), StringArg (StringConverter::FromNumber (number)) { }
+ StringFormatterArg (unsigned int number) : Empty (false), Referenced (false), StringArg (StringConverter::FromNumber (number)) { }
+ StringFormatterArg (unsigned long number) : Empty (false), Referenced (false), StringArg (StringConverter::FromNumber (number)) { }
++#if __WORDSIZE == 32
+ StringFormatterArg (uint64 number) : Empty (false), Referenced (false), StringArg (StringConverter::FromNumber (number)) { }
++#endif
+
+ operator wxString () { Referenced = true; return StringArg; }
+
+--- truecrypt-5.0-source.org/Main/Forms/VolumeSizeWizardPage.cpp 2008-02-04 13:14:46.000000000 +0200
++++ truecrypt-5.0-source/Main/Forms/VolumeSizeWizardPage.cpp 2008-02-09 22:27:35.000000000 +0200
+@@ -55,7 +55,7 @@ namespace TrueCrypt
+ {
+ uint64 prefixMult = 1;
+ if (VolumeSizePrefixChoice->GetSelection() != wxNOT_FOUND)
+- prefixMult = reinterpret_cast <int> (VolumeSizePrefixChoice->GetClientData (VolumeSizePrefixChoice->GetSelection()));
++ prefixMult = reinterpret_cast <uint64> (VolumeSizePrefixChoice->GetClientData (VolumeSizePrefixChoice->GetSelection()));
+
+ uint64 val = StringConverter::ToUInt64 (wstring (VolumeSizeTextCtrl->GetValue()));
+ if (val <= 0x7fffFFFFffffFFFFull / prefixMult)