gnucash master: Multiple changes pushed
John Ralls
jralls at code.gnucash.org
Wed Mar 15 00:28:35 EDT 2017
Updated via https://github.com/Gnucash/gnucash/commit/2b4137c5 (commit)
via https://github.com/Gnucash/gnucash/commit/3cb044c8 (commit)
from https://github.com/Gnucash/gnucash/commit/f795d7ff (commit)
commit 2b4137c5660dfcfda504a1a7b0acd3784f96abda
Author: John Ralls <jralls at ceridwen.us>
Date: Tue Mar 14 21:23:12 2017 -0700
Fix up building on MinGW with autotools.
diff --git a/configure.ac b/configure.ac
index eeda116..54ccef9 100644
--- a/configure.ac
+++ b/configure.ac
@@ -70,7 +70,7 @@ AM_PROG_CC_C_O
AC_GNU_SOURCE
AC_PROG_INTLTOOL
# Ensure the compiler supports C++ 11:
-AX_CXX_COMPILE_STDCXX_11(noext)
+AX_CXX_COMPILE_STDCXX_11(ext)
AC_PROG_CC_C99
AC_SUBST(GNUCASH_MAJOR_VERSION)
@@ -196,7 +196,7 @@ oldcflags="$CFLAGS"
CFLAGS=
AC_LANG_PUSH([C++])
oldcxxflags="$CXXFLAGS"
-CXXFLAGS="-Werror -std=c++11 $BOOST_CPPFLAGS"
+CXXFLAGS="-Werror -std=gnu++11 $BOOST_CPPFLAGS"
AC_MSG_CHECKING([boost/date_time/local_time/custom_time_zone.hpp])
AC_COMPILE_IFELSE([
AC_LANG_SOURCE([
@@ -1634,6 +1634,13 @@ then
else
warnFLAGS=none
fi
+# Workaround for bug in gtest on mingw, see
+# https://github.com/google/googletest/issues/893
+# https://github.com/google/googletest/issues/920
+case $host_os in
+ mingw*)
+ AM_CXXFLAGS="${AM_CXXFLAGS} -DWINVER=0x0500 -D_EMULATE_GLIBC=0"
+esac
AC_SUBST(AM_CFLAGS)
AC_SUBST(AM_CXXFLAGS)
AC_MSG_RESULT($warnFLAGS)
diff --git a/src/libqof/qof/gnc-timezone.cpp b/src/libqof/qof/gnc-timezone.cpp
index 4a8ecff..40c943c 100644
--- a/src/libqof/qof/gnc-timezone.cpp
+++ b/src/libqof/qof/gnc-timezone.cpp
@@ -173,7 +173,7 @@ zone_from_regtzi (const RegTZI& regtzi, time_zone_names names)
}
catch (boost::gregorian::bad_month& err)
{
- PWARN("Caught Bad Month Exception. Daylight Bias: %d "
+ PWARN("Caught Bad Month Exception. Daylight Bias: %ld "
"Standard Month : %d Daylight Month: %d",
regtzi.DaylightBias, regtzi.StandardDate.wMonth,
regtzi.DaylightDate.wMonth);
diff --git a/src/libqof/qof/qofsession.cpp b/src/libqof/qof/qofsession.cpp
index 9939c67..093cf49 100644
--- a/src/libqof/qof/qofsession.cpp
+++ b/src/libqof/qof/qofsession.cpp
@@ -168,7 +168,9 @@ QofSessionImpl::destroy_backend () noexcept
void
QofSessionImpl::load_backend (std::string access_method) noexcept
{
- ENTER (" list=%lu", s_providers.size ());
+ std::ostringstream s;
+ s << " list=" << s_providers.size();
+ ENTER ("%s", s.str().c_str());
for (auto const & prov : s_providers)
{
if (!boost::iequals (access_method, prov->access_method))
commit 3cb044c8fc90865f5df10864592abdfdc909abfa
Author: John Ralls <jralls at ceridwen.us>
Date: Tue Mar 14 21:26:20 2017 -0700
Adjust locale test so that it works on both Ubuntu and MacOS.
diff --git a/src/libqof/qof/test/gtest-gnc-numeric.cpp b/src/libqof/qof/test/gtest-gnc-numeric.cpp
index a6583e7..c4633ea 100644
--- a/src/libqof/qof/test/gtest-gnc-numeric.cpp
+++ b/src/libqof/qof/test/gtest-gnc-numeric.cpp
@@ -211,10 +211,20 @@ TEST(gncnumeric_stream, output_stream)
GncNumeric rational_string(123, 456);
output << rational_string;
EXPECT_EQ("123/456", output.str());
- output.imbue(std::locale("fr_FR.utf8"));
- output.str("");
- output << simple_int;
- EXPECT_EQ("123 456", output.str());
+ try
+ {
+ output.imbue(std::locale("fr_FR.utf8"));
+ output.str("");
+ output << simple_int;
+ EXPECT_EQ("123 456", output.str());
+ }
+ catch (std::runtime_error)
+ {
+ output.imbue(std::locale("fr_FR"));
+ output.str("");
+ output << simple_int;
+ EXPECT_EQ("123456", output.str());
+ }
output.str("");
output << decimal_string;
EXPECT_EQ("123,456", output.str());
Summary of changes:
configure.ac | 11 +++++++++--
src/libqof/qof/gnc-timezone.cpp | 2 +-
src/libqof/qof/qofsession.cpp | 4 +++-
src/libqof/qof/test/gtest-gnc-numeric.cpp | 18 ++++++++++++++----
4 files changed, 27 insertions(+), 8 deletions(-)
More information about the gnucash-changes
mailing list