[Mingw-users] btowc problem

Back to archive index
Eli Zaretskii eliz****@gnu*****
Tue Jun 30 03:01:22 JST 2020


I have a weird problem with MinGW runtime 5.3.1: GDB I've built
doesn't run on Windows XP, popping up an error message about btowc.
Disassembling a GDB function that calls btowc, I see that it actually
calls __msvcrt_btowc.  However, wchar.h seems to say that this is what
should indeed happen:

  /* No explicit ISO-C99 compatibility has been requested; map calls
   * to these functions to delegate to any MSVCRT.DLL implementations
   * which may be available, or to fall back to the MinGW replacement
   * implementations, when necessary.
   */
  # define __mingw_redirect(NAME)  __msvcrt_##NAME

>From this I understand that __msvcrt_btowc is supposed to call the MS
implementation in MSVCRT.DLL when that is available, and otherwise
fall back on libmingwex.  Why does this not happen?  Moreover, even if
I replace the call to btowc by an explicit call to __mingw_btowc, GDB
still refuses to run with the same error message.  What am I missing?

TIA



More information about the MinGW-Users mailing list
Back to archive index