* src/engine/QueryCore.c:

* src/engine/guid.c:
	* src/engine/kvp-util.c:
	  Fixes for 64-bit architectures.  Fixes bug #113231.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@8346 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Derek Atkins 2003-05-20 03:28:53 +00:00
parent 3fe70012c7
commit e5a6623f87
4 changed files with 14 additions and 6 deletions

View File

@ -38,6 +38,11 @@
* src/scm/printing/print-check.scm: add support for printing
to "deluxe" personal checks. This prints the check "sideways"
on a US-Letter configuration.
* 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 <derek@ihtfp.com>

View File

@ -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 */

View File

@ -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;
}

View File

@ -25,6 +25,7 @@
#include <glib.h>
#include <stdio.h>
#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));