gnucash master: Multiple changes pushed

John Ralls jralls at code.gnucash.org
Thu Jul 9 12:16:09 EDT 2015


Updated	 via  https://github.com/Gnucash/gnucash/commit/b9d6b842 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/d3e70217 (commit)
	from  https://github.com/Gnucash/gnucash/commit/df05702f (commit)



commit b9d6b8423f0069b5bfc7970770d66a4c4d8240c1
Author: John Ralls <jralls at ceridwen.us>
Date:   Thu Jul 9 09:15:15 2015 -0700

    Guard against multiple typedefs of KvpFrame and KvpValue.
    
    It's legal for C11, but not before. No need to gratuitously force an
    upgrade.

diff --git a/src/backend/xml/test/test-file-stuff.h b/src/backend/xml/test/test-file-stuff.h
index c2d8d39..4578693 100644
--- a/src/backend/xml/test/test-file-stuff.h
+++ b/src/backend/xml/test/test-file-stuff.h
@@ -16,7 +16,10 @@ extern "C"
 #include <io-gncxml-gen.h>
 #include <sixtp.h>
 
+#ifndef __KVP_FRAME
 typedef struct KvpFrameImpl KvpFrame;
+#define __KVP_FRAME
+#endif
 
 void write_dom_node_to_file(xmlNodePtr node, int fd);
 
diff --git a/src/engine/test-core/test-engine-stuff.h b/src/engine/test-core/test-engine-stuff.h
index f5ab980..c2a0019 100644
--- a/src/engine/test-core/test-engine-stuff.h
+++ b/src/engine/test-core/test-engine-stuff.h
@@ -17,8 +17,14 @@ extern "C"
 #include "gnc-pricedb.h"
 #include "SchedXaction.h"
 
+#ifndef __KVP_VALUE
 typedef struct KvpValueImpl KvpValue;
+#define __KVP_VALUE
+#endif
+#ifndef __KVP_FRAME
 typedef struct KvpFrameImpl KvpFrame;
+#define __KVP_FRAME
+#endif
 Timespec* get_random_timespec(void);
 void random_timespec_zero_nsec (gboolean zero_nsec);
 void random_timespec_usec_resolution (gboolean usec_resolution);
diff --git a/src/libqof/qof/qofbook.h b/src/libqof/qof/qofbook.h
index 50750ce..d98c08f 100644
--- a/src/libqof/qof/qofbook.h
+++ b/src/libqof/qof/qofbook.h
@@ -49,7 +49,10 @@ extern "C"
 #ifndef SWIG
 
 typedef struct _QofBookClass  QofBookClass;
+#ifndef __KVP_VALUE
 typedef struct KvpValueImpl KvpValue;
+#define __KVP_VALUE
+#endif
 
 #include "qofid.h"
 #include "qofinstance.h"
diff --git a/src/libqof/qof/qofinstance.h b/src/libqof/qof/qofinstance.h
index df4f382..1b2e559 100644
--- a/src/libqof/qof/qofinstance.h
+++ b/src/libqof/qof/qofinstance.h
@@ -60,8 +60,10 @@ typedef struct _QofBook       QofBook;
      (G_TYPE_CHECK_CLASS_TYPE ((k), QOF_TYPE_INSTANCE))
 #define QOF_INSTANCE_GET_CLASS(o)    \
      (G_TYPE_INSTANCE_GET_CLASS ((o), QOF_TYPE_INSTANCE, QofInstanceClass))
-
+#ifndef __KVP_FRAME
 typedef struct KvpFrameImpl KvpFrame;
+#define __KVP_FRAME
+#endif
 
 struct QofInstance_s
 {

commit d3e70217cd4e4f35b630d30c0d0a58937c511951
Author: John Ralls <jralls at ceridwen.us>
Date:   Tue Jul 7 16:43:52 2015 -0700

    Move libgtest.a arg from Makefile to configure, add -pthread flag.

diff --git a/configure.ac b/configure.ac
index b6644b7..576dc3c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -866,6 +866,7 @@ fi
 if test x$ac_cv_file__usr_include_gmock_gmock_h = xyes -a x$ac_cv_file__usr_include_gtest_gtest_h = xyes; then
   if test x$ac_cv_file__usr_src_gmock_src_gmock_all_cc = xyes -a x$ac_cv_file__usr_src_gtest_src_gtest_all_cc = xyes; then
      ac_cv_gtest_system_install=yes
+     ac_cv_gtest_libs="\$(top_builddir)/src/test-core/libgtest.a -pthread"
   elif test "x$ac_cv_have_gtest_libs" = xyes; then
      ac_cv_gtest_system_install=yes
      ac_cv_gtest_libs="-lgtest -lgtest_main"
@@ -925,9 +926,6 @@ if test x$enable_google_test = xyes; then
       fi
    fi
 
-   dnl Fedora installs gmock sources in /usr/src/gmock without a src
-   dnl subdir, unlike Debian or the distribution tarball, so we have to
-   dnl make GMOCK_ROOT include src if it's there.
 
    if test -n "$ac_cv_gmock_root" -a -r "$ac_cv_gmock_root/gmock-all.cc"; then
       ac_cv_gmock_src_path="$ac_cv_gmock_root"
@@ -946,7 +944,7 @@ if test x$enable_google_test = xyes; then
 	 else
 	    ac_cv_gmock_src_path=""
 	 fi
-	 ac_cv_gmock_root="$ac_cv_gmock_src_path"
+	 ac_cv_gmock_root="/usr/src/gmock"
       else
          ac_cv_gmock_root=""
       fi
@@ -986,7 +984,7 @@ AC_SUBST([GMOCK_SRC_PATH], [$ac_cv_gmock_src_path])
 AC_SUBST([GMOCK_SRC], [$ac_cv_gmock_root])
 AC_SUBST([GMOCK_HEADERS], [$ac_cv_gmock_headers])
 AM_CONDITIONAL([WITH_GOOGLE_TEST], [test "x$enable_google_test" = "xyes"])
-AM_CONDITIONAL([GOOGLE_TEST_LIBS], [test "x$ac_cv_gtest_libs" != "x"])
+AM_CONDITIONAL([GOOGLE_TEST_LIBS], [test "x$ac_cv_have_gtest_libs" == "xyes"])
 ### --------------------------------------------------------------------------
 ### Register2
 AC_ARG_ENABLE( register2,
diff --git a/src/engine/test/Makefile.am b/src/engine/test/Makefile.am
index 545a5ef..b461238 100644
--- a/src/engine/test/Makefile.am
+++ b/src/engine/test/Makefile.am
@@ -143,7 +143,6 @@ test_import_map_LDADD = \
 if !GOOGLE_TEST_LIBS
 nodist_test_import_map_SOURCES = \
         ${GTEST_SRC}/src/gtest_main.cc
-test_import_map_LDADD += ${top_builddir}/src/test-core/libgtest.a
 endif
 
 test_import_map_CPPFLAGS = \
diff --git a/src/libqof/qof/test/Makefile.am b/src/libqof/qof/test/Makefile.am
index 96fe8de..1d1b19e 100644
--- a/src/libqof/qof/test/Makefile.am
+++ b/src/libqof/qof/test/Makefile.am
@@ -46,7 +46,6 @@ test_kvp_value_LDADD = \
 if !GOOGLE_TEST_LIBS
 nodist_test_kvp_value_SOURCES = \
         ${GTEST_SRC}/src/gtest_main.cc
-test_kvp_value_LDADD += $(top_builddir)/src/test-core/libgtest.a
 endif
 
 test_kvp_value_CPPFLAGS = \
@@ -66,7 +65,6 @@ test_gnc_int128_LDADD = ${GTEST_LIBS}
 if !GOOGLE_TEST_LIBS
 nodist_test_gnc_int128_SOURCES = \
         ${GTEST_SRC}/src/gtest_main.cc
-test_gnc_int128_LDADD += $(top_builddir)/src/test-core/libgtest.a
 endif
 check_PROGRAMS += test-gnc-int128
 
@@ -82,7 +80,6 @@ test_gnc_timezone_LDADD = $(GTEST_LIBS)
 if !GOOGLE_TEST_LIBS
 nodist_test_gnc_timezone_SOURCES = \
         ${GTEST_SRC}/src/gtest_main.cc
-test_gnc_timezone_LDADD += $(top_builddir)/src/test-core/libgtest.a
 endif
 check_PROGRAMS += test-gnc-timezone
 
@@ -100,7 +97,6 @@ test_gnc_datetime_LDADD = \
 if !GOOGLE_TEST_LIBS
 nodist_test_gnc_datetime_SOURCES = \
 	$(GTEST_SRC)/src/gtest_main.cc
-test_gnc_datetime_LDADD += $(top_builddir)/src/test-core/libgtest.a
 endif
 check_PROGRAMS += test-gnc-datetime
 



Summary of changes:
 configure.ac                             | 8 +++-----
 src/backend/xml/test/test-file-stuff.h   | 3 +++
 src/engine/test-core/test-engine-stuff.h | 6 ++++++
 src/engine/test/Makefile.am              | 1 -
 src/libqof/qof/qofbook.h                 | 3 +++
 src/libqof/qof/qofinstance.h             | 4 +++-
 src/libqof/qof/test/Makefile.am          | 4 ----
 7 files changed, 18 insertions(+), 11 deletions(-)



More information about the gnucash-changes mailing list