> Date: Fri, 20 Jan 2023 21:39:56 +0100 > Cc: g...@hazardy.de, gcc-patches@gcc.gnu.org, g...@gcc.gnu.org > From: Gabriel Ravier <gabrav...@gmail.com> > > >> - using wide APIs with Windows is generally considered to be a best > >> practice, even when not strictly needed (and in this case I can't see > >> any problem with doing so, unless maybe we want to code to work with > >> Windows 95 or something like that...) > > There's no reason to forcibly break GDB on platforms where wide APIs > > are not available. > Are there even any platforms that have GetModuleHandleA but not > GetModuleHandleW ? MSDN states that Windows XP and Windows Server 2003 > are the first versions to support both of the APIs, so if this is > supposed to work on Windows 98, for instance, whether we're using > GetModuleHandleA or GetModuleHandleW won't matter.
I'm not sure I follow the logic. A program that calls GetModuleHandleW will refuse to start on Windows that doesn't have that API. So any version before XP is automatically excluded the moment you use code which calls that API directly (i.e. not through a function pointer or somesuch).