[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-inetutils] Ping6 is not built ([SCM] inetutils-1_8-163-gd225085
From: |
Mats Erik Andersson |
Subject: |
Re: [bug-inetutils] Ping6 is not built ([SCM] inetutils-1_8-163-gd225085) |
Date: |
Mon, 21 Nov 2011 23:41:24 +0100 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
måndag den 21 november 2011 klockan 13:52 skrev Alfred M. Szmidt detta:
> > --- a/configure.ac
> > +++ b/configure.ac
> > @@ -367,6 +367,10 @@ else
> > if test "X$working_icmp6" = "Xyes"; then
> > IU_CHECK_MACRO(IPV6_RECVHOPLIMIT, [#include <netinet/in.h>], ,
> > [have_recvhoplimt=yes], [have_recvhoplimt=no])
> > + IU_CHECK_MACRO(IPV6_2292HOPLIMIT, [#include <netinet/in.h>], , [
> > + AC_DEFINE([IPV6_HOPLIMIT], IPV6_2292HOPLIMIT,
> > + [Define to IPV6_HOPLIMIT if not available])
> > + ], [working_icmp6=no])
> > if test "X$have_recvhoplimt" = "Xno"; then
> > IU_CHECK_MACRO(IPV6_HOPLIMIT, [#include <netinet/in.h>], , [
> > AC_DEFINE([IPV6_RECVHOPLIMIT], IPV6_HOPLIMIT,
>
> This is badly conceived, unfortunately. This conditional disables ping6
> at least for OpenBSD, GNU/kFreeBSD, and OpenSolaris.
>
> * Solaris has IPV6_RECVHOPLIMIT, but lacks IPV6_2292HOPLIMIT.
>
> * OpenBSD, FreeBSD, and kFreeBSD all have IPV6_RECVHOPLIMIT,
> as well as IPV6_2292HOPLIMIT, but the latter is reserved
> for kernel code, unless manually specified.
>
> Ah, that wasn't my intention. I did sit for a while thinking of the
> logic here, and tried it on GNU where we have IPV6_HOPLIMIT and such.
> I'll think a bit more, if you have a solution please tell.
You forgot the surrounding conditional. In addition I would like you
to check whether the replacement definitions are correct in your original
code, in the following suggestion, or in none of them! Is the conditional
around the text for IPV6_HOPLIMIT correct?
The following change does indeed build "src/ping6" for OpenBSD, GNU/kFreeBSD,
and GNU/OpenSolaris, but none of the replacement code is actually put to use
there, nor would it be in GNU/Linux. I will not push any change, but will
indicate in pseudo-code what I interpret to be your will. Do check whether
it makes sense, and whether the suggestion hits the mark!
if defined IPV6_RECVHOPLIMIT
then
check presence of IPV6_HOPLIMIT /* not implemented */
else
if defined IPV6_2292HOPLIMIT
then
define IPV6_RECVHOPLIMIT IPV6_2292HOPLIMIT
endif
if not defined IPV6_HOPLIMIT
define IPV6_HOPLIMIT IPV6_RECVHOPLIMIT /* == IPV6_RECVHOPLIMIT
or undef */
endif
endif
Do missing macros lead to correct replacements under all circumstances?
My replacements in the patch below are not identical in the above pseudo-code!
Regards,
Mats
diff --git a/configure.ac b/configure.ac
index b0259e5..d499a3b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -375,10 +375,12 @@ else
if test "X$working_icmp6" = "Xyes"; then
IU_CHECK_MACRO(IPV6_RECVHOPLIMIT, [#include <netinet/in.h>], ,
[have_recvhoplimt=yes], [have_recvhoplimt=no])
- IU_CHECK_MACRO(IPV6_2292HOPLIMIT, [#include <netinet/in.h>], , [
- AC_DEFINE([IPV6_HOPLIMIT], IPV6_2292HOPLIMIT,
- [Define to IPV6_HOPLIMIT if not available])
- ], [working_icmp6=no])
+ if test "X$have_recvhoplimt" = "Xno"; then
+ IU_CHECK_MACRO(IPV6_2292HOPLIMIT, [#include <netinet/in.h>], , [
+ AC_DEFINE([IPV6_RECVHOPLIMIT], IPV6_HOPLIMIT,
+ [Define to IPV6_HOPLIMIT if not available])
+ ], [working_icmp6=no])
+ fi
if test "X$have_recvhoplimt" = "Xno"; then
IU_CHECK_MACRO(IPV6_HOPLIMIT, [#include <netinet/in.h>], , [
AC_DEFINE([IPV6_RECVHOPLIMIT], IPV6_HOPLIMIT,
- [bug-inetutils] Ping6 is not built ([SCM] inetutils-1_8-163-gd225085), Mats Erik Andersson, 2011/11/21
- Re: [bug-inetutils] Ping6 is not built ([SCM] inetutils-1_8-163-gd225085), Alfred M. Szmidt, 2011/11/21
- Re: [bug-inetutils] Ping6 is not built ([SCM] inetutils-1_8-163-gd225085),
Mats Erik Andersson <=
- Re: [bug-inetutils] Ping6 is not built, Mats Erik Andersson, 2011/11/27
- Re: [bug-inetutils] Ping6 is not built, Alfred M. Szmidt, 2011/11/28
- Re: [bug-inetutils] Ping6 is not built, Mats Erik Andersson, 2011/11/28
- Re: [bug-inetutils] Ping6 is not built, Alfred M. Szmidt, 2011/11/29
- Re: [bug-inetutils] Ping6 is not built, Simon Josefsson, 2011/11/29
- Re: [bug-inetutils] Ping6 is not built, Alfred M. Szmidt, 2011/11/29