From 83c222f7a65279e4e659a4caf8b85d34f91d5eeb Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Mon, 22 Mar 2021 22:48:23 +0100 Subject: clean-temp-simple: New module. * lib/clean-temp-simple.h: New file, based on lib/clean-temp.h. * lib/clean-temp-private.h: New file, based on lib/clean-temp.c. * lib/clean-temp-simple.c: New file, based on lib/clean-temp.c. * lib/clean-temp.h: Include clean-temp-simple.h. (register_temporary_file, unregister_temporary_file, cleanup_temporary_file): Remove declarations. * lib/clean-temp.c: Don't include , . Include , , clean-temp-simple.h, clean-temp-private.h. (file_cleanup_list_lock, file_cleanup_list): Moved to clean-temp-simple.c. (struct tempdir, dir_cleanup_list, struct closeable_fd, descriptors): Moved to clean-temp-private.h. (string_equals, SIZE_BITS, string_hash, fatal_signal_set, init_fatal_signal_set, asyncsafe_close): Moved to clean-temp-simple.c. (asyncsafe_fclose_variant): Use get_fatal_signal_set() here. (cleanup_action, do_init_clean_temp, clean_temp_once, init_clean_temp, register_temporary_file, unregister_temporary_file, do_unlink, cleanup_temporary_file): Moved to clean-temp-simple.c. (create_temp_dir, cleanup_temp_file, cleanup_temp_dir_contents, gen_register_open_temp, close_temp): Update for changed function names. (fclose_variant_temp): Don't call init_fatal_signal_set(). * modules/clean-temp-simple: New file, based on modules/clean-temp. * modules/clean-temp (Depends-on): Add clean-temp-simple, list. Remove stdint. (configure.ac): Don't define SIGNAL_SAFE_LIST here. --- modules/clean-temp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/clean-temp') diff --git a/modules/clean-temp b/modules/clean-temp index 2eca0060a7..a83f249903 100644 --- a/modules/clean-temp +++ b/modules/clean-temp @@ -8,13 +8,14 @@ lib/clean-temp.c Depends-on: c99 stdbool -stdint +clean-temp-simple +list +asyncsafe-spin unistd lock thread-optim error fatal-signal -asyncsafe-spin open pathmax tmpdir @@ -29,7 +30,6 @@ xlist gettext-h configure.ac: -AC_DEFINE([SIGNAL_SAFE_LIST], [1], [Define if lists must be signal-safe.]) Makefile.am: lib_SOURCES += clean-temp.h clean-temp.c -- cgit v1.2.1