In metaconfig.git, the branch master has been updated

<http://perl5.git.perl.org/metaconfig.git/commitdiff/5f1f4e94c45398c84dc63282d03329dd28af1c96?hp=8f0cec75afc33af69a41f1c4d45cd47545963a74>

- Log -----------------------------------------------------------------
commit 5f1f4e94c45398c84dc63282d03329dd28af1c96
Author: H.Merijn Brand <[email protected]>
Date:   Mon Dec 20 17:04:36 2010 +0100

    Add sin6_scope_id probe (LeoNerd)
-----------------------------------------------------------------------

Summary of changes:
 U/modified/d_socket.U |   33 +++++++++++++++++++++++++++++++--
 1 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/U/modified/d_socket.U b/U/modified/d_socket.U
index c6756e5..ba4692b 100644
--- a/U/modified/d_socket.U
+++ b/U/modified/d_socket.U
@@ -20,7 +20,7 @@
 ?RCS:
 ?MAKE:d_socket d_oldsock d_sockpair socketlib sockethdr \
        d_msg_ctrunc d_msg_dontroute d_msg_oob d_msg_peek d_msg_proxy \
-       d_scm_rights d_sockaddr_sa_len: \
+       d_scm_rights d_sockaddr_sa_len d_sin6_scope_id: \
        contains echo n c ar nm nm_opt nm_extract Inlibc Csym _a \
        Compile cat rm_try Setvar Hasfield
 ?MAKE: -pick add $@ %<
@@ -71,6 +71,11 @@
 ?S:    which indicates that a struct sockaddr structure has the sa_len
 ?S:    member.
 ?S:.
+?S:d_sin6_scope_id:
+?S:    This variable conditionally defines the HAS_SIN6_SCOPE_ID symbol, which
+?S:    indicates that a struct sockaddr_in6 structure has the sin6_scope_id
+?S:    member.
+?S:.
 ?S:socketlib:
 ?S:    This variable has the names of any libraries needed for socket support.
 ?S:.
@@ -125,6 +130,10 @@
 ?C:    structure has a member called sa_len, indicating the length of
 ?C:    the structure.
 ?C:.
+?C:HAS_SIN6_SCOPE_ID:
+?C:    This symbol, if defined, indicates that the struct sockaddr_in6
+?C:    structure has a member called sin6_scope_id.
+?C:.
 ?H:#$d_socket  HAS_SOCKET              /**/
 ?H:#$d_sockpair        HAS_SOCKETPAIR  /**/
 ?H:#$d_sockaddr_sa_len HAS_SOCKADDR_SA_LEN     /**/
@@ -135,12 +144,13 @@
 ?H:#$d_msg_peek        HAS_MSG_PEEK    /**/
 ?H:#$d_msg_proxy       HAS_MSG_PROXY   /**/
 ?H:#$d_scm_rights      HAS_SCM_RIGHTS  /**/
+?H:#$d_sin6_scope_id   HAS_SIN6_SCOPE_ID       /**/
 ?H:.
 ?T:val net ENUM enum
 ?F:try.c
 ?LINT:set d_sockpair d_sockaddr_sa_len
 ?LINT:set d_msg_ctrunc d_msg_dontroute d_msg_oob d_msg_peek d_msg_proxy
-?LINT:set d_scm_rights
+?LINT:set d_scm_rights d_sin6_scope_id
 : see whether socket exists
 socketlib=''
 sockethdr=''
@@ -233,6 +243,25 @@ set d_sockaddr_sa_len; eval $setvar
 $rm_try
 
 echo " "
+?X: ...
+echo "Checking the availability sin6_scope_id in struct sockaddr_in6 ..." >&4
+$cat >try.c <<EOF
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+int main() {
+struct sockaddr_in6 sin6;
+return (sin6.sin6_scope_id);
+}
+EOF
+val="$undef"
+set try; if eval $compile; then
+       val="$define"
+fi
+set d_sin6_scope_id; eval $setvar
+$rm_try
+
+echo " "
 ?X: these constants are known to be troublesomely defined as enums
 ?X: so that ifdef will not work for detecting their presence.
 echo "Checking the availability of certain socket constants..." >&4

--
perl5 metaconfig repository

Reply via email to