On Thursday 30 April 2020 16:33:01 Liu Hao wrote: > 在 2020/4/30 13:17, Martin Storsjö 写道: > > > > This patch broke compiling mingw-w64-crt (with clang, but I'm fairly > > sure the same happens with gcc as well: > > > > ../misc/wcstof.c:20:7: error: redefinition of 'wcstof' float wcstof > > (const wchar_t * __restrict__ wcs, wchar_t ** __restrict__ wcse) > > ^ /opt/llvm-mingw/i686-w64-mingw32/include/stdlib.h:569:17: note: > > previous definition is here > > float __cdecl wcstof(const wchar_t * __restrict__ _Str,wchar_t ** > > __restrict__ _EndPtr){ > > ^ > > 1 error generated.
I think there is another problem: Function wcstof() which is in mingw-w64-headers/crt/stdlib.h should be marked as "inline". Otherwise there could be link problems... And after that above redefinition error should not be triggered as C99 allows you to have one inline and one non-inline definition of the same function. And I think after adding "inline" for function definition in header file, patch which Liu Hao posted should not be needed. -- Pali Rohár pali.ro...@gmail.com _______________________________________________ Mingw-w64-public mailing list Mingw-w64-public@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mingw-w64-public