r15304 - gnucash/trunk - Use G_GINT64_MODIFIER for qofmath test.
Derek Atkins
warlord at cvs.gnucash.org
Tue Jan 2 19:12:19 EST 2007
Author: warlord
Date: 2007-01-02 19:12:19 -0500 (Tue, 02 Jan 2007)
New Revision: 15304
Trac: http://svn.gnucash.org/trac/changeset/15304
Modified:
gnucash/trunk/
gnucash/trunk/lib/libqof/qof/qofmath128.c
Log:
Use G_GINT64_MODIFIER for qofmath test.
Fixes the problem Andreas noticed on amd64.
Property changes on: gnucash/trunk
___________________________________________________________________
Name: svk:merge
- 3889ce50-311e-0410-a464-f059747ec5d1:/local/gnucash/branches/swig-redo:802
3889ce50-311e-0410-a464-f059747ec5d1:/local/gnucash/trunk:1037
d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/trunk:13822
d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/trunk2:13366
+ 3889ce50-311e-0410-a464-f059747ec5d1:/local/gnucash/branches/swig-redo:802
3889ce50-311e-0410-a464-f059747ec5d1:/local/gnucash/trunk:1037
d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/trunk:13824
d2ab10a8-8a95-4986-baff-8d511d9f15b2:/local/gnucash/trunk2:13366
Modified: gnucash/trunk/lib/libqof/qof/qofmath128.c
===================================================================
--- gnucash/trunk/lib/libqof/qof/qofmath128.c 2007-01-02 18:37:16 UTC (rev 15303)
+++ gnucash/trunk/lib/libqof/qof/qofmath128.c 2007-01-03 00:12:19 UTC (rev 15304)
@@ -330,21 +330,12 @@
#ifdef TEST_128_BIT_MULT
-#ifdef HAVE_SCANF_LLD
-#define LLX "%llx"
-#elif HAVE_SCANF_QD
-#define LLX "%qx"
-#elif HAVE_SCANF_I64D
-#define LLX "%I64x"
-#else
-#error "Unknown 64-bit Hex code"
-#endif
-
static void pr (gint64 a, gint64 b)
{
qofint128 prod = mult128 (a,b);
printf ("%" G_GINT64_FORMAT " * %" G_GINT64_FORMAT " = %"
- G_GUINT64_FORMAT " %" G_GUINT64_FORMAT " (0x" LLX " " LLX ") %hd\n",
+ G_GUINT64_FORMAT " %" G_GUINT64_FORMAT " (0x%"
+ G_GINT64_MODIFIER "x %" G_GINT64_MODIFIER "x) %hd\n",
a, b, prod.hi, prod.lo, prod.hi, prod.lo, prod.isbig);
}
@@ -355,7 +346,8 @@
gint64 rem = rem128 (prod, c);
printf ("%" G_GINT64_FORMAT " * %" G_GINT64_FORMAT " / %" G_GINT64_FORMAT
" = %" G_GUINT64_FORMAT " %" G_GUINT64_FORMAT " + %"
- G_GINT64_FORMAT " (0x" LLX " " LLX ") %hd\n",
+ G_GINT64_FORMAT " (0x%" G_GINT64_MODIFIER "x %"
+ G_GINT64_MODIFIER "x) %hd\n",
a, b, c, quot.hi, quot.lo, rem, quot.hi, quot.lo, quot.isbig);
}
@@ -412,7 +404,8 @@
for (i=0; i<20; i++) {
quot = div128 (n, d);
- printf ("%d result = " LLX " " LLX "\n", i, quot.hi, quot.lo);
+ printf ("%d result = %" G_GINT64_MODIFIER "x %" G_GINT64_MODIFIER "x\n",
+ i, quot.hi, quot.lo);
d >>=1;
n = shift128 (n);
}
More information about the gnucash-changes
mailing list