Re: bug#42095: 28.0.50; Build fails on Windows/MinGW64

2020-06-28 Thread Bruno Haible
Paul Eggert wrote: > As I understand it the basic issue here is that we want O_CLOEXEC support even > on platforms that lack it, and we don't want all the calling software to play > games with "#ifdef O_CLOEXEC" and the like. Yes. The O_CLOEXEC for the platforms that lack it is mostly in lib/fcntl

Re: bug#42095: 28.0.50; Build fails on Windows/MinGW64

2020-06-28 Thread Paul Eggert
[ccing bug-gnulib; this is about .] > The latest changes made this code run even in the MinGW build, not > sure why (perhaps because 'getrandom' uses 'open'?). That's part of it. It's also needed for recent changes to the getloadavg module. And I see that the at-intern

doc: add a note about sigprocmask vs. pthread_sigmask

2020-06-28 Thread Bruno Haible
Let me add a note, that explains why in Gnulib we continue to use sigprocmask() in many places. 2020-06-28 Bruno Haible doc: Add a note about sigprocmask vs. pthread_sigmask. * doc/posix-functions/sigprocmask.texi: Add note. diff --git a/doc/posix-functions/sigprocmask.texi

Re: Problems compiling 'getrandom' with MinGW

2020-06-28 Thread Bruno Haible
Hi Eli, > > > 2. It causes the calling program to be linked against bcrypt.dll if > > > that library is available at build time. > > > > No, it links the program against bcrypt.dll if you are compiling with > > a _WIN32_WINNT value >= _WIN32_WINNT_WIN7 - consistently with > >

Re: Problems compiling 'getrandom' with MinGW

2020-06-28 Thread Eli Zaretskii
> From: Bruno Haible > Cc: Eli Zaretskii > Date: Sun, 28 Jun 2020 19:19:10 +0200 > > > 1. It assumes that the header bcrypt.h is always available. This is > > true for MinGW64, but not for mingw.org's MinGW. A proposed patch to > > allow the code be compiled without bcrypt.h is below > > Than

Re: Problems compiling 'getrandom' with MinGW

2020-06-28 Thread Bruno Haible
Hi Eli, > 1. It assumes that the header bcrypt.h is always available. This is > true for MinGW64, but not for mingw.org's MinGW. A proposed patch to > allow the code be compiled without bcrypt.h is below Thanks for the report and draft patch. I'm applying the patch below. My patch tests for th

Problems compiling 'getrandom' with MinGW

2020-06-28 Thread Eli Zaretskii
The current version of Gnulib's 'getrandom' has a couple of problems when compiled with MinGW: 1. It assumes that the header bcrypt.h is always available. This is true for MinGW64, but not for mingw.org's MinGW. A proposed patch to allow the code be compiled without bcrypt.h is below, it is requ

clean-temp: fix wrong errno in error message

2020-06-28 Thread Bruno Haible
A simple fix. 2020-06-28 Bruno Haible clean-temp: Fix wrong errno in error message. * lib/clean-temp.c (create_temp_dir): Save errno around unblock_fatal_signals call. diff --git a/lib/clean-temp.c b/lib/clean-temp.c index b9badac..e56428c 100644 --- a/lib/clean-temp.