mirror of
https://https.git.savannah.gnu.org/git/gnulib.git
synced 2026-08-23 01:26:41 +00:00
b6ac7d133c
It is like backupfile, except it avoids some race conditions, and it does not output to stderr or exit. * MODULES.html.sh: Add backup-rename. * lib/backup-find.c, lib/backup-internal.h, lib/backup-rename.c: * modules/backup-rename: New files. * lib/backupfile.c: Turn this into an internals file, which contains code common to backupfile and backup_rename. Do not include argmatch.h or xalloc.h: include xalloc-oversized.h. Include renameat2.h and fcntl.h. (BACKUP_NOMEM): New constant. (numbered_backup): New args BASE_OFFSET and *DIRPP. Do not exit on memory exhaustion; just return BACKUP_NOMEM. Caller changed. (backupfile_internal): Rename from find_backup_file_name. Support new arg RENAME. (backup_args, backup_types, get_version, xget_version): Move to lib/backup-find.c. * lib/backupfile.h (backup_file_rename): New decl. * modules/backupfile (Files): Add lib/backup-internal.h, lib/backup-find.c. (Depends-on): Add dirfd, fcntl, renameat2. (lib_SOURCES): Add backup-find.c.
39 lines
427 B
Plaintext
39 lines
427 B
Plaintext
Description:
|
|
Rename a file to a backup name.
|
|
|
|
Files:
|
|
lib/backup-internal.h
|
|
lib/backup-rename.c
|
|
lib/backupfile.c
|
|
lib/backupfile.h
|
|
m4/backupfile.m4
|
|
|
|
Depends-on:
|
|
argmatch
|
|
closedir
|
|
d-ino
|
|
dirent-safer
|
|
dirfd
|
|
dirname-lgpl
|
|
fcntl
|
|
memcmp
|
|
opendir
|
|
renameat2
|
|
readdir
|
|
stdbool
|
|
|
|
configure.ac:
|
|
gl_BACKUPFILE
|
|
|
|
Makefile.am:
|
|
lib_SOURCES += backupfile.c backup-rename.c
|
|
|
|
Include:
|
|
"backupfile.h"
|
|
|
|
License:
|
|
GPL
|
|
|
|
Maintainer:
|
|
Paul Eggert, Jim Meyering
|