[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[BUG] No greeting is printed when compiled with mingw-w64
From: |
Matthew Palermo |
Subject: |
[BUG] No greeting is printed when compiled with mingw-w64 |
Date: |
Tue, 25 Dec 2018 11:46:33 +1000 |
Hi all,
I think there is a problem with GNU hello 2.10 when compiled with
mingw-w64 on Windows. GNU hello will not output any greeting, only a
newline.
Specifically, I think the problem is one with the mingw-w64-crt
implementation of mbsrtowcs. GNU hello assumes, I think correctly,
that the first invocation of mbsrtowcs doesn't change the greeting_msg
pointer position. But as seen in the source code of mingw-w64-crt
(https://github.com/Alexpux/mingw-w64/blob/master/mingw-w64-crt/misc/mbrtowc.c),
this isn't implemented and the pointer is moved to the end of the
string as normal. The result is an empty greeting_msg string passed to
the second mbsrtowcs invocation.
Clearly the proper solution (If I'm right about this) is to fix the
problem in mingw-w64-crt. I just wanted to submit this as a learning
process, hopefully get some feedback and just chat. I'm not very
practiced in C development, only just enough to do minor debugging and
hacking.
Regards,
Matthew
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [BUG] No greeting is printed when compiled with mingw-w64,
Matthew Palermo <=