commit-inetutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-55-g4c39f0


From: Mats Erik Andersson
Subject: [SCM] GNU Inetutils branch, master, updated. inetutils-1_9_1-55-g4c39f0f
Date: Wed, 14 Mar 2012 00:43:13 +0000

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  4c39f0feb06ad4a5dc0a2191b340aaa4b666760f (commit)
       via  bc4809d68690e00cffb2ccfdd1fdf734f08988e1 (commit)
      from  24587ec0fd92975adb4c29a4dfd21772ab4a2118 (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=4c39f0feb06ad4a5dc0a2191b340aaa4b666760f


commit 4c39f0feb06ad4a5dc0a2191b340aaa4b666760f
Author: Mats Erik Andersson <address@hidden>
Date:   Wed Mar 14 01:17:14 2012 +0100

    Detection of termcap and libwrap.

diff --git a/ChangeLog b/ChangeLog
index d1f7e04..4f22ce1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2012-03-14  Mats Erik Andersson  <address@hidden>
+
+       Make explicit dependency on header files for libwrap and termcap.
+
+       * am/libcurses.m4 (IU_LIB_TERMCAP): Check whether tgetent() is really
+       declared in <termcap.h>, not only checking presence of <termcap.h>.
+       That failing, check declaration of tgetent() using the pair <curses.h>,
+       and <term.h>.  In case of no successful detection at all, set LIBTERMCAP
+       to empty.
+       * configure.ac (LIBWRAP): Define only if hosts_ctl() is present in
+       libwrap and also the header <tcpd.h> exists.
+
 2012-03-13  Mats Erik Andersson  <address@hidden>
 
        * src/traceroute.c (do_try): When displaying traces, print host name
diff --git a/am/libcurses.m4 b/am/libcurses.m4
index 62c53e7..cc3a781 100644
--- a/am/libcurses.m4
+++ b/am/libcurses.m4
@@ -80,27 +80,32 @@ dnl IU_LIB_TERMCAP -- check for various termcap libraries
 dnl
 dnl Checks for various common libraries implementing the termcap interface,
 dnl including ncurses (unless --disable ncurses is specified), curses (which
-dnl does on some systems), termcap, and termlib.  If termcap is found, then
+dnl does so on some systems), termcap, and termlib.  If termcap is found, then
 dnl LIBTERMCAP is defined with the appropriate linker specification.
 dnl
+dnl Solaris is known to use libtermcap for tgetent, but to declare tgetent
+dnl in <term.h>!
+dnl
 AC_DEFUN([IU_LIB_TERMCAP], [
   AC_REQUIRE([IU_LIB_NCURSES])
   if test "$LIBNCURSES"; then
     LIBTERMCAP="$LIBNCURSES"
   else
     AC_CHECK_LIB(termcap, tgetent, LIBTERMCAP=-ltermcap)
-    AC_CHECK_HEADERS([termcap.h])
+    AC_CHECK_DECLS([tgetent], , , [[#include <termcap.h>]])
     if test "$ac_cv_lib_termcap_tgetent" = yes \
-       || test "$ac_cv_header_termcap_h" = yes; then
+       && test "$ac_cv_have_decl_tgetent" = yes; then
       AC_DEFINE([HAVE_TERMCAP_TGETENT], 1,
                [Define to 1 if tgetent() exists in <termcap.h>.])
     else
       AC_CHECK_LIB(curses, tgetent, LIBTERMCAP=-lcurses)
-    fi
-    if test "$ac_cv_lib_curses_tgetent" = yes \
-       && test "$ac_cv_lib_termcap_tgetent" = no; then
-      AC_DEFINE([HAVE_CURSES_TGETENT], 1,
-               [Define to 1 if tgetent() exists in <curses.h>.])
+      AC_CHECK_DECLS([tgetent], , , [[#include <curses.h>
+#include <term.h>]])
+      if test "$ac_cv_lib_curses_tgetent" = yes \
+         && test "$ac_cv_have_decl_tgetent" = yes; then
+       AC_DEFINE([HAVE_CURSES_TGETENT], 1,
+                 [Define to 1 if tgetent() exists in <curses.h>.])
+      fi
     fi
     if test "$ac_cv_lib_curses_tgetent" = no \
        && test "$ac_cv_lib_termcap_tgetent" = no; then
@@ -108,6 +113,8 @@ AC_DEFUN([IU_LIB_TERMCAP], [
       if "$ac_cv_lib_termlib_tgetent" = yes; then
        AC_DEFINE([HAVE_TERMINFO_TGETENT], 1,
                  [Define to 1 if tgetent() exists in libterminfo.])
+      else
+       LIBTERMCAP=
       fi
     fi
     if test -n "$LIBTERMCAP"; then
diff --git a/configure.ac b/configure.ac
index dde3d7c..e5c303e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -469,6 +469,7 @@ dnl See if we have libwrap.a
 dnl we cannot use AC_CHECK_LIB reliably since for the wrap lib
 dnl you have to define some global variables
 #AC_CHECK_LIB(wrap, hosts_ctl, LIBWRAP=-lwrap)
+  AC_CHECK_HEADERS([tcpd.h])
   AC_MSG_CHECKING(hosts_ctl in -lwrap);
   save_LIBS=$LIBS
   LIBS="$save_LIBS -lwrap"
@@ -476,8 +477,9 @@ dnl you have to define some global variables
               hosts_ctl(), eval "ac_cv_lib_wrap_hosts_ctl=yes",
               eval "ac_cv_lib_wrap_hosts_ctl=no")
   LIBS=$save_LIBS
-  if test "$ac_cv_lib_wrap_hosts_ctl" = yes ; then
-    AC_DEFINE([WITH_WRAP], 1, [Define to one if you have -lwrap.])
+  if test "$ac_cv_lib_wrap_hosts_ctl" = yes \
+      && test "$ac_cv_header_tcpd_h" = yes; then
+    AC_DEFINE([WITH_WRAP], 1, [Define to one if you have -lwrap and <tcpd.h>.])
     LIBWRAP=-lwrap
   fi
   AC_MSG_RESULT($ac_cv_lib_wrap_hosts_ctl);

http://git.savannah.gnu.org/cgit/inetutils.git/commit/?id=bc4809d68690e00cffb2ccfdd1fdf734f08988e1


commit bc4809d68690e00cffb2ccfdd1fdf734f08988e1
Author: Mats Erik Andersson <address@hidden>
Date:   Tue Mar 13 15:10:28 2012 +0100

    traceroute: Print format changes.

diff --git a/ChangeLog b/ChangeLog
index 404ff16..d1f7e04 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2012-03-13  Mats Erik Andersson  <address@hidden>
+
+       * src/traceroute.c (do_try): When displaying traces, print host name
+       only if in resolving mode; otherwise only numerical address.  Insert
+       one additional blank before time printout.
+       (get_hostname): Remove conditional clause on OPT_RESOLVE_HOSTNAMES.
+
 2012-03-12  Simon Josefsson  <address@hidden>
 
        * NEWS: Mention new dnsdomainname tool.
diff --git a/src/traceroute.c b/src/traceroute.c
index 7918c22..1d53d1e 100644
--- a/src/traceroute.c
+++ b/src/traceroute.c
@@ -291,10 +291,13 @@ do_try (trace_t * trace, const int hop,
              else
                {
                  if (tries == 0 || prev_addr != trace->from.sin_addr.s_addr)
-                   printf (" %s (%s) ",
-                           inet_ntoa (trace->from.sin_addr),
+                   {
+                     printf (" %s ", inet_ntoa (trace->from.sin_addr));
+                     if (opt_resolve_hostnames)
+                       printf ("(%s) ",
                            get_hostname (&trace->from.sin_addr));
-                 printf ("%.3fms ", triptime);
+                   }
+                 printf (" %.3fms ", triptime);
 
                }
              prev_addr = trace->from.sin_addr.s_addr;
@@ -309,13 +312,11 @@ do_try (trace_t * trace, const int hop,
 char *
 get_hostname (struct in_addr *addr)
 {
-  if (opt_resolve_hostnames)
-    {
-      struct hostent *info =
+  struct hostent *info =
        gethostbyaddr ((char *) addr, sizeof (*addr), AF_INET);
-      if (info != NULL)
-       return info->h_name;
-    }
+  if (info != NULL)
+    return info->h_name;
+
   return inet_ntoa (*addr);
 }
 

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog        |   19 +++++++++++++++++++
 am/libcurses.m4  |   23 +++++++++++++++--------
 configure.ac     |    6 ++++--
 src/traceroute.c |   19 ++++++++++---------
 4 files changed, 48 insertions(+), 19 deletions(-)


hooks/post-receive
-- 
GNU Inetutils 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]