[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
new module 'clean-temp-simple'
From: |
Bruno Haible |
Subject: |
new module 'clean-temp-simple' |
Date: |
Tue, 23 Mar 2021 00:21:50 +0100 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-203-generic; KDE/5.18.0; x86_64; ; ) |
This series of patches splits the module 'clean-temp' into two modules:
- clean-temp-simple, under LGPLv2+,
- clean-temp, still under GPL.
I am the sole author of lib/clean-temp-simple.c, hence I can do this.
(The contributions to lib/clean-temp.c by Eric Blake and John Darrington
are still in lib/clean-temp.c, not moved to lib/clean-temp-simple.c.)
2021-03-22 Bruno Haible <bruno@clisp.org>
clean-temp-simple: Relicense under LGPLv2+.
* modules/clean-temp-simple (License): Change to LGPLv2+.
2021-03-22 Bruno Haible <bruno@clisp.org>
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.
2021-03-22 Bruno Haible <bruno@clisp.org>
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 <limits.h>, <stdint.h>. Include
<signal.h>, <stdio.h>, 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.
0001-clean-temp-simple-New-module.patch
Description: Text Data
0002-clean-temp-simple-Remove-dependency-upon-xalloc-xall.patch
Description: Text Data
0003-clean-temp-simple-Relicense-under-LGPLv2.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- new module 'clean-temp-simple',
Bruno Haible <=