[Patch] Enabling entropy gathering with Tool Help on Windows 2000

Sami Tolvanen sami at tolvanen.com
Fri Jul 6 16:50:01 CEST 2001

> What I mean is that the current version runs fine on all Systems using
> the Win32-API (what a name).  If we add the extra stuff for W2000 we
> might run into problems with other Windows versions.

Umm, the patch is trivial, it doesn't add any "extra stuff" and only affects
Windows NT 5.0 and later.

If you just looked at the code, you would notice that in addition to
renaming the function "slow_gatherer_windows95" to a more proper name,
"slow_gatherer_toolhelp", the patch only changes these lines in function

  is_windows95 = platform == VER_PLATFORM_WIN32_WINDOWS;

  if (is_windows95 ) {
      slow_gatherer_windows95( add, requester );
  else {
      slow_gatherer_windowsNT( add, requester );

to this:

  is_windowsNT = platform == VER_PLATFORM_WIN32_NT;
  has_toolhelp = ( platform == VER_PLATFORM_WIN32_WINDOWS ||
                   ( is_windowsNT && osvi.dwMajorVersion >= 5 ) );

  if ( has_toolhelp ) {
      slow_gatherer_toolhelp( add, requester );
  if ( is_windowsNT ) {
      slow_gatherer_windowsNT( add, requester );

As you can see, the only change is to call "slow_gatherer_toolhelp" in
addition to "slow_gatherer_windowsNT" if we are running on Windows NT 5.0 or
later. Nothing changes for other platforms.

> I have no idea how long the extra gathering takes, so this was just a
> guess.

It takes less than one second on my system, I haven't measured the exact

Sami Tolvanen

More information about the Gnupg-devel mailing list