在 2019/12/14 4:17, Martin Storsjö 写道:
> For some reason, gnulib tries to provide its own function mbsinit (which
> is used for checking if an mbstate_t is initialized or not), even if one
> is provided. (I guess the reason for this misdetection, is that in UCRT
> mode, mbsinit is purely available as an inline function, there's no
> function available in the UCRT dll, and the gnulib check might only test
> linking without using the right header.)
> 
> Perhaps we should provide a custom mbsinit function in the UCRT import
> libraries - that should hopefully make gnulib realize the function
> exists, and avoid trying to provide it.
> 

Referring to the file 'mbsinit.m4' in GnuLib I get this:

```m4
    if test $REPLACE_MBSTATE_T = 1; then
      REPLACE_MBSINIT=1
    else
      dnl On mingw, mbsinit() always returns 1, which is inappropriate for
      dnl states produced by mbrtowc() for an incomplete multibyte character
      dnl in multibyte locales.
      case "$host_os" in
        mingw*) REPLACE_MBSINIT=1 ;;
      esac
    fi
```

Thus I presume that providing an out-of-line `mbsinit()` will not fix
the issue, as it is replaced unconditionally if the triplet matches
`*-*-mingw*`.


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