r18858 - gnucash/trunk/src/libqof/qof - Only use long long format specifiers if available - avoids error message when compiler thinks they're not available.
Phil Longstaff
plongstaff at code.gnucash.org
Sat Mar 6 15:33:42 EST 2010
Author: plongstaff
Date: 2010-03-06 15:33:42 -0500 (Sat, 06 Mar 2010)
New Revision: 18858
Trac: http://svn.gnucash.org/trac/changeset/18858
Modified:
gnucash/trunk/src/libqof/qof/guid.c
Log:
Only use long long format specifiers if available - avoids error message when compiler thinks they're not available.
Modified: gnucash/trunk/src/libqof/qof/guid.c
===================================================================
--- gnucash/trunk/src/libqof/qof/guid.c 2010-03-06 16:08:08 UTC (rev 18857)
+++ gnucash/trunk/src/libqof/qof/guid.c 2010-03-06 20:33:42 UTC (rev 18858)
@@ -219,8 +219,13 @@
file_bytes = init_from_stream(fp, max_size);
+#ifdef HAVE_SCANF_LLD
PINFO ("guid_init got %llu bytes from %s", (unsigned long long int) file_bytes,
filename);
+#else
+ PINFO ("guid_init got %lu bytes from %s", (unsigned long int) file_bytes,
+ filename);
+#endif
total += file_bytes;
@@ -446,13 +451,22 @@
/* time in secs and clock ticks */
bytes += init_from_time();
+#ifdef HAVE_SCANF_LLD
PINFO ("got %llu bytes", (unsigned long long int) bytes);
if (bytes < THRESHOLD)
PWARN("only got %llu bytes.\n"
"The identifiers might not be very random.\n",
(unsigned long long int)bytes);
+#else
+ PINFO ("got %lu bytes", (unsigned long int) bytes);
+ if (bytes < THRESHOLD)
+ PWARN("only got %lu bytes.\n"
+ "The identifiers might not be very random.\n",
+ (unsigned long int)bytes);
+#endif
+
guid_initialized = TRUE;
}
More information about the gnucash-changes
mailing list