diff options
author | Bruno Haible <bruno@clisp.org> | 2021-03-23 00:08:38 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2021-03-23 00:14:39 +0100 |
commit | 391c29f5bb99a4a77d19ece68e52623d4890676a (patch) | |
tree | c5ff6186b1bb38fe6c5c4216b7b33444a16833b7 /lib/clean-temp-private.h | |
parent | 83c222f7a65279e4e659a4caf8b85d34f91d5eeb (diff) | |
download | gnulib-391c29f5bb99a4a77d19ece68e52623d4890676a.tar.gz |
clean-temp-simple: Remove dependency upon xalloc, xalloc-die, xlist.
* lib/clean-temp-private.h (clean_temp_init): Change return type to
'int'.
* lib/clean-temp-simple.h (register_temporary_file): Change return type
to 'int'.
* lib/clean-temp-simple.c: Don't include xalloc.h, gl_xlist.h. Include
gl_list.h instead.
(init_failed): New variable.
(do_clean_temp_init): Set it.
(clean_temp_init): Return an error indicator.
(register_temporary_file): Invoke gl_list_nx_create_empty instead of
gl_list_create_empty. Invoke strdup instead of xstrdup. Invoke
gl_list_nx_add_first instead of gl_list_add_first. Return an error
indicator.
* lib/clean-temp.c (create_temp_dir, gen_register_open_temp): Call
xalloc_die() if clean_temp_init or register_temporary_file failed.
* modules/clean-temp-simple (Depends-on): Remove xalloc, xalloc-die,
xlist.
Diffstat (limited to 'lib/clean-temp-private.h')
-rw-r--r-- | lib/clean-temp-private.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/clean-temp-private.h b/lib/clean-temp-private.h index 655eb3fbbf..46dba23dd3 100644 --- a/lib/clean-temp-private.h +++ b/lib/clean-temp-private.h @@ -75,7 +75,7 @@ extern size_t clean_temp_string_hash (const void *x); extern _GL_ASYNC_SAFE int clean_temp_asyncsafe_close (struct closeable_fd *element); extern void clean_temp_init_asyncsafe_close (void); -extern void clean_temp_init (void); +extern int clean_temp_init (void); extern int clean_temp_unlink (const char *absolute_file_name, bool cleanup_verbose); |