From 05febd5860f3a1d2f5d4916f3a88087c0d591bee Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 18 Oct 2010 10:02:29 +0000 Subject: [PATCH] Add a minor feature for w32. --- cipher/ChangeLog | 4 ++++ cipher/rndw32.c | 13 ++++++++++--- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/cipher/ChangeLog b/cipher/ChangeLog index aff513528..1f754f912 100644 --- a/cipher/ChangeLog +++ b/cipher/ChangeLog @@ -1,3 +1,7 @@ +2010-10-18 Werner Koch + + * rndw32.c (slow_gatherer_windowsNT): Add GNUPG_RNDW32_NOPERF envvar. + 2010-09-28 Steven M. Schweda (wk) Changes to help the VMS port. See diff --git a/cipher/rndw32.c b/cipher/rndw32.c index 9954cafd7..2d107e009 100644 --- a/cipher/rndw32.c +++ b/cipher/rndw32.c @@ -477,9 +477,16 @@ slow_gatherer_windowsNT( void (*add)(const void*, size_t, int), int requester ) * worst-case estimate which is usually nowhere near the actual amount * required. For example it may report that 128K of memory is required, * but only return 64K of data */ -#warning How shall we disable get performacne data - if (0) - log_debug ("Warning: get performance data disabled\n"); + if (getenv("GNUPG_RNDW32_NOPERF")) + { + static int shown; + + if (!shown) + { + shown = 1; + g10_log_info ("note: get performance data has been disabled\n"); + } + } else { pPerfData = xmalloc (cbPerfData); for (;;) {