summaryrefslogtreecommitdiff
path: root/ChangeLog
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2020-05-31 20:15:25 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2020-05-31 22:16:58 -0700
commit78f55d5374d6ff9b8460c48a42e924bf69775cd7 (patch)
tree2a649608f2898ee98a8552e5d696ca8dcdf7148a /ChangeLog
parentd4429157c13b49d1749f5ea18fb30e24ffa646aa (diff)
downloadgnulib-78f55d5374d6ff9b8460c48a42e924bf69775cd7.tar.gz
tempname: merge from glibc and coreutils
Also, merge in Gnulib’s more-recent methods of making it easier to share between Gnulib and glibc, and fix a few randomness glitches. * lib/tempname.c: Include libc-config.h, not config.h, if !_LIBC. (__set_errno): Remove; libc-config.h does that for us. Do not include <sys/time.h>. (__secure_getenv) [_LIBC]: New macro. (__try_tempname, __getpid, __gettimeofday) [!_LIBC]: Remove macros. (RANDOM_BITS): Rewrite. (RANDOM_VALUE_MAX, BASE_62_DIGITS, BASE_62_POWER): New macros. (random_value): New typedef. (try_file, try_dir, try_nocreate): Move up. (gen_tempname_len, try_tempname_len): New functions. (gen_tempname_len): Use a constant array rather than a switch. (try_tempname_len): Don’t assume string length fits in int. Generalize use of RANDOM_BITS. If _LIBC, don’t assume RANDOM_BITS has enough entropy (it’s a bit short). (__gen_tempname): Rewrite in terms of gen_tempname_len. (__try_tempname): Rewrite in terms of try_tempname_len. * lib/tempname.h (gen_tempname_len, try_tempname_len): New decls. * modules/tempname (Depends-on): Remove gettimeofday, sys_time. Add getentropy, libc-config.
Diffstat (limited to 'ChangeLog')
-rw-r--r--ChangeLog26
1 files changed, 26 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index e6ba65b088..b7b39272f9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,29 @@
+2020-05-31 Paul Eggert <eggert@cs.ucla.edu>
+
+ tempname: merge from glibc and coreutils
+ Also, merge in Gnulib’s more-recent methods of making it easier
+ to share between Gnulib and glibc, and fix a few randomness
+ glitches.
+ * lib/tempname.c: Include libc-config.h, not config.h, if !_LIBC.
+ (__set_errno): Remove; libc-config.h does that for us.
+ Do not include <sys/time.h>.
+ (__secure_getenv) [_LIBC]: New macro.
+ (__try_tempname, __getpid, __gettimeofday) [!_LIBC]: Remove macros.
+ (RANDOM_BITS): Rewrite.
+ (RANDOM_VALUE_MAX, BASE_62_DIGITS, BASE_62_POWER): New macros.
+ (random_value): New typedef.
+ (try_file, try_dir, try_nocreate): Move up.
+ (gen_tempname_len, try_tempname_len): New functions.
+ (gen_tempname_len): Use a constant array rather than a switch.
+ (try_tempname_len): Don’t assume string length fits in int.
+ Generalize use of RANDOM_BITS. If _LIBC, don’t assume RANDOM_BITS
+ has enough entropy (it’s a bit short).
+ (__gen_tempname): Rewrite in terms of gen_tempname_len.
+ (__try_tempname): Rewrite in terms of try_tempname_len.
+ * lib/tempname.h (gen_tempname_len, try_tempname_len): New decls.
+ * modules/tempname (Depends-on): Remove gettimeofday, sys_time.
+ Add getentropy, libc-config.
+
2020-05-31 Bruno Haible <bruno@clisp.org>
getrandom, getentropy: Mention the crypto/gc-random module.