r16810 - gnucash/trunk/src - #506270: Replace %lld by G_GINT64_FORMAT in tests, fixes make check on Win32.

Andreas Köhler andi5 at cvs.gnucash.org
Sat Jan 5 09:34:58 EST 2008


Author: andi5
Date: 2008-01-05 09:34:58 -0500 (Sat, 05 Jan 2008)
New Revision: 16810
Trac: http://svn.gnucash.org/trac/changeset/16810

Modified:
   gnucash/trunk/src/backend/file/test/test-date-converting.c
   gnucash/trunk/src/engine/test/test-date.c
Log:
#506270: Replace %lld by G_GINT64_FORMAT in tests, fixes make check on Win32.

Patch from Daniel Harding.


Modified: gnucash/trunk/src/backend/file/test/test-date-converting.c
===================================================================
--- gnucash/trunk/src/backend/file/test/test-date-converting.c	2008-01-05 14:05:04 UTC (rev 16809)
+++ gnucash/trunk/src/backend/file/test/test-date-converting.c	2008-01-05 14:34:58 UTC (rev 16810)
@@ -42,7 +42,8 @@
         else if(spec1->tv_sec != spec2.tv_sec)
         {
             failure_args("timespec_secs", __FILE__, __LINE__, 
-                         "not equal ints are %lld and %lld\n",
+                         "not equal ints are %" G_GINT64_FORMAT
+                         " and %" G_GINT64_FORMAT "\n",
                          spec1->tv_sec, spec2.tv_sec);
         }
 

Modified: gnucash/trunk/src/engine/test/test-date.c
===================================================================
--- gnucash/trunk/src/engine/test/test-date.c	2008-01-05 14:05:04 UTC (rev 16809)
+++ gnucash/trunk/src/engine/test/test-date.c	2008-01-05 14:34:58 UTC (rev 16810)
@@ -38,15 +38,12 @@
   if (!ok || always_print)
   {
     fprintf (stderr,
-             "\n%lld:%lld -> %s ->\n\t%lld:%lld "
-             "(diff of %lld secs %lld nsecs)\n",
-             (long long int) ts.tv_sec,
-             (long long int) ts.tv_nsec,
-             str,
-             (long long int) ts_2.tv_sec,
-             (long long int) ts_2.tv_nsec,
-             (long long int) (ts.tv_sec - ts_2.tv_sec),
-             (long long int) (ts.tv_nsec - ts_2.tv_nsec));
+             "\n%" G_GINT64_FORMAT ":%ld -> %s ->\n"
+             "\t%" G_GINT64_FORMAT ":%ld"
+             " (diff of %" G_GINT64_FORMAT " secs %ld nsecs)\n",
+             ts.tv_sec, ts.tv_nsec, str,
+             ts_2.tv_sec, ts_2.tv_nsec,
+             ts.tv_sec - ts_2.tv_sec, ts.tv_nsec - ts_2.tv_nsec);
 
     if (!ok)
     {



More information about the gnucash-changes mailing list