On Sat, 23 Oct 2021, Martin Storsjö wrote: > On Thu, 8 Apr 2021, Martin Storsjö wrote: > > > I guess the least risky solution would be to enable the "__USE_MINGW_ACCESS" > > codepath unconditionally if using UCRT - what do you think? > > > > (One could also consider to change the implementation of __mingw_access to > > just strip out the X_OK bit and call the CRT's real _access function, > > instead of reimplementing it with a call to GetFileAttributesA.) > > This discussion never completed here... > > Do you agree that we should define __USE_MINGW_ACCESS implicitly when > targeting UCRT, as UCRT's access() errors out on X_OK? Msvcrt's access() used > to have the same behaviour at some point (in early Vista, judging from the bug > report above), but the behaviour there seems to have been reverted (in current > installs of Vista and newer major versions too) so that it ignores the bit we > set for X_OK in practice, as it did on XP. > > It hides a behaviour compared to the actual CRT (which can be detrimental for > code portability to MSVC), but as MSVC and upstream UCRT itself doesn't even > have X_OK, I think it should be fine. > > // Martin >
The issue with ncurses was 'fixed' by defining __USE_MINGW_ACCESS when building it, and to my knowledge we haven't hit it again since with any other package. It seems to be a fairly uncommon occurrence. So I don't have any preference here. _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public