gnucash master: Multiple changes pushed

Mike Alexander mta at code.gnucash.org
Thu Dec 11 03:16:03 EST 2014


Updated	 via  https://github.com/Gnucash/gnucash/commit/f4168e10 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/09145fe1 (commit)
	 via  https://github.com/Gnucash/gnucash/commit/78fea12a (commit)
	from  https://github.com/Gnucash/gnucash/commit/bd8ce2f7 (commit)



commit f4168e108befeefa3f1c77de947a5c804f852953
Author: Mike Alexander <mta at umich.edu>
Date:   Thu Dec 11 01:11:01 2014 -0500

    Update XCode project for recent C++ related changes

diff --git a/gnucash.xcodeproj/project.pbxproj b/gnucash.xcodeproj/project.pbxproj
index 869c41f..a6ed8de 100644
--- a/gnucash.xcodeproj/project.pbxproj
+++ b/gnucash.xcodeproj/project.pbxproj
@@ -8,7 +8,6 @@
 
 /* Begin PBXFileReference section */
 		6E056BF416C0F1E100B5E1F2 /* qof-string-cache.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "qof-string-cache.h"; path = "src/libqof/qof/qof-string-cache.h"; sourceTree = "<group>"; };
-		6E056BF516C0F1E100B5E1F2 /* qofmath128-p.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "qofmath128-p.h"; path = "src/libqof/qof/qofmath128-p.h"; sourceTree = "<group>"; };
 		6E0E95251851BC8F0033FCAD /* assistant-acct-period.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = "assistant-acct-period.c"; path = "src/gnome/assistant-acct-period.c"; sourceTree = "<group>"; };
 		6E0E95261851BC8F0033FCAD /* assistant-acct-period.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; name = "assistant-acct-period.h"; path = "src/gnome/assistant-acct-period.h"; sourceTree = "<group>"; };
 		6E0E95271851BC8F0033FCAD /* assistant-hierarchy.c */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.c; name = "assistant-hierarchy.c"; path = "src/gnome/assistant-hierarchy.c"; sourceTree = "<group>"; };
@@ -176,8 +175,6 @@
 		6E4EC6520F9A359B00C6F6AC /* kvp-util.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "kvp-util.h"; path = "src/libqof/qof/kvp-util.h"; sourceTree = "<group>"; };
 		6E4EC6540F9A359B00C6F6AC /* kvp_frame.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = kvp_frame.h; path = src/libqof/qof/kvp_frame.h; sourceTree = "<group>"; };
 		6E4EC6550F9A359B00C6F6AC /* Makefile.am */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Makefile.am; path = src/libqof/qof/Makefile.am; sourceTree = "<group>"; };
-		6E4EC6560F9A359B00C6F6AC /* md5.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = md5.c; path = src/libqof/qof/md5.c; sourceTree = "<group>"; };
-		6E4EC6570F9A359B00C6F6AC /* md5.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = md5.h; path = src/libqof/qof/md5.h; sourceTree = "<group>"; };
 		6E4EC6580F9A359B00C6F6AC /* qof-gobject.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "qof-gobject.h"; path = "src/libqof/qof/qof-gobject.h"; sourceTree = "<group>"; };
 		6E4EC65A0F9A359B00C6F6AC /* qof.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = qof.h; path = src/libqof/qof/qof.h; sourceTree = "<group>"; };
 		6E4EC65B0F9A359B00C6F6AC /* qofbackend-p.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "qofbackend-p.h"; path = "src/libqof/qof/qofbackend-p.h"; sourceTree = "<group>"; };
@@ -200,7 +197,6 @@
 		6E4EC6800F9A359B00C6F6AC /* qofquery.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = qofquery.h; path = src/libqof/qof/qofquery.h; sourceTree = "<group>"; };
 		6E4EC6810F9A359B00C6F6AC /* qofquerycore-p.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "qofquerycore-p.h"; path = "src/libqof/qof/qofquerycore-p.h"; sourceTree = "<group>"; };
 		6E4EC6830F9A359B00C6F6AC /* qofquerycore.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = qofquerycore.h; path = src/libqof/qof/qofquerycore.h; sourceTree = "<group>"; };
-		6E4EC6850F9A359B00C6F6AC /* qofreference.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = qofreference.h; path = src/libqof/qof/qofreference.h; sourceTree = "<group>"; };
 		6E4EC6860F9A359B00C6F6AC /* qofsession-p.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "qofsession-p.h"; path = "src/libqof/qof/qofsession-p.h"; sourceTree = "<group>"; };
 		6E4EC6880F9A359B00C6F6AC /* qofsession.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = qofsession.h; path = src/libqof/qof/qofsession.h; sourceTree = "<group>"; };
 		6E4EC68C0F9A359B00C6F6AC /* qofutil.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = qofutil.h; path = src/libqof/qof/qofutil.h; sourceTree = "<group>"; };
@@ -936,12 +932,18 @@
 		6E97EB7E1915B9D90021442F /* qofid.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = qofid.cpp; path = src/libqof/qof/qofid.cpp; sourceTree = "<group>"; };
 		6E97EB7F1915B9D90021442F /* qofinstance.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = qofinstance.cpp; path = src/libqof/qof/qofinstance.cpp; sourceTree = "<group>"; };
 		6E97EB801915B9D90021442F /* qoflog.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = qoflog.cpp; path = src/libqof/qof/qoflog.cpp; sourceTree = "<group>"; };
-		6E97EB811915B9D90021442F /* qofmath128.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = qofmath128.cpp; path = src/libqof/qof/qofmath128.cpp; sourceTree = "<group>"; };
 		6E97EB821915B9D90021442F /* qofobject.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = qofobject.cpp; path = src/libqof/qof/qofobject.cpp; sourceTree = "<group>"; };
 		6E97EB831915B9D90021442F /* qofquery.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = qofquery.cpp; path = src/libqof/qof/qofquery.cpp; sourceTree = "<group>"; };
 		6E97EB841915B9D90021442F /* qofquerycore.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = qofquerycore.cpp; path = src/libqof/qof/qofquerycore.cpp; sourceTree = "<group>"; };
 		6E97EB851915B9D90021442F /* qofsession.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = qofsession.cpp; path = src/libqof/qof/qofsession.cpp; sourceTree = "<group>"; };
 		6E97EB861915B9D90021442F /* qofutil.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = qofutil.cpp; path = src/libqof/qof/qofutil.cpp; sourceTree = "<group>"; };
+		6EB956961A39565A002E3AC5 /* gnc-int128.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "gnc-int128.cpp"; path = "src/libqof/qof/gnc-int128.cpp"; sourceTree = "<group>"; };
+		6EB956971A39565A002E3AC5 /* gnc-int128.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; name = "gnc-int128.hpp"; path = "src/libqof/qof/gnc-int128.hpp"; sourceTree = "<group>"; };
+		6EB956981A39565A002E3AC5 /* gnc-rational.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "gnc-rational.cpp"; path = "src/libqof/qof/gnc-rational.cpp"; sourceTree = "<group>"; };
+		6EB956991A39565A002E3AC5 /* gnc-rational.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; name = "gnc-rational.hpp"; path = "src/libqof/qof/gnc-rational.hpp"; sourceTree = "<group>"; };
+		6EB9569A1A39565A002E3AC5 /* kvp_frame.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; name = kvp_frame.hpp; path = src/libqof/qof/kvp_frame.hpp; sourceTree = "<group>"; };
+		6EB9569B1A39565A002E3AC5 /* kvp-value.cpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.cpp; name = "kvp-value.cpp"; path = "src/libqof/qof/kvp-value.cpp"; sourceTree = "<group>"; };
+		6EB9569C1A39565A002E3AC5 /* kvp-value.hpp */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.cpp.h; name = "kvp-value.hpp"; path = "src/libqof/qof/kvp-value.hpp"; sourceTree = "<group>"; };
 		6EBC06EF18B1D66300A5CEB7 /* gnc-state.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "gnc-state.c"; path = "src/app-utils/gnc-state.c"; sourceTree = "<group>"; };
 		6EBC06F018B1D66300A5CEB7 /* gnc-state.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "gnc-state.h"; path = "src/app-utils/gnc-state.h"; sourceTree = "<group>"; };
 		6EBC06F118B1D6E600A5CEB7 /* gnc-address-sql.c */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.c; name = "gnc-address-sql.c"; path = "src/backend/sql/gnc-address-sql.c"; sourceTree = "<group>"; };
@@ -1288,6 +1290,9 @@
 		6E7BB1300B955465000B79D4 /* libqof */ = {
 			isa = PBXGroup;
 			children = (
+				6EB956961A39565A002E3AC5 /* gnc-int128.cpp */,
+				6EB956981A39565A002E3AC5 /* gnc-rational.cpp */,
+				6EB9569B1A39565A002E3AC5 /* kvp-value.cpp */,
 				6E97EB721915B9D90021442F /* gnc-date.cpp */,
 				6E97EB731915B9D90021442F /* gnc-numeric.cpp */,
 				6E97EB741915B9D90021442F /* guid.cpp */,
@@ -1303,13 +1308,11 @@
 				6E97EB7E1915B9D90021442F /* qofid.cpp */,
 				6E97EB7F1915B9D90021442F /* qofinstance.cpp */,
 				6E97EB801915B9D90021442F /* qoflog.cpp */,
-				6E97EB811915B9D90021442F /* qofmath128.cpp */,
 				6E97EB821915B9D90021442F /* qofobject.cpp */,
 				6E97EB831915B9D90021442F /* qofquery.cpp */,
 				6E97EB841915B9D90021442F /* qofquerycore.cpp */,
 				6E97EB851915B9D90021442F /* qofsession.cpp */,
 				6E97EB861915B9D90021442F /* qofutil.cpp */,
-				6E4EC6560F9A359B00C6F6AC /* md5.c */,
 			);
 			name = libqof;
 			sourceTree = "<group>";
@@ -2185,6 +2188,10 @@
 		6E7BB1480B9558DE000B79D4 /* libqof */ = {
 			isa = PBXGroup;
 			children = (
+				6EB956971A39565A002E3AC5 /* gnc-int128.hpp */,
+				6EB956991A39565A002E3AC5 /* gnc-rational.hpp */,
+				6EB9569A1A39565A002E3AC5 /* kvp_frame.hpp */,
+				6EB9569C1A39565A002E3AC5 /* kvp-value.hpp */,
 				6EC70C2C1176DF50006E876C /* qofbookslots.h */,
 				6E4EC6490F9A359B00C6F6AC /* gnc-date-p.h */,
 				6E4EC64B0F9A359B00C6F6AC /* gnc-date.h */,
@@ -2193,7 +2200,6 @@
 				6E4EC6500F9A359B00C6F6AC /* kvp-util-p.h */,
 				6E4EC6520F9A359B00C6F6AC /* kvp-util.h */,
 				6E4EC6540F9A359B00C6F6AC /* kvp_frame.h */,
-				6E4EC6570F9A359B00C6F6AC /* md5.h */,
 				6E4EC6580F9A359B00C6F6AC /* qof-gobject.h */,
 				6E4EC65A0F9A359B00C6F6AC /* qof.h */,
 				6E4EC65B0F9A359B00C6F6AC /* qofbackend-p.h */,
@@ -2216,12 +2222,10 @@
 				6E4EC6800F9A359B00C6F6AC /* qofquery.h */,
 				6E4EC6810F9A359B00C6F6AC /* qofquerycore-p.h */,
 				6E4EC6830F9A359B00C6F6AC /* qofquerycore.h */,
-				6E4EC6850F9A359B00C6F6AC /* qofreference.h */,
 				6E4EC6860F9A359B00C6F6AC /* qofsession-p.h */,
 				6E4EC6880F9A359B00C6F6AC /* qofsession.h */,
 				6E4EC68C0F9A359B00C6F6AC /* qofutil.h */,
 				6E056BF416C0F1E100B5E1F2 /* qof-string-cache.h */,
-				6E056BF516C0F1E100B5E1F2 /* qofmath128-p.h */,
 			);
 			name = libqof;
 			sourceTree = "<group>";

commit 09145fe11e5024868538df0628b5c0edfa5284bc
Author: Mike Alexander <mta at umich.edu>
Date:   Wed Dec 10 19:16:09 2014 -0500

    Tell Guile (and others) to look in install/lib/gnucash for ligraries.
    Without this Guile can't find libgncmod-engine and GnuCash won't start.
    I don't know how this worked before, perhaps because the correct path
    was in src/bin/overrides/gnucash-env.in

diff --git a/src/bin/environment.in b/src/bin/environment.in
index eef7194..c0aec00 100644
--- a/src/bin/environment.in
+++ b/src/bin/environment.in
@@ -1,8 +1,6 @@
 @-NOTE If you make any changes here, you should probably -@
 @-NOTE also change the equivalent sections in:           -@
- at -NOTE - src/bin/gnucash-launcher.in                     -@
- at -NOTE - packaging/win32/gnucash.iss.in                  -@
- at -NOTE - packaging/win32/install.sh                      -@
+ at -NOTE - src/bin/overrides/gnucash-env.in                -@
 # environment
 #
 # This configuration file can be used to change/add environment variables
@@ -53,7 +51,7 @@ GUILE_LOAD_PATH={GNC_DATA}/scm;{GUILE_LIBS};{GUILE_LOAD_PATH}
 GUILE_LOAD_COMPILED_PATH={GNC_DATA}/scm/ccache/@-GUILE_EFFECTIVE_VERSION-@;{GUILE_LIBS};{GUILE_LOAD_PATH}
 
 # Tell Guile where to find GnuCash specific shared libraries
-GNC_LIBRARY_PATH={SYS_LIB}
+GNC_LIBRARY_PATH={SYS_LIB};{GNC_LIB}
 LD_LIBRARY_PATH={GNC_LIBRARY_PATH};{LD_LIBRARY_PATH}
 # The same, but for GnuCash on OS X
 DYLD_LIBRARY_PATH={GNC_LIBRARY_PATH};{DYLD_LIBRARY_PATH}

commit 78fea12afc5f0db5a137d0766e92994232f60a78
Author: Mike Alexander <mta at umich.edu>
Date:   Wed Dec 10 18:40:13 2014 -0500

    Some type mismatch fixes to make it build with clang in MacOSX Mavericks.
    These may not be the best fixes, but they make things build again with
    XCode 6.1.1 in MacOSX 10.9.5.

diff --git a/src/engine/test-core/test-engine-stuff.c b/src/engine/test-core/test-engine-stuff.c
index 08f9963..39196ac 100644
--- a/src/engine/test-core/test-engine-stuff.c
+++ b/src/engine/test-core/test-engine-stuff.c
@@ -457,7 +457,7 @@ get_random_gnc_numeric(int64_t deno)
              numer = limit;
     }
     if (0 == numer) numer = 1;
-    g_log("test.engine.suff", G_LOG_LEVEL_INFO, "New GncNumeric %" PRIu64 " / %" PRIu64 " !\n", numer, deno);
+    g_log("test.engine.suff", G_LOG_LEVEL_INFO, "New GncNumeric %" G_GINT64_FORMAT " / %" PRId64 " !\n", numer, deno);
     return gnc_numeric_create(numer, deno);
 }
 
@@ -944,8 +944,8 @@ add_random_splits(QofBook *book, Transaction *trn, GList *account_list)
     if (do_bork())
     {
         val = get_random_gnc_numeric(GNC_DENOM_AUTO);
-        g_log ("test.engine.suff", G_LOG_LEVEL_DEBUG, "Borking second %" PRIu64
-	       " / %" PRIu64 ", scu %d\n", val.num, val.denom, s2_scu);
+        g_log ("test.engine.suff", G_LOG_LEVEL_DEBUG, "Borking second %" G_GINT64_FORMAT
+	       " / %" G_GINT64_FORMAT ", scu %d\n", val.num, val.denom, s2_scu);
     }
     val = gnc_numeric_neg(val);
     xaccSplitSetValue(s2, val);
@@ -1310,7 +1310,7 @@ get_random_split(QofBook *book, Account *acct, Transaction *trn)
             {
                 int64_t new_num = val.num / (val.denom / scu);
                 g_log("test.engine.suff", G_LOG_LEVEL_DEBUG,
-		      "Adjusting val.denom from %" PRIu64 " to %" PRIu64 "\n",
+		      "Adjusting val.denom from %" G_GINT64_FORMAT " to %" PRId64 "\n",
 		      val.num, new_num);
                 val.num = new_num;
             }
@@ -1319,7 +1319,7 @@ get_random_split(QofBook *book, Account *acct, Transaction *trn)
     }
     while (gnc_numeric_check(val) != GNC_ERROR_OK);
     g_log ("test.engine.suff", G_LOG_LEVEL_DEBUG,
-	   "Random split value: %" PRIu64 " / %" PRIu64 ", scu %d\n",
+	   "Random split value: %" G_GINT64_FORMAT " / %" G_GINT64_FORMAT ", scu %d\n",
 	   val.num, val.denom, scu);
     xaccSplitSetValue(ret, val);
 
@@ -1343,7 +1343,7 @@ get_random_split(QofBook *book, Account *acct, Transaction *trn)
         while (gnc_numeric_check(amt) != GNC_ERROR_OK);
     }
     g_log ("test.engine.suff", G_LOG_LEVEL_DEBUG, "Random split amount: %"
-	   PRIu64 " / %" PRIu64 ", rate %" PRIu64 " / %" PRIu64 "\n",
+	   G_GINT64_FORMAT " / %" G_GINT64_FORMAT ", rate %" G_GINT64_FORMAT " / %" G_GINT64_FORMAT "\n",
 	   amt.num, amt.denom, rate.num, rate.denom);
 
 
diff --git a/src/libqof/qof/gnc-int128.hpp b/src/libqof/qof/gnc-int128.hpp
index 47cf69a..522cf79 100644
--- a/src/libqof/qof/gnc-int128.hpp
+++ b/src/libqof/qof/gnc-int128.hpp
@@ -33,6 +33,7 @@ extern "C"
 #define  __STDC_FORMAT_MACROS 1
 #endif
 #include <inttypes.h>
+#include <glib.h>
 }
 
 #include <stdexcept>
@@ -76,6 +77,7 @@ enum // Values for m_flags
     GncInt128 (uint16_t lower) : GncInt128{static_cast<uint64_t>(lower)} {};
     GncInt128 (int32_t lower) : GncInt128{static_cast<int64_t>(lower)} {};
     GncInt128 (uint32_t lower) : GncInt128{static_cast<uint64_t>(lower)} {};
+    GncInt128 (gint64 lower) : GncInt128{static_cast<int64_t>(lower)} {};
     GncInt128 (int64_t lower);
     GncInt128 (uint64_t lower);
 /**
diff --git a/src/libqof/qof/gnc-numeric.cpp b/src/libqof/qof/gnc-numeric.cpp
index 94c0bd3..785dd9c 100644
--- a/src/libqof/qof/gnc-numeric.cpp
+++ b/src/libqof/qof/gnc-numeric.cpp
@@ -346,7 +346,7 @@ gnc_numeric_abs(gnc_numeric a)
  ********************************************************************/
 
 gnc_numeric
-gnc_numeric_convert(gnc_numeric in, int64_t denom, int how)
+gnc_numeric_convert(gnc_numeric in, gint64 denom, int how)
 {
     GncNumeric a (in), b (gnc_numeric_zero());
     GncDenom d (a, b, denom, how);
diff --git a/src/libqof/qof/kvp_frame.cpp b/src/libqof/qof/kvp_frame.cpp
index 4ba546e..9df4437 100644
--- a/src/libqof/qof/kvp_frame.cpp
+++ b/src/libqof/qof/kvp_frame.cpp
@@ -921,9 +921,9 @@ kvp_glist_compare(const GList * list1, const GList * list2)
  ********************************************************************/
 
 KvpValue *
-kvp_value_new_gint64(int64_t value)
+kvp_value_new_gint64(gint64 value)
 {
-    return new KvpValueImpl{value};
+    return new KvpValueImpl{static_cast<int64_t>(value)};
 }
 
 KvpValue *
@@ -1008,7 +1008,7 @@ kvp_value_get_type(const KvpValue * oldval)
     return value->get_type();
 }
 
-int64_t
+gint64
 kvp_value_get_gint64(const KvpValue * ovalue)
 {
     if (!ovalue) return {};



Summary of changes:
 gnucash.xcodeproj/project.pbxproj        | 24 ++++++++++++++----------
 src/bin/environment.in                   |  6 ++----
 src/engine/test-core/test-engine-stuff.c | 12 ++++++------
 src/libqof/qof/gnc-int128.hpp            |  2 ++
 src/libqof/qof/gnc-numeric.cpp           |  2 +-
 src/libqof/qof/kvp_frame.cpp             |  6 +++---
 6 files changed, 28 insertions(+), 24 deletions(-)



More information about the gnucash-changes mailing list