On 03/06/2022 15:00, Ken Brown wrote:
--- a/winsup/utils/regtool.cc
+++ b/winsup/utils/regtool.cc
@@ -590,7 +590,7 @@ cmd_add ()
  }
extern "C" {
-  LONG WINAPI (*regDeleteKeyEx)(HKEY, LPCWSTR, REGSAM, DWORD);
+  LONG (*regDeleteKeyEx)(HKEY, LPCWSTR, REGSAM, DWORD);
  }
int
@@ -603,7 +603,7 @@ cmd_remove ()
      {
        HMODULE mod = LoadLibrary ("advapi32.dll");
        if (mod)
-       regDeleteKeyEx = (LONG WINAPI (*)(HKEY, LPCWSTR, REGSAM, DWORD)) GetProcAddress 
(mod, "RegDeleteKeyExW");
+       regDeleteKeyEx = (LONG (*)(HKEY, LPCWSTR, REGSAM, DWORD)) GetProcAddress (mod, 
"RegDeleteKeyExW");
      }
    if (regDeleteKeyEx)
      rv = (*regDeleteKeyEx) (key, value, wow64, 0);

MSDN says RegDeleteKeyExW() is since Windows 2000, so I think this can all be dropped and just link with it directly instead?

There may be other instances of that simplification which can happen in utils/ ?

Later: This all seems strangely familiar... Oh, it appears I wrote this patch, and then forgot to apply it :(

https://cygwin.com/pipermail/cygwin-patches/2022q1/011794.html

Reply via email to