diff --git a/ChangeLog b/ChangeLog index 91e57e7261..f616c9f306 100644 --- a/ChangeLog +++ b/ChangeLog @@ -15,6 +15,11 @@ * src/gnome-utils/gw-gnome-utils-spec.scm: wrap the new print-session apis. + * src/engine/QueryCore.c: + * src/engine/guid.c: + * src/engine/kvp-util.c: + Fixes for 64-bit architectures. Fixes bug #113231. + 2003-05-18 Derek Atkins * src/engine/gnc-lot.[ch]: add LOT_IS_CLOSED and LOT_BALANCE diff --git a/src/engine/QueryCore.c b/src/engine/QueryCore.c index 488b3c117e..2e91cdfb70 100644 --- a/src/engine/QueryCore.c +++ b/src/engine/QueryCore.c @@ -669,7 +669,7 @@ static char * int64_to_string (gpointer object, QueryAccess get) { gint64 num = ((query_int64_getter)get)(object); - return g_strdup_printf ("%lld", num); + return g_strdup_printf (GNC_SCANF_LLD, num); } /* QUERYCORE_DOUBLE */ diff --git a/src/engine/guid.c b/src/engine/guid.c index 4fd8ac36fe..1339a33f12 100644 --- a/src/engine/guid.c +++ b/src/engine/guid.c @@ -147,7 +147,8 @@ init_from_file(const char *filename, size_t max_size) file_bytes = init_from_stream(fp, max_size); - PINFO ("guid_init got %u bytes from %s", file_bytes, filename); + PINFO ("guid_init got %llu bytes from %s", (unsigned long long int) file_bytes, + filename); total += file_bytes; @@ -340,11 +341,12 @@ guid_init(void) /* time in secs and clock ticks */ bytes += init_from_time(); - PINFO ("got %u bytes", bytes); + PINFO ("got %llu bytes", (unsigned long long int) bytes); if (bytes < THRESHOLD) - PWARN("only got %u bytes.\n" - "The identifiers might not be very random.\n", bytes); + PWARN("only got %llu bytes.\n" + "The identifiers might not be very random.\n", + (unsigned long long int)bytes); guid_initialized = TRUE; } diff --git a/src/engine/kvp-util.c b/src/engine/kvp-util.c index fec65aaf40..00226d4f67 100644 --- a/src/engine/kvp-util.c +++ b/src/engine/kvp-util.c @@ -25,6 +25,7 @@ #include #include +#include "gnc-engine-util.h" #include "kvp_frame.h" #include "kvp-util-p.h" @@ -64,7 +65,7 @@ gnc_kvp_gemini (kvp_frame *kvp_root, const GUID *acct_guid, /* OK, now create subdirectory and put the actual data */ --ncopies; - sprintf (buff, "%lld", ncopies); + sprintf (buff, GNC_SCANF_LLD, (long long int) ncopies); cwd = kvp_frame_new(); kvp_frame_set_slot_nc(pwd, buff, kvp_value_new_frame_nc(cwd));