在 2018-09-14 20:22, Jacek Caban 写道:
> On 09/14/2018 02:21 PM, Liu Hao wrote:
>> 在 2018/9/14 20:08, Jacek Caban 写道:
>>> *32 variants are handled by importlibs for crts that need it anyway and
>>> unsuffixed variants don't exist in ucrt runtime.
>>>
>> This could break code that makes use of MSVCRT, as it is only in MSVCRT
>> that `_fstat32` is absent. It exists in all MSVCR* DLLs since MSVCR80.
> 
> Our msvcrt importlib forwards _fstat32 to _fstat, so it should be fine.
> 
> Jacek
> 

Apparently it does not:

```
lh_mouse@lhmouse-ideapad ~/Desktop $ expand -t4 test.c
extern int printf(const char *, ...);
extern char _fstat32();

int main(void)
   {
     printf("%p\n", (void *)_fstat32);
   }
lh_mouse@lhmouse-ideapad ~/Desktop $ x86_64-w64-mingw32-gcc test.c -lmsvcr80
lh_mouse@lhmouse-ideapad ~/Desktop $ x86_64-w64-mingw32-gcc test.c -lmsvcrt
/tmp/cc9yIfl5.o:test.c:(.rdata$.refptr._fstat32[.refptr._fstat32]+0x0): 
undefined reference to `_fstat32'
collect2: error: ld returned 1 exit status
```


-- 
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