78 lines
3.8 KiB
Plaintext
78 lines
3.8 KiB
Plaintext
$NetBSD: patch-apps_tqsl_cpp,v 1.5 2016/03/16 14:22:01 mef Exp $
|
|
|
|
(1)
|
|
Avoid following error (interim, only valid with db5)
|
|
/usr/pkgsrc/wip/trustedQSL/work/tqsl-2.0/apps/tqsl.cpp:1133:36: error: 'DB_VERSION_STRING' was not declared in this scope
|
|
gmake[2]: *** [apps/CMakeFiles/tqsl.dir/tqsl.cpp.o] Error 1
|
|
gmake[1]: *** [apps/CMakeFiles/tqsl.dir/all] Error 2
|
|
|
|
(2)
|
|
tqsl-2.0.1/apps/tqsl.cpp:2963:10: error: #pragma GCC diagnostic not allowed inside functions
|
|
tqsl-2.0.1/apps/tqsl.cpp:2967:10: error: #pragma GCC diagnostic not allowed inside functions
|
|
|
|
(3) Trial code for wxGTK30
|
|
|
|
(4) Avoid error with wxGTK30
|
|
error: cannot pass objects of non-trivially-copyable type 'class wxCStrData' through '...'
|
|
|
|
--- apps/tqsl.cpp.orig 2016-03-12 14:49:01.000000000 +0900
|
|
+++ apps/tqsl.cpp 2016-03-16 22:49:15.000000000 +0900
|
|
@@ -64,7 +64,7 @@
|
|
#endif
|
|
#include <zlib.h>
|
|
#include <openssl/opensslv.h> // only for version info!
|
|
-#include <db.h> //only for version info!
|
|
+#include <db5/db.h> //only for version info!
|
|
|
|
#include <iostream>
|
|
#include <fstream>
|
|
@@ -3145,7 +3145,7 @@ void MyFrame::UpdateConfigFile() {
|
|
FILE *configFile = fopen(filename.ToUTF8(), "wb");
|
|
#endif
|
|
if (!configFile) {
|
|
- tqslTrace("UpdateConfigFile", "Can't open new file %s: %hs", filename.c_str(), strerror(errno));
|
|
+ tqslTrace("UpdateConfigFile", "Can't open new file %s: %hs", ((const wxChar*) filename), strerror(errno));
|
|
wxMessageBox(wxString::Format(_("Can't open new configuration file %s: %hs"), filename.c_str(), strerror(errno)), _("Error"), wxOK | wxICON_ERROR, this);
|
|
return;
|
|
}
|
|
@@ -3153,15 +3153,15 @@ void MyFrame::UpdateConfigFile() {
|
|
while (left > 0) {
|
|
size_t written = fwrite(newconfig, 1, left, configFile);
|
|
if (written == 0) {
|
|
- tqslTrace("UpdateConfigFile", "Can't write new file %s: %hs", filename.c_str(), strerror(errno));
|
|
- wxMessageBox(wxString::Format(_("Can't write new configuration file %s: %hs"), filename.c_str(), strerror(errno)), _("Error"), wxOK | wxICON_ERROR, this);
|
|
+ tqslTrace("UpdateConfigFile", "Can't write new file %s: %hs", ((const wxChar*) filename), strerror(errno));
|
|
+ wxMessageBox(wxString::Format(_("Can't write new configuration file %s: %hs"), ((const wxChar*) filename), strerror(errno)), _("Error"), wxOK | wxICON_ERROR, this);
|
|
if (configFile) fclose(configFile);
|
|
return;
|
|
}
|
|
left -= written;
|
|
}
|
|
if (fclose(configFile)) {
|
|
- tqslTrace("UpdateConfigFile", "Error writing new file %s: %hs", filename.c_str(), strerror(errno));
|
|
+ tqslTrace("UpdateConfigFile", "Error writing new file %s: %hs", ((const wxChar*) filename), strerror(errno));
|
|
wxMessageBox(wxString::Format(_("Error writing new configuration file %s: %hs"), filename.c_str(), strerror(errno)), _("Error"), wxOK | wxICON_ERROR, this);
|
|
return;
|
|
}
|
|
@@ -3489,7 +3489,7 @@ MyFrame::OnUpdateCheckDone(wxCommandEven
|
|
// The macro for declaring a hash map defines a couple of typedefs
|
|
// that it never uses. Current GCC warns about those. The pragma
|
|
// below suppresses those warnings for those.
|
|
-#if !defined(__APPLE__) && !defined(_WIN32) && !defined(__clang__)
|
|
+#if !defined(__APPLE__) && !defined(_WIN32) && !defined(__clang__) && !defined(__NetBSD__) && !defined(__DragonFly__) && !defined(__FreeBSD__)
|
|
#pragma GCC diagnostic ignored "-Wunused-local-typedefs"
|
|
#endif
|
|
void
|
|
@@ -4770,7 +4770,11 @@ QSLApp::OnInit() {
|
|
// Well, if it's a pointer and it might be null but it's also not a pointer
|
|
// and can't be null, then it's not possible to compile this without warning.
|
|
// Warnings ahoy!
|
|
+#if defined (wxABI_VERSION) && (wxABI_VERSION < 30000 )
|
|
if (argv[i][0] == wxT('-') || argv[i][0] == wxT('/'))
|
|
+#else
|
|
+ if (!argv[i].empty() && (argv[i][0] == wxT('-') || argv[i][0] == wxT('/')))
|
|
+#endif
|
|
if (wxIsalpha(argv[i][1]) && wxIsupper(argv[i][1]))
|
|
argv[i][1] = wxTolower(argv[i][1]);
|
|
}
|