When parsing numbers prefer using strtosysint (renamed stoint) to using strtoul and its variants. This is simpler and faster and likely more reliable than relying on quirks of the system strtoul etc, and it standardizes how tar deals with parsing integers. Among other things, the C standard and POSIX don’t specify what strtol does to errno when conversions cannot be performed, and it requires strtoul to support "-" before unsigned numbers. * gnulib.modules (strtoimax, strtol, strtoumax, xstrtoimax): Remove. * src/checkpoint.c (checkpoint_compile_action, getwidth) (format_checkpoint_string): * src/incremen.c (read_incr_db_01, read_num) * src/map.c (parse_id): * src/misc.c (decode_timespec): * src/sparse.c (decode_num): * src/tar.c (parse_owner_group, parse_opt): * src/transform.c (parse_transform_expr): * src/xheader.c (decode_record, decode_signed_num) (sparse_map_decoder): Prefer stoint to strtol etc. Don’t rely on errno == EINVAL as the standards don’t guarantee it. * src/checkpoint.c (getwidth, format_checkpoint_string): Check for invalid string suffix. * src/checkpoint.c (getwidth): Return intmax_t, not long. All callers changed. * src/incremen.c (read_directory_file): It’s just a one-digit number, so just subtract '0'. * src/map.c (parse_id): Return bool not int. All callers changed. * src/misc.c (stoint): Rename from strtosysint, and add a bool * argument for reporting overflow. All callers changed. (decode_timespec): Simplify by using ckd_sub rather than checking for overflow by hand. * src/tar.c (incremental_level): Now signed char to emphasize that it can be only -1, 0, 1. All uses changed. * src/xheader.c (decode_record): Avoid giant diagnostics.
125 lines
1.8 KiB
Plaintext
125 lines
1.8 KiB
Plaintext
# List of gnulib modules needed for GNU tar.
|
|
# A module name per line. Empty lines and comments are ignored.
|
|
|
|
# Copyright 2005-2024 Free Software Foundation, Inc.
|
|
|
|
# This file is part of GNU tar.
|
|
|
|
# GNU tar is free software; you can redistribute it and/or modify
|
|
# it under the terms of the GNU General Public License as published by
|
|
# the Free Software Foundation; either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
|
|
# GNU tar is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU General Public License for more details.
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
areadlinkat-with-size
|
|
argmatch
|
|
argp
|
|
argp-version-etc
|
|
assert-h
|
|
attribute
|
|
backupfile
|
|
c-ctype
|
|
c32rtomb
|
|
c32tolower
|
|
c32toupper
|
|
closeout
|
|
configmake
|
|
dirname
|
|
dup2
|
|
errno
|
|
error
|
|
exclude
|
|
extern-inline
|
|
exitfail
|
|
faccessat
|
|
fchmodat
|
|
fchownat
|
|
fcntl-h
|
|
fdopendir
|
|
fdutimensat
|
|
file-has-acl
|
|
fileblocks
|
|
flexmember
|
|
fnmatch-gnu
|
|
fprintftime
|
|
free-posix
|
|
fseeko
|
|
fstatat
|
|
full-write
|
|
futimens
|
|
getline
|
|
getopt-gnu
|
|
getpagesize
|
|
gettext-h
|
|
gettime
|
|
gitlog-to-changelog
|
|
hash
|
|
human
|
|
ialloc
|
|
idx
|
|
intprops
|
|
inttostr
|
|
inttypes
|
|
largefile
|
|
lchown
|
|
limits-h
|
|
linkat
|
|
localcharset
|
|
manywarnings
|
|
mbrtoc32-regular
|
|
mcel-prefer
|
|
mkdirat
|
|
mkdtemp
|
|
mkfifoat
|
|
modechange
|
|
obstack
|
|
openat
|
|
parse-datetime
|
|
priv-set
|
|
progname
|
|
quote
|
|
quotearg
|
|
readlinkat
|
|
reallocarray
|
|
renameat
|
|
root-uid
|
|
rpmatch
|
|
full-read
|
|
safe-read
|
|
savedir
|
|
selinux-at
|
|
setenv
|
|
stat-time
|
|
std-gnu23
|
|
stdbool
|
|
stddef
|
|
stdint
|
|
stpcpy
|
|
stdopen
|
|
strdup-posix
|
|
strerror
|
|
strnlen
|
|
symlinkat
|
|
sys_stat
|
|
timespec
|
|
timespec-sub
|
|
unlinkat
|
|
unlinkdir
|
|
unlocked-io
|
|
utimensat
|
|
version-etc-fsf
|
|
xalignalloc
|
|
xalloc
|
|
xalloc-die
|
|
xgetcwd
|
|
xstrtoumax
|
|
xvasprintf
|
|
year2038-recommended
|