From: Jon Turney <jon.turney@dronecode.org.uk>
To: Ken Brown <kbrown@cornell.edu>,
Cygwin Patches <cygwin-patches@cygwin.com>
Subject: Re: [PATCH] Cygwin: remove most occurrences of __stdcall, WINAPI, and, __cdecl
Date: Mon, 6 Jun 2022 11:41:39 +0100 [thread overview]
Message-ID: <618fb9d8-52bd-a14d-4419-46408d4d3bd6@dronecode.org.uk> (raw)
In-Reply-To: <2d54f846-365f-848f-4fdb-1c22d4c1bfa0@cornell.edu>
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
prev parent reply other threads:[~2022-06-06 10:41 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-03 14:00 Ken Brown
2022-06-05 20:24 ` Jon Turney
2022-06-05 22:23 ` Ken Brown
2022-06-06 0:02 ` Takashi Yano
2022-06-06 16:24 ` Ken Brown
2022-06-06 23:21 ` Takashi Yano
2022-06-07 16:49 ` Takashi Yano
2022-06-07 18:00 ` Ken Brown
2022-06-06 10:41 ` Jon Turney [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=618fb9d8-52bd-a14d-4419-46408d4d3bd6@dronecode.org.uk \
--to=jon.turney@dronecode.org.uk \
--cc=cygwin-patches@cygwin.com \
--cc=kbrown@cornell.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).