Paul Eggert wrote: > I installed the attached patch into Gnulib and propagated this into m4 > on Savannah so it should appear in the next m4 release.
The patch is fine. In the case of the GNU m4 binary, however, it has no effect, since the module 'fclose' is used for m4 already since 2011-02-05. Even with libm4_a-fclose.obj compiled in, "./m4.exe --version" (compiled with '-MDd') still presents an dialog "Debug Assertion Failed! File: minkernel\crts\ucrt\src\appcrt\lowio\close.cpp Line: 49 Expression: (_osfile(fh) & FOPEN)" three times. > In the meantime you can build with /MD instead of /MDd. Yes, exactly, that's the solution. There's no point for us in trying to handle debug assertions in the Microsoft debug libraries, when we already handle them in the source code and the only reason you see dialogs is that in 'Debug' mode these dialogs appear *even though* we have installed handlers. Other such dialogs that I see (during configure, in 'Debug' mode only) are: Expression: ("'n' format specifier disabled", 0) Expression: ("Invalid file open mode", 0) Bruno 2022-01-29 Bruno Haible <br...@clisp.org> doc: Clarify MSVC support. * doc/gnulib-intro.texi (Supported Platforms): Document that "debug" builds are unsupported. diff --git a/doc/gnulib-intro.texi b/doc/gnulib-intro.texi index 049c8ab3d7..a80c0995f5 100644 --- a/doc/gnulib-intro.texi +++ b/doc/gnulib-intro.texi @@ -158,7 +158,8 @@ GNU Hurd 0.7 is rarely tested. @item Native Windows, with MSVC as compiler, is rarely tested and low priority. The versions of MSVC that are supported are MSVC 14 (Visual Studio 2015) or -newer. +newer. Furthermore only ``release'' builds (compiler option @samp{-MD}) are +supported, not ``debug'' builds (compiler option @samp{-MDd}). @item @c There is musl-gcc on Ubuntu, and Alpine Linux 3.3.3. musl libc is rarely tested.