Re: [Mingw-w64-public] [PATCH] _mingw_stat64.h: Define _fstat, _stat and _wstat to *32 variants when appropriate.
On 09/14/2018 03:45 PM, Liu Hao wrote: > 在 2018/9/14 21:30, Jacek Caban 写道: >> My patch is 32-bit only and so is importlib alias. >> >> Jacek >> > Oh I didn't notice this difference. And thanks for the reminder. > > The patch looks good. Please apply. Pushed, thanks for review. Jacek ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] _mingw_stat64.h: Define _fstat, _stat and _wstat to *32 variants when appropriate.
在 2018/9/14 21:30, Jacek Caban 写道: > My patch is 32-bit only and so is importlib alias. > > Jacek > Oh I didn't notice this difference. And thanks for the reminder. The patch looks good. Please apply. -- Best regards, LH_Mouse ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] _mingw_stat64.h: Define _fstat, _stat and _wstat to *32 variants when appropriate.
On 09/14/2018 03:25 PM, Liu Hao wrote: > 在 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 > ``` My patch is 32-bit only and so is importlib alias. Jacek ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public
Re: [Mingw-w64-public] [PATCH] _mingw_stat64.h: Define _fstat, _stat and _wstat to *32 variants when appropriate.
在 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
Re: [Mingw-w64-public] [PATCH] _mingw_stat64.h: Define _fstat, _stat and _wstat to *32 variants when appropriate.
在 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. > Signed-off-by: Jacek Caban > --- > mingw-w64-headers/crt/_mingw_stat64.h | 5 + > 1 file changed, 1 insertion(+), 4 deletions(-) > > > -- Best regards, LH_Mouse ___ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public