在 2019/1/7 5:06, Mateusz 写道:
> W dniu 06.01.2019 o 16:17, Liu Hao pisze:
>> 在 2019/1/6 9:19, Mateusz 写道:
>>> W dniu 05.01.2019 o 20:59, Johannes Pfau pisze:
>>> Maybe it would make sense to add this in crt/io.h? There's already a 
>>> __USE_MINGW_ACCESS guarded __mingw_access wrapper function which could be 
>>> extended. And as far as I can see, GCC already sets the __USE_MINGW_ACCESS 
>>> define, so it likely wouldn't need any changes.
>>> I've attached patch to mingw-w64 that replaces _access in msvcr110/120 and 
>>> ucrtbase with Liu Hao version (for me it is too big for inline).
>>>
>>
>> This looks bad to be, as it breaks code which expects the MSVC behavior.
> 
> We could add __mingw_access to msvcr110/120 + ucrtbase libs and change a 
> little bit io.h for case if __USE_MINGW_ACCESS is defined (check for 
> __MSVCRT_VERSION__).
> 
> Or we could add __mingw_access to libmingwex and use exact the same version 
> for all msvcrt/msvcr*/ucrt if __USE_MINGW_ACCESS is defined.
> 
> Or we could add __mingw_access to libmingwex and use it only when 
> __MSVCRT_VERSION__ >= 0x1100 && defined(__USE_MINGW_ACCESS) and leave as is 
> now for __MSVCRT_VERSION__ < 0x1100.
> 

The second one sounds appropriate to me, as it is just we deal with
stdio functions.

> I've attached access from MSVC 2010 -- if we agree that mingw-w64 should be 
> patched in some way we could choose detail for _access/__mingw_access.
> 

PLEASE STOP COPYING CODE FROM MICROSOFT SDKS.

We are not willing to receive lawyer's letters. Publishing this code for
others to copy probably already violates its license.


-- 
Best regards,
LH_Mouse

_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to