This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "GNU Inetutils ".
The branch, master has been updated via 1965afb227ff00db56d822c4848bbb3f16f10c44 (commit) via 6bdf6b485c381d7c9472f8c2ce4642eeb2266bf9 (commit) from 71c80e612f38e3f497cf7104577e3e281bc4f825 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=1965afb227ff00db56d822c4848bbb3f16f10c44 commit 1965afb227ff00db56d822c4848bbb3f16f10c44 Author: Simon Josefsson <si...@josefsson.org> Date: Mon Jul 26 07:19:35 2021 +0200 logger: Code for non-getaddrinfo removed. * NEWS: Mention change. * src/logger.c [!HAVE_DECL_GETADDRINFO]: Remove. diff --git a/NEWS b/NEWS index b7d35c3..4b930dc 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,13 @@ GNU inetutils NEWS -- history of user-visible changes. * Noteworthy changes in release ?.? (????-??-??) [?] +** logger + +Code for non-getaddrinfo removed, since we are using gnulib to provide +getaddrinfo on any platform that lacks it. This may have resulted in +logger not using getaddrinfo on platforms that didn't have the +getaddrinfo prototype, even though we use the gnulib module. + ** Various bugs fixes, internal improvements and clean ups. A lot of configure.ac checks were removed that are no longer needed diff --git a/src/logger.c b/src/logger.c index 7f62cff..1228a1e 100644 --- a/src/logger.c +++ b/src/logger.c @@ -61,14 +61,12 @@ static char *unixsock = NULL; static char *source; static char *pidstr; -#if HAVE_DECL_GETADDRINFO -# if HAVE_IPV6 +#if HAVE_IPV6 static int host_family = AF_UNSPEC; -# else +#else /* Fall back to only IPv4. */ static int host_family = AF_INET; -# endif /* !HAVE_IPV6 */ -#endif /* HAVE_DECL_GETADDRINFO */ +#endif /* !HAVE_IPV6 */ @@ -141,9 +139,7 @@ open_socket (void) union logger_sockaddr sockaddr; socklen_t socklen; int family; -#if HAVE_DECL_GETADDRINFO int ret; -#endif /* A UNIX socket name can be specified in two ways. * Zero length of `unixsock' is handled automatically. */ @@ -165,13 +161,7 @@ open_socket (void) } else { -#if HAVE_DECL_GETADDRINFO struct addrinfo hints, *ai, *res; -#else - struct hostent *hp; - struct servent *sp; - unsigned short port; -#endif /* !HAVE_DECL_GETADDRINFO */ char *p; #if HAVE_IPV6 @@ -209,7 +199,6 @@ open_socket (void) if (!p) p = "syslog"; -#if HAVE_DECL_GETADDRINFO memset (&hints, 0, sizeof (hints)); hints.ai_socktype = SOCK_DGRAM; @@ -275,43 +264,13 @@ open_socket (void) error (EXIT_FAILURE, EADDRNOTAVAIL, "%s:%s", host, p); /* Existing socket can be returned now. - * This handles AF_INET and AF_INET6 in case - * HAVE_DECL_GETADDRINFO is true. */ + * This handles AF_INET and AF_INET6. */ return; -#else /* !HAVE_DECL_GETADDRINFO */ - - sockaddr.sinet.sin_family = AF_INET; - family = PF_INET; - - hp = gethostbyname (host); - if (hp) - sockaddr.sinet.sin_addr.s_addr = *(unsigned long*) hp->h_addr_list[0]; - else if (inet_aton (host, (struct in_addr *) &sockaddr.sinet.sin_addr) - != 1) - error (EXIT_FAILURE, 0, "unknown host name"); - - if (isdigit (*p)) - { - char *end; - unsigned long n = strtoul (p, &end, 10); - if (*end || (port = n) != n) - error (EXIT_FAILURE, 0, "%s: invalid port number", p); - port = htons (port); - } - else if ((sp = getservbyname (p, "udp")) != NULL) - port = sp->s_port; - else - error (EXIT_FAILURE, 0, "%s: unknown service name", p); - - sockaddr.sinet.sin_port = port; -#endif /* !HAVE_DECL_GETADDRINFO */ - socklen = sizeof (sockaddr.sinet); } - /* Execution arrives here for AF_UNIX and for - * situations with !HAVE_DECL_GETADDRINFO. */ + /* Execution arrives here for AF_UNIX. */ fd = socket (family, SOCK_DGRAM, 0); if (fd < 0) http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=6bdf6b485c381d7c9472f8c2ce4642eeb2266bf9 commit 6bdf6b485c381d7c9472f8c2ce4642eeb2266bf9 Author: Simon Josefsson <si...@josefsson.org> Date: Mon Jul 26 07:16:42 2021 +0200 doc: Document recent fixes. * NEWS: Add. diff --git a/NEWS b/NEWS index 4b6ee48..b7d35c3 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,13 @@ GNU inetutils NEWS -- history of user-visible changes. * Noteworthy changes in release ?.? (????-??-??) [?] +** Various bugs fixes, internal improvements and clean ups. + +A lot of configure.ac checks were removed that are no longer needed +since we rely on gnulib for portability. + +The tests/ftp-localhost.sh self-test no longer fails on platforms +where sysctl is missing. * Noteworthy changes in release 2.1 (2021-07-24) [stable] ----------------------------------------------------------------------- Summary of changes: NEWS | 14 ++++++++++++++ src/logger.c | 51 +++++---------------------------------------------- 2 files changed, 19 insertions(+), 46 deletions(-) hooks/post-receive -- GNU Inetutils _______________________________________________ Commit-inetutils mailing list Commit-inetutils@gnu.org https://lists.gnu.org/mailman/listinfo/commit-inetutils