MinGW+Wine and "DBG: rndw32: get performance data problem: ec=2"
Simon Josefsson
simon at josefsson.org
Fri Apr 18 09:17:06 CEST 2008
Simon Josefsson <simon at josefsson.org> writes:
> Simon Josefsson <simon at josefsson.org> writes:
>
>> Simon Josefsson <simon at josefsson.org> writes:
>>
>>> Works for me. How about this patch?
>>
>> I reversed the logic in the variable name, here is a better patch...
>
> This patch is somewhat better -- if the return codes for some reason
> differ between invocations, the code will print a new debug message
> every time it changes.
>
> (The first time, 'been_here' can never be ERROR_SUCCESS, or it wouldn't
> have reached that if clause.)
Any chance to apply this patch? The patch reduces noise from libgcrypt
under MinGW+Wine significantly. I tested that it applies and works
against 1.4.0.
Thanks,
> /Simon
>
> Index: rndw32.c
> ===================================================================
> --- rndw32.c (revision 1280)
> +++ rndw32.c (working copy)
> @@ -1,5 +1,5 @@
> /* rndw32.c - W32 entropy gatherer
> - * Copyright (C) 1999, 2000, 2002, 2003, 2007 Free Software Foundation, Inc.
> + * Copyright (C) 1999, 2000, 2002, 2003, 2007, 2008 Free Software Foundation, Inc.
> * Copyright Peter Gutmann, Matt Thomlinson and Blake Coverett 1996-2006
> *
> * This file is part of Libgcrypt.
> @@ -440,8 +440,11 @@
> }
> else
> {
> - log_debug ("rndw32: get performance data problem: ec=%ld\n",
> - status);
> + static int been_here = ERROR_SUCCESS;
> + if (been_here != status)
> + log_debug ("rndw32: get performance data problem: ec=%ld\n",
> + status);
> + been_here = status;
> break;
> }
> }
More information about the Gcrypt-devel
mailing list