在 2020/2/23 6:06, Martin Storsjö 写道:
> While they are "wrong" in that sense, this now means that there is no
> symbol "snprintf" defined at all, which does break compilation of a
> number of projects. (That primarily happens within configure scripts of
> certain projects, that try to detect if "snprintf" exists, without
> including stdio.h.) In all sane cases, the calling code that includes
> stdio.h will end up calling __ms_snprintf anyway, where you get your fix.
> 

This is correct. It seems that now GCC `configure` fails to detect
`vsnprintf()` and attempts to enable its own one in libiberty, which
conflicts with the inline definition in our header:

```
../../gcc-git/libiberty/vsnprintf.c:60:1: error: redefinition of 'vsnprintf'
   60 | vsnprintf (char *s, size_t n, const char *format, va_list ap)
      | ^~~~~~~~~
In file included from ../../gcc-git/libiberty/../include/libiberty.h:49,
                 from ../../gcc-git/libiberty/vsnprintf.c:56:
C:/MinGW/MSYS2/mingw64/x86_64-w64-mingw32/include/stdio.h:444:5: note:
previous definition of 'vsnprintf' was here
  444 | int vsnprintf (char *__stream, size_t __n, const char *__format,
__builtin_va_list __local_argv)
      |     ^~~~~~~~~
```

There had better be non-inline definitions in libmingwex I think.

-- 
Best regards,
LH_Mouse

Attachment: signature.asc
Description: OpenPGP digital signature

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

Reply via email to