[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Tinycc-devel] Outdated .def files

From: Christian Jullien
Subject: Re: [Tinycc-devel] Outdated .def files
Date: Sun, 19 Sep 2021 06:29:25 +0200

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>
     type="win32" />
 <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
   <!-- 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}" />
 <!-- Identify the application security requirements. -->
 <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
    <requestedExecutionLevel level="asInvoker" uiAccess="false" />

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
The tool is here:
Feel free to take it if you like. It may be part of tcc front end like "tcc
-mt" similar to "tcc -ar"


-----Original Message-----
From: grischka [mailto:grishka@gmx.de] 
Sent: Saturday, September 18, 2021 21:02
To: jullien@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
> 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
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"
    "Don't worry, they have a guy for that I'm sure."

comments from

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

reply via email to

[Prev in Thread] Current Thread [Next in Thread]