emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compiling in mingw-ucrt runtime


From: Eli Zaretskii
Subject: Re: Compiling in mingw-ucrt runtime
Date: Sun, 25 Feb 2024 12:48:52 +0200

> From: Arthur Miller <arthur.miller@live.com>
> Cc: emacs-devel@gnu.org
> Date: Sun, 25 Feb 2024 11:19:58 +0100
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> >   const bool some_pending = (__fpending (stream) != 0);
> >> >   const bool prev_fail = (ferror (stream) != 0);
> >> >   const bool fclose_fail = (fclose (stream) != 0);
> >> 
> >> prev_fail sometimes fail with Operation not permitted.
> >> fclose fails always with -1
> >
> > What is the value of errno before and after fclose, in particular when
> > ferror does NOT fail (i.e. prev_fail is false)?
> 
> fclose *always* fail with -1. All calls to fclose are -1. I don't see any call
> to fclose that does not return -1. Both when prev_fails is EPERM and when
> prev_fail does not fail.

OK, but I asked also about the value of errno _after_ fclose is called
and fails.  It's important for understanding why it fails.

> I understand; thanks. I guess I should learn nm tool.
> 
> Which one shold be correct than: should sydep.c use stuff from ucrt dll; or
> should it use the built-in stuff?

Sorry, I don't understand: what about sysdep.c?  If you are talking
about close_output_streams, then we are not done yet investigating why
close_stream fails in the UCRT build.  When we understand what happens
there, we can revisit the close_output_streams issue and decide how to
handle it.

> By the way, a slight regression: since cmdproxy includes its own
> windows.h; it does not hurt to add _win32_lean_and_mean above too?

Maybe, but why bother?

> > You can use -jN, and that speeds up the compilation quite a lot.  On
> > my system I use -j16, and I can bootstrap Emacs in under 4 min.
> 
> Ha! :-)
> 
> $ time make bootstrap -j12
> 
> real    12m40.651s
> user    2m46.900s
> sys     1m19.613s

Well, you have 1/3rd of execution units I have, so 12 min is
reasonable, especially if this is with native-compilation.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]