[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[SCM] GNU Inetutils branch, master, updated. inetutils-1_8-188-g7e8209f
From: |
Mats Erik Andersson |
Subject: |
[SCM] GNU Inetutils branch, master, updated. inetutils-1_8-188-g7e8209f |
Date: |
Fri, 02 Dec 2011 01:19:07 +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 7e8209fa387fdd109b63ad00ef6a9dc8662646a6 (commit)
from 66e35f34292651c34e5347a1707772df73c2eef3 (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=7e8209fa387fdd109b63ad00ef6a9dc8662646a6
commit 7e8209fa387fdd109b63ad00ef6a9dc8662646a6
Author: Mats Erik Andersson <address@hidden>
Date: Fri Dec 2 02:16:55 2011 +0100
Portability fix for <arpa/telnet.h> in NetBSD.
diff --git a/ChangeLog b/ChangeLog
index f48cbed..ac2fd0b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-12-02 Mats Erik Andersson <address@hidden>
+
+ * configure.ac: Check for external declarations of `telcmds'
+ and `telopts'. Define UTMPX for NetBSD.
+ * telnet/commands.c (send_tncmd) [!HAVE_DECL_TELOPTS]: Make the
+ external declaration conditional.
+ [HAVE_DECL_TELOPTS]: Enforce a cast `char **' on system's TELOPTS.
+
2011-12-01 Mats Erik Andersson <address@hidden>
* ifconfig/ifconfig.c: Include <netinet/in.h>.
diff --git a/configure.ac b/configure.ac
index e4af8a6..5828951 100644
--- a/configure.ac
+++ b/configure.ac
@@ -670,6 +670,16 @@ if test "$ac_cv_func_hstrerror" = yes \
AC_DEFINE([HAVE_HSTRERROR], 1, [Define to one if you have hstrerror.])
fi
+dnl OpenSolaris does not provide an external reference.
+AC_CHECK_DECLS(telcmds, , ,
+ [IU_FLUSHLEFT([#undef TELCMDS
+ #include <arpa/telnet.h>])])
+
+dnl NetBSD does include an external reference.
+AC_CHECK_DECLS(telopts, , ,
+ [IU_FLUSHLEFT([#undef TELOPTS
+ #include <arpa/telnet.h>])])
+
## Checks for function declarations.
AC_DECL_SYS_SIGLIST
@@ -789,8 +799,7 @@ case "$host" in
AC_DEFINE([UTMPX], 1, [FIXME])
AC_DEFINE([HAVE_STREAMSPTY], 1, [FIXME])
;;
-*irix* | *hpux*)
- AC_DEFINE([UTMPX], 1, [FIXME])
+*irix* | *hpux* | *netbsd*)
AC_DEFINE([UTMPX], 1, [FIXME])
;;
esac
diff --git a/telnet/commands.c b/telnet/commands.c
index a2db7fe..260bcad 100644
--- a/telnet/commands.c
+++ b/telnet/commands.c
@@ -429,7 +429,9 @@ int
send_tncmd (void (*func) (), char *cmd, char *name)
{
char **cpp;
+#if !HAVE_DECL_TELOPTS
extern char *telopts[];
+#endif
register int val = 0;
if (isprefix (name, "help") || isprefix (name, "?"))
@@ -464,7 +466,11 @@ send_tncmd (void (*func) (), char *cmd, char *name)
}
if (cpp)
{
+#if HAVE_DECL_TELOPTS
+ val = cpp - (char **) telopts;
+#else /* !HAVE_DECL_TELOPTS */
val = cpp - telopts;
+#endif
}
else
{
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 8 ++++++++
configure.ac | 13 +++++++++++--
telnet/commands.c | 6 ++++++
3 files changed, 25 insertions(+), 2 deletions(-)
hooks/post-receive
--
GNU Inetutils
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [SCM] GNU Inetutils branch, master, updated. inetutils-1_8-188-g7e8209f,
Mats Erik Andersson <=