[git] GpgOL - branch, master, updated. gpgol-2.3.1-22-gdc2a57f
by Andre Heinecke
cvs at cvs.gnupg.org
Tue Oct 30 09:20:06 CET 2018
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GnuPG extension for MS Outlook".
The branch, master has been updated
via dc2a57f878282e50ccae9c55b3cfadcea1bb7f27 (commit)
via 6c8166d36e634b76ccbf03de3ebb0e43f89f5574 (commit)
from ef333f9d9021a0c3039eda0139986321dfdb9bbd (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit dc2a57f878282e50ccae9c55b3cfadcea1bb7f27
Author: Andre Heinecke <aheinecke at intevation.de>
Date: Tue Oct 30 09:18:35 2018 +0100
Fix Linux build of tests
* src/common_indep.c: Include wchar.h
* src/cpphelp.cpp (in_de_vs_mode): use strcasecm
(get_registry_subkeys): Make conditional.
* src/cpphelp.h: Update accordinlgy.
* src/debug.cpp: Fix unused errors and do locking.
* src/parsecontroller.cpp (ParseController::parse): Remove unused
warning.
* tests/Makefile.am: Add definitions for linux
diff --git a/src/common_indep.c b/src/common_indep.c
index aebd10c..4a029a0 100644
--- a/src/common_indep.c
+++ b/src/common_indep.c
@@ -24,6 +24,7 @@
#include <windows.h>
#endif
+#include <wchar.h>
#include <stdlib.h>
#include <ctype.h>
diff --git a/src/cpphelp.cpp b/src/cpphelp.cpp
index 30daa9e..434a368 100644
--- a/src/cpphelp.cpp
+++ b/src/cpphelp.cpp
@@ -19,7 +19,9 @@
* along with this program; if not, see <http://www.gnu.org/licenses/>.
*/
-#include "config.h"
+#ifdef HAVE_CONFIG_H
+# include "config.h"
+#endif
#include "cpphelp.h"
@@ -28,13 +30,18 @@
#include <vector>
#include <iterator>
-#include "common.h"
+#include "common_indep.h"
#include <gpgme++/context.h>
#include <gpgme++/error.h>
#include <gpgme++/configuration.h>
-#include <windows.h>
+#ifdef HAVE_W32_SYSTEM
+# include "common.h"
+# include <windows.h>
+#else
+#include "common_indep.h"
+#endif
void
release_cArray (char **carray)
@@ -148,7 +155,11 @@ in_de_vs_mode()
{
if (option.name () && !strcmp (option.name (), "compliance") &&
option.currentValue ().stringValue () &&
+#ifdef HAVE_W32_SYSTEM
!stricmp (option.currentValue ().stringValue (), "de-vs"))
+#else
+ !strcasecmp (option.currentValue ().stringValue (), "de-vs"))
+#endif
{
log_debug ("%s:%s: Detected de-vs mode",
SRCNAME, __func__);
@@ -164,6 +175,7 @@ in_de_vs_mode()
return false;
}
+#ifdef HAVE_W32_SYSTEM
std::map<std::string, std::string>
get_registry_subkeys (const char *path)
{
@@ -252,6 +264,7 @@ get_registry_subkeys (const char *path)
RegCloseKey (theKey);
return ret;
}
+#endif
template<typename Out> void
internal_split (const std::string &s, char delim, Out result) {
diff --git a/src/cpphelp.h b/src/cpphelp.h
index cd56349..de10dee 100644
--- a/src/cpphelp.h
+++ b/src/cpphelp.h
@@ -48,8 +48,10 @@ std::vector <std::string> cArray_to_vector (const char **cArray);
/* Check if we are in de_vs mode. */
bool in_de_vs_mode ();
+#ifdef HAVE_W32_SYSTEM
/* Get a map of all subkey value pairs in a registry key */
std::map<std::string, std::string> get_registry_subkeys (const char *path);
+#endif
std::vector<std::string> gpgol_split (const std::string &s, char delim);
diff --git a/src/debug.cpp b/src/debug.cpp
index fcc0450..e7981d3 100644
--- a/src/debug.cpp
+++ b/src/debug.cpp
@@ -57,10 +57,8 @@ get_log_file (void)
void
set_log_file (const char *name)
{
-#ifdef HAVE_W32_SYSTEM
if (!lock_log ())
{
-#endif
if (logfp)
{
fclose (logfp);
@@ -72,10 +70,8 @@ set_log_file (const char *name)
else
logfile = strdup (name);
-#ifdef HAVE_W32_SYSTEM
unlock_log ();
}
-#endif
}
static void
@@ -152,6 +148,8 @@ do_log (const char *fmt, va_list a, int w32err, int err,
tmpbuf[strlen (tmpbuf)-1] = 0;
fprintf (logfp, "%s (%d)", tmpbuf, w32err);
}
+#else
+ (void) w32err;
#endif
if (buf)
{
diff --git a/src/parsecontroller.cpp b/src/parsecontroller.cpp
index 9c925f8..4a72a65 100644
--- a/src/parsecontroller.cpp
+++ b/src/parsecontroller.cpp
@@ -515,6 +515,8 @@ ParseController::parse()
m_verify_result = ctx->verifyOpaqueSignature(input, output);
}
}
+#else
+(void)allBad;
#endif
}
}
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 42ca92e..dfb96b0 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -28,10 +28,18 @@ endif
AM_LDFLAGS = @GPGME_LIBS@ -lgpgmepp
AM_CFLAGS = -I$(top_srcdir)/src $(GPGME_CFLAGS) $(LIBASSUAN_CFLAGS) -DBUILD_TESTS
+if !HAVE_W32_SYSTEM
+AM_CXXFLAGS = -I$(top_srcdir)/src $(GPGME_CFLAGS) $(GPGME_CFLAGS)/gpgme++ \
+ $(LIBASSUAN_CFLAGS) -std=c++11 -D_FILE_OFFSET_BITS=64 \
+ -DBUILD_TESTS -DDATADIR=\"$(abs_srcdir)/data\" \
+ -DGPGHOMEDIR=\"$(abs_srcdir)/gnupg_home\"
+else
AM_CXXFLAGS = -I$(top_srcdir)/src $(GPGME_CFLAGS) $(GPGME_CFLAGS)/gpgme++ \
$(LIBASSUAN_CFLAGS) -std=c++11 -D_FILE_OFFSET_BITS=64 \
-DBUILD_TESTS
-LDADD = ../src/gpgol.la @GPG_ERROR_LIBS@
+endif
+LDADD = @GPG_ERROR_LIBS@
+
if HAVE_W32_SYSTEM
run_parser_LDADD = \
@@ -51,13 +59,15 @@ parser_SRC= ../src/parsecontroller.cpp \
../src/debug.cpp ../src/debug.h \
../src/memdbg.cpp ../src/memdbg.h \
../src/cpphelp.cpp ../src/cpphelp.h \
- ../src/w32-gettext.cpp ../src/w32-gettext.h \
../src/xmalloc.h
if !HAVE_W32_SYSTEM
t_parser_SOURCES = t-parser.cpp $(parser_SRC)
-endif
run_parser_SOURCES = run-parser.cpp $(parser_SRC)
+else
+run_parser_SOURCES = run-parser.cpp $(parser_SRC) \
+ ../src/w32-gettext.cpp ../src/w32-gettext.h
+endif
if !HAVE_W32_SYSTEM
noinst_PROGRAMS = t-parser run-parser
commit 6c8166d36e634b76ccbf03de3ebb0e43f89f5574
Author: Andre Heinecke <aheinecke at intevation.de>
Date: Tue Oct 30 09:16:22 2018 +0100
Minor style improvement in run-parser output
* tests/run-parser.cpp (main): Add some newlines.
diff --git a/tests/run-parser.cpp b/tests/run-parser.cpp
index d4a595e..62f1e70 100644
--- a/tests/run-parser.cpp
+++ b/tests/run-parser.cpp
@@ -114,7 +114,7 @@ int main(int argc, char **argv)
for (int i = 0; i < repeats; i++)
{
- std::cout << "Run: " << i;
+ std::cout << std::endl << "Run: " << i << std::endl;
fp_in = fopen (argv[0], "rb");
if (fp_in)
-----------------------------------------------------------------------
Summary of changes:
src/common_indep.c | 1 +
src/cpphelp.cpp | 19 ++++++++++++++++---
src/cpphelp.h | 2 ++
src/debug.cpp | 6 ++----
src/parsecontroller.cpp | 2 ++
tests/Makefile.am | 16 +++++++++++++---
tests/run-parser.cpp | 2 +-
7 files changed, 37 insertions(+), 11 deletions(-)
hooks/post-receive
--
GnuPG extension for MS Outlook
http://git.gnupg.org
More information about the Gnupg-commits
mailing list