From 18126d98dd72d4ba13a522432703d46bc37850cf Mon Sep 17 00:00:00 2001 From: "H.Merijn Brand" Date: Thu, 16 Feb 2012 17:17:18 +0100 Subject: [PATCH] Add new probes for IPv6 (LeoNerd) --- Configure | 42 +++++++++++++++++++++++++++++++++++++++++- Cross/config.sh-arm-linux | 2 ++ NetWare/config.wc | 2 ++ Porting/Glossary | 8 ++++++++ Porting/config.sh | 2 ++ config_h.SH | 10 ++++++++++ configure.com | 3 +++ epoc/config.sh | 2 ++ metaconfig.h | 2 ++ plan9/config_sh.sample | 2 ++ symbian/config.sh | 2 ++ uconfig.h | 14 ++++++++++++-- uconfig.sh | 2 ++ uconfig64.sh | 2 ++ win32/config.ce | 2 ++ win32/config.gc | 2 ++ win32/config.gc64 | 2 ++ win32/config.gc64nox | 2 ++ win32/config.vc | 2 ++ win32/config.vc64 | 2 ++ 20 files changed, 104 insertions(+), 3 deletions(-) diff --git a/Configure b/Configure index 43f56bf..f87e6fd 100755 --- a/Configure +++ b/Configure @@ -28,7 +28,7 @@ # See Porting/pumpkin.pod for more information on metaconfig. # -# Generated on Fri Jan 27 15:48:54 CET 2012 [metaconfig 3.5 PL0] +# Generated on Thu Feb 16 16:57:30 CET 2012 [metaconfig 3.5 PL0] # (with additional metaconfig patches by perlbug@perl.org) cat >c1$$ <&4 +$cat >try.c < +#include +#include +int main() { +struct sockaddr_in6 sin6; +return (sin6.sin6_family); +} +EOF +val="$undef" +set try; if eval $compile; then + val="$define" +fi +set d_sockaddr_in6; eval $setvar +$rm_try + +echo " " echo "Checking the availability sin6_scope_id in struct sockaddr_in6 ..." >&4 $cat >try.c < @@ -11317,6 +11337,24 @@ set d_sin6_scope_id; eval $setvar $rm_try echo " " +echo "Checking the availability struct ipv6_mreq ..." >&4 +$cat >try.c < +#include +#include +int main() { +struct ipv6_mreq mreq; +return (mreq.ipv6mr_interface); +} +EOF +val="$undef" +set try; if eval $compile; then + val="$define" +fi +set d_ipv6_mreq; eval $setvar +$rm_try + +echo " " echo "Checking the availability of certain socket constants..." >&4 for ENUM in MSG_CTRUNC MSG_DONTROUTE MSG_OOB MSG_PEEK MSG_PROXY SCM_RIGHTS; do enum=`$echo $ENUM|./tr '[A-Z]' '[a-z]'` @@ -22950,6 +22988,7 @@ d_inetaton='$d_inetaton' d_inetntop='$d_inetntop' d_inetpton='$d_inetpton' d_int64_t='$d_int64_t' +d_ipv6_mreq='$d_ipv6_mreq' d_isascii='$d_isascii' d_isblank='$d_isblank' d_isfinite='$d_isfinite' @@ -23115,6 +23154,7 @@ d_sigsetjmp='$d_sigsetjmp' d_sin6_scope_id='$d_sin6_scope_id' d_sitearch='$d_sitearch' d_snprintf='$d_snprintf' +d_sockaddr_in6='$d_sockaddr_in6' d_sockaddr_sa_len='$d_sockaddr_sa_len' d_sockatmark='$d_sockatmark' d_sockatmarkproto='$d_sockatmarkproto' diff --git a/Cross/config.sh-arm-linux b/Cross/config.sh-arm-linux index c9ee89a..ed9ddad 100644 --- a/Cross/config.sh-arm-linux +++ b/Cross/config.sh-arm-linux @@ -284,6 +284,7 @@ d_inetaton='define' d_inetntop='undef' d_inetpton='undef' d_int64_t='define' +d_ipv6_mreq='undef' d_isascii='define' d_isblank='undef' d_isfinite='undef' @@ -448,6 +449,7 @@ d_sigsetjmp='define' d_sin6_scope_id='undef' d_sitearch='define' d_snprintf='undef' +d_sockaddr_in6='undef' d_sockaddr_sa_len='undef' d_sockatmark='undef' d_sockatmarkproto='undef' diff --git a/NetWare/config.wc b/NetWare/config.wc index 80e9c17..84004bd 100644 --- a/NetWare/config.wc +++ b/NetWare/config.wc @@ -273,6 +273,7 @@ d_inetaton='undef' d_inetntop='undef' d_inetpton='undef' d_int64_t='undef' +d_ipv6_mreq='undef' d_isascii='define' d_isblank='undef' d_isfinite='undef' @@ -438,6 +439,7 @@ d_sigsetjmp='undef' d_sin6_scope_id='undef' d_sitearch='undef' d_snprintf='undef' +d_sockaddr_in6='undef' d_sockaddr_sa_len='undef' d_sockatmark='undef' d_sockatmarkproto='undef' diff --git a/Porting/Glossary b/Porting/Glossary index 903c280..e42d750 100644 --- a/Porting/Glossary +++ b/Porting/Glossary @@ -1271,6 +1271,10 @@ d_inetpton (d_inetpton.U): d_int64_t (d_int64_t.U): This symbol will be defined if the C compiler supports int64_t. +d_ipv6_mreq (d_socket.U): + This variable conditionally defines the HAS_IPV6_MREQ symbol, which + indicates the availability of a struct ipv6_mreq. + d_isascii (d_isascii.U): This variable conditionally defines the HAS_ISASCII constant, which indicates to the C program that isascii() is available. @@ -2090,6 +2094,10 @@ d_snprintf (d_snprintf.U): indicates to the C program that the snprintf () library function is available. +d_sockaddr_in6 (d_socket.U): + This variable conditionally defines the HAS_SOCKADDR_IN6 symbol, which + indicates the availability of a struct sockaddr_in6. + d_sockaddr_sa_len (d_socket.U): This variable conditionally defines the HAS_SOCKADDR_SA_LEN symbol, which indicates that a struct sockaddr structure has the sa_len diff --git a/Porting/config.sh b/Porting/config.sh index 90a2034..44dd488 100644 --- a/Porting/config.sh +++ b/Porting/config.sh @@ -298,6 +298,7 @@ d_inetaton='define' d_inetntop='define' d_inetpton='define' d_int64_t='define' +d_ipv6_mreq='undef' d_isascii='define' d_isblank='undef' d_isfinite='undef' @@ -463,6 +464,7 @@ d_sigsetjmp='define' d_sin6_scope_id='undef' d_sitearch='define' d_snprintf='define' +d_sockaddr_in6='undef' d_sockaddr_sa_len='undef' d_sockaddr_sa_len='undef' d_sockatmark='define' diff --git a/config_h.SH b/config_h.SH index a51ad05..82bc97a 100755 --- a/config_h.SH +++ b/config_h.SH @@ -2384,10 +2384,18 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un * structure has a member called sa_len, indicating the length of * the structure. */ +/* HAS_SOCKADDR_IN6: + * This symbol, if defined, indicates the availability of + * struct sockaddr_in6; + */ /* HAS_SIN6_SCOPE_ID: * This symbol, if defined, indicates that the struct sockaddr_in6 * structure has a member called sin6_scope_id. */ +/* HAS_IPV6_MREQ: + * This symbol, if defined, indicates the availability of + * struct ipv6_mreq; + */ #$d_socket HAS_SOCKET /**/ #$d_sockpair HAS_SOCKETPAIR /**/ #$d_sockaddr_sa_len HAS_SOCKADDR_SA_LEN /**/ @@ -2397,7 +2405,9 @@ sed <$CONFIG_H -e 's!^#undef\(.*/\)\*!/\*#define\1 \*!' -e 's!^#un #$d_msg_peek HAS_MSG_PEEK /**/ #$d_msg_proxy HAS_MSG_PROXY /**/ #$d_scm_rights HAS_SCM_RIGHTS /**/ +#$d_sockaddr_in6 HAS_SOCKADDR_IN6 /**/ #$d_sin6_scope_id HAS_SIN6_SCOPE_ID /**/ +#$d_ipv6_mreq HAS_IPV6_MREQ /**/ /* HAS_SRAND48_R: * This symbol, if defined, indicates that the srand48_r routine diff --git a/configure.com b/configure.com index 709a49b..bc02b57 100644 --- a/configure.com +++ b/configure.com @@ -4848,6 +4848,9 @@ $ ELSE $ d_sockaddr_sa_len="undef" $ echo "You do not have sa_len in the sockaddr struct." $ ENDIF +$! TODO: Real checks +$ WC "d_ipv6_mreq='undef'" +$ WC "d_sockaddr_in6='undef'" $! $! $! Check for sin6_scope_id diff --git a/epoc/config.sh b/epoc/config.sh index b68b6c7..d43d192 100644 --- a/epoc/config.sh +++ b/epoc/config.sh @@ -279,6 +279,7 @@ d_inetntop='undef' d_inetpton='undef' d_int64_t='undef' d_iovec_s='undef' +d_ipv6_mreq='undef' d_isascii='define' d_isblank='undef' d_isfinite='undef' @@ -444,6 +445,7 @@ d_sigsetjmp='undef' d_sin6_scope_id='undef' d_sitearch='undef' d_snprintf='undef' +d_sockaddr_in6='undef' d_sockaddr_sa_len='undef' d_sockatmark='undef' d_sockatmarkproto='undef' diff --git a/metaconfig.h b/metaconfig.h index 7a74db0..7fb867e 100644 --- a/metaconfig.h +++ b/metaconfig.h @@ -17,10 +17,12 @@ * HAS_GMTIME64 * HAS_ISBLANK * HAS_LOCALTIME64 + * HAS_IPV6_MREQ * HAS_MKTIME64 * HAS_PRCTL * HAS_PSEUDOFORK * HAS_TIMEGM + * HAS_SOCKADDR_IN6 * I16SIZE * I64SIZE * I8SIZE diff --git a/plan9/config_sh.sample b/plan9/config_sh.sample index f9784ef..f88f435 100644 --- a/plan9/config_sh.sample +++ b/plan9/config_sh.sample @@ -284,6 +284,7 @@ d_inetaton='undef' d_inetntop='undef' d_inetpton='undef' d_int64_t='define' +d_ipv6_mreq='undef' d_isascii='undef' d_isblank='undef' d_isfinite='undef' @@ -448,6 +449,7 @@ d_sigsetjmp='define' d_sin6_scope_id='undef' d_sitearch='define' d_snprintf='undef' +d_sockaddr_in6='undef' d_sockaddr_sa_len='undef' d_sockatmark='undef' d_sockatmarkproto='undef' diff --git a/symbian/config.sh b/symbian/config.sh index be7b2a4..010a686 100644 --- a/symbian/config.sh +++ b/symbian/config.sh @@ -230,6 +230,7 @@ d_inetaton='undef' d_inetntop='undef' d_inetpton='undef' d_int64_t='undef' +d_ipv6_mreq='undef' d_isascii='undef' d_isblank='undef' d_isfinite='undef' @@ -396,6 +397,7 @@ d_sitearch='define' d_sitecustomize='undef' d_sitecustomize='undef' d_snprintf='undef' +d_sockaddr_in6='undef' d_sockaddr_sa_len='undef' d_sockatmark='undef' d_sockatmarkproto='undef' diff --git a/uconfig.h b/uconfig.h index d9a833a..437f9e1 100644 --- a/uconfig.h +++ b/uconfig.h @@ -2351,10 +2351,18 @@ * structure has a member called sa_len, indicating the length of * the structure. */ +/* HAS_SOCKADDR_IN6: + * This symbol, if defined, indicates the availability of + * struct sockaddr_in6; + */ /* HAS_SIN6_SCOPE_ID: * This symbol, if defined, indicates that the struct sockaddr_in6 * structure has a member called sin6_scope_id. */ +/* HAS_IPV6_MREQ: + * This symbol, if defined, indicates the availability of + * struct ipv6_mreq; + */ /*#define HAS_SOCKET / **/ /*#define HAS_SOCKETPAIR / **/ /*#define HAS_SOCKADDR_SA_LEN / **/ @@ -2364,7 +2372,9 @@ /*#define HAS_MSG_PEEK / **/ /*#define HAS_MSG_PROXY / **/ /*#define HAS_SCM_RIGHTS / **/ +/*#define HAS_SOCKADDR_IN6 / **/ /*#define HAS_SIN6_SCOPE_ID / **/ +/*#define HAS_IPV6_MREQ / **/ /* HAS_SRAND48_R: * This symbol, if defined, indicates that the srand48_r routine @@ -4724,6 +4734,6 @@ #endif /* Generated from: - * d935e2c4b70899e11fb4984070daba3308bc3361c09b5335d752a51e4a5e4c25 config_h.SH - * 5a1e4ec048ee5f2000216dd55cc93e344ba30be7f7ef43664fddc13014b3fe3c uconfig.sh + * c8ea9c619a01be4183283a4f95751f81d3fab095f1ded1ac6d9c51f134c63f00 config_h.SH + * 3dad514f97a86deca0eebb6544f7785077651da24e7c6231ef7a22963ff4fd5d uconfig.sh * ex: set ro: */ diff --git a/uconfig.sh b/uconfig.sh index f52ff0d..076fde4 100644 --- a/uconfig.sh +++ b/uconfig.sh @@ -223,6 +223,7 @@ d_inetaton='undef' d_inetntop='undef' d_inetpton='undef' d_int64_t='undef' +d_ipv6_mreq='undef' d_isascii='undef' d_isblank='undef' d_isfinite='undef' @@ -387,6 +388,7 @@ d_sigsetjmp='undef' d_sin6_scope_id='undef' d_sitearch='undef' d_snprintf='undef' +d_sockaddr_in6='undef' d_sockaddr_sa_len='undef' d_sockatmark='undef' d_sockatmarkproto='undef' diff --git a/uconfig64.sh b/uconfig64.sh index 3922709..5ccef37 100644 --- a/uconfig64.sh +++ b/uconfig64.sh @@ -224,6 +224,7 @@ d_inetaton='undef' d_inetntop='undef' d_inetpton='undef' d_int64_t='undef' +d_ipv6_mreq='undef' d_isascii='undef' d_isblank='undef' d_isfinite='undef' @@ -388,6 +389,7 @@ d_sigsetjmp='undef' d_sin6_scope_id='undef' d_sitearch='undef' d_snprintf='undef' +d_sockaddr_in6='undef' d_sockaddr_sa_len='undef' d_sockatmark='undef' d_sockatmarkproto='undef' diff --git a/win32/config.ce b/win32/config.ce index a872577..c963e82 100644 --- a/win32/config.ce +++ b/win32/config.ce @@ -271,6 +271,7 @@ d_inetaton='undef' d_inetntop='undef' d_inetpton='undef' d_int64_t='undef' +d_ipv6_mreq='undef' d_isascii='define' d_isblank='undef' d_isfinite='undef' @@ -436,6 +437,7 @@ d_sigsetjmp='undef' d_sin6_scope_id='undef' d_sitearch='define' d_snprintf='undef' +d_sockaddr_in6='undef' d_sockaddr_sa_len='undef' d_sockatmark='undef' d_sockatmarkproto='undef' diff --git a/win32/config.gc b/win32/config.gc index 20fbcff..3cc0ed7 100644 --- a/win32/config.gc +++ b/win32/config.gc @@ -271,6 +271,7 @@ d_inetaton='undef' d_inetntop='undef' d_inetpton='undef' d_int64_t='undef' +d_ipv6_mreq='undef' d_isascii='define' d_isblank='undef' d_isfinite='undef' @@ -436,6 +437,7 @@ d_sigsetjmp='undef' d_sin6_scope_id='define' d_sitearch='define' d_snprintf='define' +d_sockaddr_in6='undef' d_sockaddr_sa_len='undef' d_sockatmark='undef' d_sockatmarkproto='undef' diff --git a/win32/config.gc64 b/win32/config.gc64 index 2834d8e..2b13d2d 100644 --- a/win32/config.gc64 +++ b/win32/config.gc64 @@ -271,6 +271,7 @@ d_inetaton='undef' d_inetntop='undef' d_inetpton='undef' d_int64_t='undef' +d_ipv6_mreq='undef' d_isascii='define' d_isblank='undef' d_isfinite='undef' @@ -436,6 +437,7 @@ d_sigsetjmp='undef' d_sin6_scope_id='define' d_sitearch='define' d_snprintf='define' +d_sockaddr_in6='undef' d_sockaddr_sa_len='undef' d_sockatmark='undef' d_sockatmarkproto='undef' diff --git a/win32/config.gc64nox b/win32/config.gc64nox index ba69f86..c463323 100644 --- a/win32/config.gc64nox +++ b/win32/config.gc64nox @@ -271,6 +271,7 @@ d_inetaton='undef' d_inetntop='undef' d_inetpton='undef' d_int64_t='undef' +d_ipv6_mreq='undef' d_isascii='define' d_isblank='undef' d_isfinite='undef' @@ -436,6 +437,7 @@ d_sigsetjmp='undef' d_sin6_scope_id='define' d_sitearch='define' d_snprintf='define' +d_sockaddr_in6='undef' d_sockaddr_sa_len='undef' d_sockatmark='undef' d_sockatmarkproto='undef' diff --git a/win32/config.vc b/win32/config.vc index bc4c31f..7636a26 100644 --- a/win32/config.vc +++ b/win32/config.vc @@ -271,6 +271,7 @@ d_inetaton='undef' d_inetntop='undef' d_inetpton='undef' d_int64_t='undef' +d_ipv6_mreq='undef' d_isascii='define' d_isblank='undef' d_isfinite='undef' @@ -436,6 +437,7 @@ d_sigsetjmp='undef' d_sin6_scope_id='define' d_sitearch='define' d_snprintf='define' +d_sockaddr_in6='undef' d_sockaddr_sa_len='undef' d_sockatmark='undef' d_sockatmarkproto='undef' diff --git a/win32/config.vc64 b/win32/config.vc64 index f68bbde..30fec79 100644 --- a/win32/config.vc64 +++ b/win32/config.vc64 @@ -271,6 +271,7 @@ d_inetaton='undef' d_inetntop='undef' d_inetpton='undef' d_int64_t='undef' +d_ipv6_mreq='undef' d_isascii='define' d_isblank='undef' d_isfinite='undef' @@ -436,6 +437,7 @@ d_sigsetjmp='undef' d_sin6_scope_id='define' d_sitearch='define' d_snprintf='define' +d_sockaddr_in6='undef' d_sockaddr_sa_len='undef' d_sockatmark='undef' d_sockatmarkproto='undef' -- 2.7.4