在 2019/12/8 18:53, Amit Choudhary 写道:
> On Sunday, December 8, 2019, Zach Bacon <[email protected]> wrote:
> 
>> So... Msys2 CRT is a wrapper around POSIX API. Bash uses said POSIX API,
>> mingw-w64 is more geared towards windows API, so to compile it with
>> mingw-w64, you'd have to do some heavy patching to bash to support the
>> windows API.
>>
> 
> Please bear with me. According to my understanding both msys2 and mingw-w64
> ultimately uses windows api which means that msys2 implements posix over
> windows api.
> 
> Is my understanding wrong or correct.
> 
> 

Yes you are right. mingw-w64 provides headers and libraries for
non-Microsoft compilers and linkers (so you may use GCC or Clang to
compile and use LD or LLD to link your program and it will work with
Windows DLLs). The majority of POSIX APIs such `fcntl()`, `fork()`, more
complete set of signals, terminals, etc. don't exist natively and hence
must be emulated. MSYS2 uses SysV ABI where `long` has 64 bits in the
case of x86_64 which is different from Win64 ABI.


-- 
Best regards,
LH_Mouse

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to