Warnings in count-one-bits.h

2020-05-26 Thread Gisle Vanem
The lines in count-one-bits.h: # pragma intrinsic __cpuid # pragma intrinsic __popcnt # pragma intrinsic __popcnt64 triggers these warnings: count-one-bits.h(79): warning C4083: expected '('; found identifier '__cpuid' count-one-bits.h(80): warning C4083: expected '('; found identifier

Re: portability of fopen and 'e' (O_CLOEXEC) flag

2020-05-26 Thread Daiki Ueno
Hello Bruno, Bruno Haible writes: > Additionally, gnulib is the right place to do this because - as Eric said - > the 'e' flag is already scheduled for being added to the next POSIX version: > https://www.austingroupbugs.net/view.php?id=411 > > My evaluation of current platform support was

Re: portability of fopen and 'e' (O_CLOEXEC) flag

2020-05-26 Thread Bruno Haible
Hi Daiki, > Thank you for this; would it make sense to use it in the modules that do > one-shot fopen/fclose, such as read-file? This would improve things for multithreaded programs that call exec or posix_spawn. There are not that many programs of this kind. But on the other hand,

[PATCH] read-file: add variants that clear internal memory

2020-05-26 Thread Daiki Ueno
Hello, The functions provided by the read-file module are handy, but they are suboptimal for reading sensitive materials, because they do not clear the allocated memory blocks upon failure. The attached patch adds a set of variants that deal with that. It's tempting to make this behavior

Re: [PATCH] read-file: add variants that clear internal memory

2020-05-26 Thread Bruno Haible
Hi Daiki, > The functions provided by the read-file module are handy, but they are > suboptimal for reading sensitive materials, because they do not clear > the allocated memory blocks upon failure. > ... > It's tempting to make this behavior enabled by default, but I worry that > it may cause

Re: [PATCH] read-file: add variants that clear internal memory

2020-05-26 Thread Bruno Haible
Hi Daiki, > > If you agree, I'd like to see two commits: > > 1. the introduction of the flags and RF_BINARY, > > 2. the RF_SENSITIVE flag. > > > > Do you want me to code the first commit, or do you want to do it? > > Sure, that would make things much simpler. I'm attaching a patch along >

Re: Warnings in count-one-bits.h

2020-05-26 Thread Bruno Haible
Gisle Vanem wrote: > The lines in count-one-bits.h: > # pragma intrinsic __cpuid > # pragma intrinsic __popcnt > # pragma intrinsic __popcnt64 > > triggers these warnings: >count-one-bits.h(79): warning C4083: expected '('; found identifier > '__cpuid' >count-one-bits.h(80): warning

doc/gnulib-intro.texi: A "to" is missing in a sentence.

2020-05-26 Thread Bjarni Ingi Gislason
The text is: All patches should be posted the list, ... It is also in the files "doc/gnulib.html" and "doc/gnulib.info". -- Bjarni I. Gislason

Re: [PATCH v2] win32: don't force _WIN32_WINNT to a lower version

2020-05-26 Thread Bruno Haible
Hi Steve, > > /* Ensure that declares GetFileSizeEx. */ > +#if !defined(_WIN32_WINNT) || _WIN32_WINNT < 0x0500 > # undef _WIN32_WINNT > # define _WIN32_WINNT _WIN32_WINNT_WIN2K > +#endif > What do you gain by this? What does it bring to compile this code with a higher _WIN32_WINNT

Re: Compile error in argz.c

2020-05-26 Thread Bruno Haible
Gisle Vanem wrote: > The use of '__argv' as parameter names, causes this > error from clang-cl: >argz.c(234,1): error: conflicting types for 'argz_extract' >argz_extract (const char *argz, size_t len, char **argv) >^ >.\argz.h(68,13): note: previous declaration is here >extern

Re: doc/gnulib-intro.texi: A "to" is missing in a sentence.

2020-05-26 Thread Bernhard Voelker
On 2020-05-26 22:53, Bjarni Ingi Gislason wrote: > The text is: > > All patches should be posted the list, ... Thanks for the report ... I installed the attached patch. > It is also in the files "doc/gnulib.html" and "doc/gnulib.info". Those are generated from the *.texi file. Have a nice

Re: [PATCH] read-file: add variants that clear internal memory

2020-05-26 Thread Daiki Ueno
Bruno Haible writes: > If you agree, I'd like to see two commits: > 1. the introduction of the flags and RF_BINARY, > 2. the RF_SENSITIVE flag. > > Do you want me to code the first commit, or do you want to do it? Sure, that would make things much simpler. I'm attaching a patch along these

Re: portability of fopen and 'e' (O_CLOEXEC) flag

2020-05-26 Thread Bruno Haible
Hi Daiki, > > Thank you for this; would it make sense to use it in the modules that do > > one-shot fopen/fclose, such as read-file? Here are proposed patches for other modules. Does this look right? Note: The patch to sethostname.c is only relevant for Minix. Minix does not have multithreading

[PATCH v2] win32: don't force _WIN32_WINNT to a lower version

2020-05-26 Thread Steve Lhomme
--- lib/ftruncate.c | 2 ++ lib/sethostname.c | 6 -- lib/stat-w32.c| 6 -- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/lib/ftruncate.c b/lib/ftruncate.c index a1856374e..990b71dbb 100644 --- a/lib/ftruncate.c +++ b/lib/ftruncate.c @@ -30,8 +30,10 @@

Compile error in argz.c

2020-05-26 Thread Gisle Vanem
The use of '__argv' as parameter names, causes this error from clang-cl: argz.c(234,1): error: conflicting types for 'argz_extract' argz_extract (const char *argz, size_t len, char **argv) ^ .\argz.h(68,13): note: previous declaration is here extern void argz_extract (const char