GetVersionEx is also odd as it is stuck to 8 the version it returns for Windows 10 and 11 by default. To make it return the right version you need to call mt tool with a manifest file like below. <?xml version="1.0" encoding="UTF-8" standalone="yes" ?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <description>OpenLisp by Eligis</description> <assemblyIdentity name="OpenLisp" version="11.3.0.0" processorArchitecture="*" publicKeyToken="0000000000000000" type="win32" /> <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> <application> <!-- Supports Windows Vista functionality --> <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}" /> <!-- Supports Windows 7 functionality --> <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}" /> <!-- Supports Windows 8 functionality --> <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}" /> <!-- Supports Windows 8.1 functionality --> <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}" /> <!-- Supports Windows 10 functionality --> <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}" /> </application> </compatibility> <!-- Identify the application security requirements. --> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="asInvoker" uiAccess="false" /> </requestedPrivileges> </security> </trustInfo> </assembly>
But tcc has no mt patching tool as you know. To let tcc toolchain working without other Microsoft VC++ tools I wrote my on mt version and I asked the group the permission to push it but got no reply. The tool is here: https://sourceforge.net/p/wintcc/svn/HEAD/tree/ports/mt/mt.c Feel free to take it if you like. It may be part of tcc front end like "tcc -mt" similar to "tcc -ar" Christian -----Original Message----- From: grischka [mailto:gris...@gmx.de] Sent: Saturday, September 18, 2021 21:02 To: jull...@eligis.com; tinycc-devel@nongnu.org Subject: Re: [Tinycc-devel] Outdated .def files Christian Jullien wrote: > Hi Grischka, > > I fact I processed differently. I was very disappointed to see that my code > compiled by tcc reported "Windows 10" on "Windows 11" because kernel32.def > lacks the few API I recently added for this purpose. As far as I can see, "Windows 11" identifies itself as 10.0.21995(++), that is "Windows 10" with a build number >= 21995. And that information can be obtained simply with "GetVersion()" which exists forever in all windoses. While it seems that the API you just did add to the tinycc kernel32.def already has been depreciated again: "VerifyVersionInfoA function (winbase.h) ... Note: This function has been deprecated for Windows 10. See 'targeting your applications for Windows' for more information." And even the old GetVersionEx() was admittedly added only for the stupids: "The GetVersionEx function was developed because many existing applications err when examining the packed DWORD value returned by GetVersion, transposing the major and minor version numbers..." (of course it's not the applications but the people who wrote them). Seen that I'm inclined to think that much of the 3 times as big kernel32.def from newer windoses that you did mention doesn't really serve a purpose other than to support an increasing stupidity (or at least the assumption of it) ?!? Or otherwise that the purpose is to make people feel more stupid than they really are: "In time there will be a way to properly detect Windows 11, I'm sure Microsoft is still figuring out the most complicated way to make life more difficult for developers" and "Don't worry, they have a guy for that I'm sure." comments from https://www.techpowerup.com/forums/threads/gpu-z-2-40-2-vs-windows-11.283417 / Really I don't care which scenario they want to prepare for with their OS, but then again is is still up to us where we make TinyCC to go. In any case saying "OUtdated .def files" means to me that you didn't really understand anything of it. As a fact the files were "outdated" already in their very first incarnation when added in 2005 and haven't seen any significant changes since then. Therefor "outdated" isn't really a category for something that never was up-to-date nor ever even tried to be. Btw. the easiest way to have all the functions of the windows system dll's is just to delete the tinycc .def files on your computer. --- grischka _______________________________________________ Tinycc-devel mailing list Tinycc-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/tinycc-devel