Release candidate for Libgcrypt 1.4.2

Simon Josefsson simon at josefsson.org
Mon Sep 1 18:36:03 CEST 2008


Simon Josefsson <simon at josefsson.org> writes:

> There is one old buglet wrt to Wine.  The self tests prints times such
> as this:
>
> MD5          27574050817572864ms 5084966400557066ms 5084966400557116ms
> SHA1         27574050817572864ms 5103280141107220ms 5103280141107260ms
> RIPEMD160    27574050817572884ms 5103280141107220ms 5103280141107260ms
> TIGER192     27574050817572884ms 5103280141107230ms 5103280141107270ms
> ...
>
> However, it is not important and I'll see if I can debug it and provide
> a patch to make it look nicer.

This patch fixes the problem.

Thanks,
/Simon

Index: benchmark.c
===================================================================
--- benchmark.c	(revision 1312)
+++ benchmark.c	(working copy)
@@ -321,7 +321,7 @@
   t2 += (((unsigned long long)stopped_at.user_time.dwHighDateTime << 32)
         + stopped_at.user_time.dwLowDateTime);
   t = (t2 - t1)/10000;
-  snprintf (buf, sizeof buf, "%5lums", (unsigned long)t );
+  snprintf (buf, sizeof buf, "%5.0fms", (double)t );
 #else
   snprintf (buf, sizeof buf, "%5.0fms",
             (((double) (stopped_at - started_at))/CLOCKS_PER_SEC)*10000000);



More information about the Gcrypt-devel mailing list