| Deutsch English Français Italiano |
|
<20240702175559.00002a23@yahoo.com> View for Bookmarking (what is this?) Look up another Usenet article |
Path: ...!news.nobody.at!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Michael S <already5chosen@yahoo.com>
Newsgroups: comp.lang.c
Subject: Re: tcc - first impression. Was: Baby X is bor nagain
Date: Tue, 2 Jul 2024 17:55:59 +0300
Organization: A noiseless patient Spider
Lines: 66
Message-ID: <20240702175559.00002a23@yahoo.com>
References: <v494f9$von8$1@dont-email.me>
<v53lf7$34huc$1@dont-email.me>
<v53vh6$368vf$1@dont-email.me>
<v54se1$3bqsk$1@dont-email.me>
<20240624160941.0000646a@yahoo.com>
<v5bu5r$va3a$1@dont-email.me>
<20240624181006.00003b94@yahoo.com>
<v5c86d$11ac7$1@dont-email.me>
<JEheO.108086$ED9b.74955@fx11.iad>
<v5cblg$11q0j$1@dont-email.me>
<gEieO.108089$ED9b.25598@fx11.iad>
<20240625113616.000075e0@yahoo.com>
<mUzeO.141609$Cqra.55051@fx10.iad>
<v5elql$1jmii$1@dont-email.me>
<m3BeO.24907$Gurd.16179@fx34.iad>
<v5empd$1jndv$2@dont-email.me>
<v5eph4$1k6a9$1@dont-email.me>
<87ed8jnbmf.fsf@bsb.me.uk>
<v5jhls$2m7np$1@dont-email.me>
<867ceadtih.fsf@linuxsc.com>
<20240701200924.00003d9a@yahoo.com>
<87zfr0wzpt.fsf@nosuchdomain.example.com>
<20240702115448.00002025@yahoo.com>
<v60nuc$1k2n3$1@dont-email.me>
<20240702162704.00002669@yahoo.com>
<v61271$1lrja$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 02 Jul 2024 16:55:37 +0200 (CEST)
Injection-Info: dont-email.me; posting-host="5fbca3f539c7d7fdf38abe2835a4f1fd";
logging-data="1652684"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19zwBRowpYQXrR8JdH3CwRD34g/c3frYnw="
Cancel-Lock: sha1:XFmogdXT+3SnLwB2gvNza/sy7mM=
X-Newsreader: Claws Mail 3.19.1 (GTK+ 2.24.33; x86_64-w64-mingw32)
Bytes: 3984
On Tue, 2 Jul 2024 15:18:10 +0100
bart <bc@freeuk.com> wrote:
> On 02/07/2024 14:27, Michael S wrote:
> > On Tue, 2 Jul 2024 12:22:53 +0100
> > bart <bc@freeuk.com> wrote:
> >>
> >> Both make use of msvcrt.dll. I don't consider it a dependency since
> >> it has always been part of Windows. (I first starting using it in
> >> 1990s, from my other language, before I knew much about C, as it
> >> had a simpler file API than Windows.)
> >>
> >> Lots of other applications use it too. Including older gcc binaries
> >> and applications compiled with those.
> >>
> >> On Windows 11, probably 10 too, msvcrt.dll's printf routines
> >> support %zu, and so does Tcc.
> >>
> >
> > Not really.
> > DLL that supports newer feature has different name -
> > VCRUNTIME140.dll And choice of DLL version is not directly related
> > to the version of Windows.
> Well, both tcc and mcc (my product) import msvcrt, not that runtime
> file, and printf/zu works.
>
> You can test it directly using the program below if you like.
>
> If you think that the OS craftily substitutues vcruntime140.dll in
> place of msvcrt.dll, then copy "c:\windows\system32\msvcrt.dll" to
> "fred.dll", to a folder where it can be found. Then change "msvcrt"
> beflow to "fred".
>
> If %zu it doesn't work, then maybe your copy is old.
>
> ---------------------------
> #include <windows.h>
> #include <stdlib.h>
>
> int main(void) {
> int (*PRINTF)(const char*, ...);
> HINSTANCE libinst;
>
> libinst=LoadLibrary("msvcrt");
> if (libinst==NULL) exit(1);
>
> PRINTF=GetProcAddress(libinst, "printf");
> if (PRINTF==NULL) exit(1);
>
> PRINTF("sizeof void* = %zu\n", sizeof(void*));
> }
> ---------------------------
>
I am not logged into Win10/11 right now, so tried on Ws2016 witch is
mostly the same as early Win10. It didn't work.
Then I went and tested on Ws2019 which is similar to midlife Windows 10.
It works.
I didn't [yet] try to mess with DLLs in system folder but I looked at
versions.
on Ws2016 - 7.0.14393.2457
on Ws2019 - 7.0.17763.475