On Saturday 13 December 2025 00:19:05 Martin Storsjö wrote:
> On Thu, 4 Dec 2025, Pali Rohár wrote:
>
> > Functions _(w)findfirst64 and _(w)findnext64 are available since
> > msvcr70.dll. For older msvcrt versions provide mingw-w64 emulation via
> > WinAPI FindFirstFileA()/FindFirstFileW() and
> > WinAPI FindNextFileA()/FindNextFileW() functions.
> > ---
>
> This commit message doesn't say anything about msvcrt.dll - where it
> seemingly does exist since some version, and for non-i386 versions we
> assume it always exists.
Yes, it does not exist in older i386 version, and always exists in
non-i386 versions.
> > diff --git a/mingw-w64-crt/stdio/_findX.h b/mingw-w64-crt/stdio/_findX.h
> > new file mode 100644
> > index 000000000000..4705240d934c
> > --- /dev/null
> > +++ b/mingw-w64-crt/stdio/_findX.h
> > @@ -0,0 +1,33 @@
> > +/**
> > + * This file has no copyright assigned and is placed in the Public Domain.
> > + * This file is part of the mingw-w64 runtime package.
> > + * No warranty is given; refer to the file DISCLAIMER.PD within this
> > package.
> > + */
> > +
> > +#include "filetime_to_time64.h"
> > +
> > +#define win32_fi_to_crt_find_data(success, fi, find_data) do { \
>
> What does the "fi" abbreviation stand for here?
Now I'm thinking... I blindly copied it from "WIN32_FIND_DATAA fi"
variable used in these new find*.c files. And seems that those I copied
from _stat64.c file (where is also FindFirstFileA) which was copied in
same commit from _fstat64.c file and which is declaring the same variable
as "BY_HANDLE_FILE_INFORMATION fi". So it means File Information, hence
nothing with FindFirstFileA.
Ah that is typo which I did months ago :-( variable name is same, but
structure was changed. Files _stat64.c and _fstat64.c have same
patterns, same variable names, just different "main" calls. And nobody
spotted it yet.
So maybe we can call this function win32_find_data_to_crt_find_data?
Or do you have any other preference? "fi" is really a mistake.
Abbreviation "fd" (from Find Data) sounds like file descriptor so I
would avoid using this abbrev.
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public