gnucash maint: Fix broken build on 64-bit systems

John Ralls jralls at code.gnucash.org
Thu Jun 5 15:29:30 EDT 2014


Updated	 via  https://github.com/Gnucash/gnucash/commit/c9c498a8 (commit)
	from  https://github.com/Gnucash/gnucash/commit/8ac8c70c (commit)



commit c9c498a85c44cabded5e5dfcfd5121eba9e6a01a
Author: John Ralls <jralls at ceridwen.us>
Date:   Thu Jun 5 13:15:52 2014 -0700

    Fix broken build on 64-bit systems
    
    Where G_GUINT64_FORMAT is %ld, so GCC complains about long long.

diff --git a/src/libqof/qof/guid.c b/src/libqof/qof/guid.c
index 67c619a..6ffed52 100644
--- a/src/libqof/qof/guid.c
+++ b/src/libqof/qof/guid.c
@@ -29,6 +29,7 @@
 # include <sys/types.h>
 #endif
 #include <ctype.h>
+#include <stdint.h>
 #ifdef HAVE_DIRENT_H
 # include <dirent.h>
 #endif
@@ -248,7 +249,7 @@ init_from_file(const char *filename, size_t max_size)
 
 #ifdef HAVE_SCANF_LLD
     PINFO ("guid_init got %" G_GUINT64_FORMAT " bytes from %s",
-	   (unsigned long long int) file_bytes,
+	   (uint64_t) file_bytes,
            filename);
 #else
     PINFO ("guid_init got %lu bytes from %s", (unsigned long int) file_bytes,
@@ -514,12 +515,12 @@ guid_init(void)
     /* time in secs and clock ticks */
     bytes += init_from_time();
 
-    PINFO ("got %" G_GUINT64_FORMAT " bytes", (unsigned long long int) bytes);
+    PINFO ("got %" G_GUINT64_FORMAT " bytes", (uint64_t) bytes);
 
     if (bytes < THRESHOLD)
         PWARN("only got %" G_GUINT64_FORMAT " bytes.\n"
               "The identifiers might not be very random.\n",
-              (unsigned long long int)bytes);
+              (uint64_t)bytes);
 
     guid_initialized = TRUE;
     LEAVE();



Summary of changes:
 src/libqof/qof/guid.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)



More information about the gnucash-changes mailing list