On Friday 07 March 2025 20:31:09 Lasse Collin wrote: > On 2025-03-07 Pali Rohár wrote: > > On Thursday 06 March 2025 21:40:55 Lasse Collin wrote: > > > On 2025-03-05 Pali Rohár wrote: > > > > Do you want to look at my changes or test them? > > > > > > Yes, I'm interested. It might take a few days depending on how I > > > have time. > > > > Ok. I'm sending 10 patches in the attachment. > > Thanks! Makefile.am changes didn't apply to master, but the rest did > cleanly. I think I can test the .c/.h file changes easily still.
Maybe you need 3 other changes which I have sent to list? Anyway, I these changes on top of 99518b7fd9d0 ("Add missing comparison operators for Microsoft::WRL::ComPtr") with those other 3 small changes. > The commit 45bf2cca702b from 2009 added memset calls to zero the stat > buffer on failure. That seems unncessary, but the commit message says > it fixed something with binutils/bfd. I see you removed the memset, so > I hope it isn't needed anymore. I have tested various CRT DLL import libraries and various _stat* functions from them, and all of them do not touch stat buffer on error. Hence I removed those memset calls, to have mingw-w64 emulation functions to behave in the same way as the native crtdll/msvcrt/ucrt underscore _stat* functions. For me it looks strange if the _fstat64i32() emulation for libmsvcrt.a zero fill the stat buffer and the native _fstat64i32() from libmsvcr80.a or libucrt.a, or native _fstat() from libmsvcrt.a does not do it. Now I'm looking at 45bf2cca702b and I do not think it fixed something for UCRT or msvcr80+, as those changes are only for pre-msvcr80 for which is needed mingw-w64 emulation (which the commit changed). What could it fix is probably non-underscored stat function? But that it also suspicious. Because now I have tested that Linux stat() function from glibc does not touch struct stat buffer too. So for me it looks like that the change in 45bf2cca702b is very suspicious as it change behavior in a way which is different from _both_ Linux glibc and also MS crtdll/msvcrt/ucrt. > I will look at the commits more closely in a few days. > > > I let the whole slash function as is. Just I moved it into separate > > file as it was duplicated on more places Feel free to fix / improve > > it. > > I guess it's fine if I deduplicate the remaining two version using > <tchar.h>. It doesn't seem to need more than _TCHAR, _T, and _tcslen. > > -- > Lasse Collin _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public