* bootstrap.conf (gnulib_modules): Add intprops.
* ftp/ftp.c: Include intprops.h.
(portstr): Size buffer to fit exactly 'in_port_t' and a NUL byte.
(hookup): Use 'in_port_t' to represent the port instead of int. Use
sprintf since the buffer size is safe.
* ftp/extern.h (hookup): Adjust deceleration.
* ftp/ftp_var.h: Include netinet/in.h for type definitions.
* ftp/Makefile.am (LDADD): Add $(CLOCK_TIME_LIB).
* ftp/extern.h (struct timespec): Add a forward declaration.
(ptransfer): Use timespec instead of timeval.
(tvsub): Remove declaration.
* ftp/ftp.c: Include <float.h> and <timespec.h>
(sendrequest): Use current_timespec instead of gettimeofday.
(recvrequest): Likewise.
(ptransfer): Use timespec_sub instead of tvsub. Divide by FLT_MIN
instead of 1 if seconds is zero.
(tvsub): Remove function.
* ftp/cmds.c (account, user): Don't declare getpass since it is
defined in unistd.h.
* ftp/ftp.c (login): Likewise. Don't declare fclose and pclose since
they are defined in stdio.h.
* ftpd/extern.h: Don't declare getusershell since it is defined in
unistd.h.
* ftpd/ftpd.c: Don't declare fclose since it is defined in stdio.h.
* libinetutils/logwtmp.c: Don't declare errno since it is defined in
errno.h.
* libtelnet/misc.c (auth_encrypt_user): Include string.h and don't
declare strdup.
* telnet/authenc.c (telnet_gets): Don't declare getpass since it is
defined in unistd.h.
* telnet/commands.c (hostname): Use NULL instead of 0.
(env_init, shell): Include string.h and don't redeclare functions.
This fixes the problem reported by AiDai in
<https://lists.gnu.org/archive/html/bug-inetutils/2021-12/msg00005.html>.
* NEWS: Mention fix.
* doc/inetutils.texi (Ftp commands): Mention macro nesting depth
limit.
* ftp/domacro.c: New constant MAX_MACRO_NESTING_DEPTH.
(domacro): Limit macro nesting depth to MAX_MACRO_NESTING_DEPTH.
* tests/ftp-parser.sh: Test execution of nested macros.
* cfg.mk (update-copyright-env): Add, from coreutils.
(VC_LIST_ALWAYS_EXCLUDE_REGEX): Add, for update-copyright exceptions.
* README: Add info about copyright year ranges.
* *: Update copyright notices.
* NEWS: Doc fix.
* doc/inetutils.texi (ftp invocation): Improve --no-edit.
* ftp/main.c (main): Disable readline when TERM unset or dumb,
inspired by trivial patch from Alex Bochannek <alex@bochannek.com>.
* ftp/ftp.c (getreply): Fix possible buffer overflow (backport
from OpenBSD); reported by O. Bittner, D. Maier, M. Munier,
J. Beier of SecT, TU Berlin.
Take care to preserve the desired peer's name. Do not
replace it with its canonical name. Bug was reported to
the list as `2015-02/msg00000.html' by John Sullivan.
For a numerical host name, getaddrinfo() need not set
a value for `ai_canonname'. Protect against this.
Problem was uncovered by a system running OpenBSD 5.5.