?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 $@ %<
?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:.
?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 /**/
?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=''
$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