+$!
+$! Check for sa_len
+$!
+$ echo4 "Checking the availability of sa_len in the sockaddr struct ..."
+$ IF Has_Dec_C_Sockets .OR. Has_Socketshr
+$ THEN
+$ OS
+$ WS "#if defined(__DECC) || defined(__DECCXX)"
+$ WS "#include <stdlib.h>"
+$ WS "#endif"
+$ WS "#define _SOCKADDR_LEN"
+$ WS "#include <types.h>"
+$ IF Has_Socketshr
+$ THEN
+$ WS "#include <socketshr.h>"
+$ ELSE
+$ WS "#include <socket.h>"
+$ ENDIF
+$ WS "int main() {"
+$ WS "struct sockaddr sa;"
+$ WS "return (sa.sa_len);"
+$ WS "}"
+$ CS
+$ GOSUB compile_ok
+$ IF compile_status .EQ. good_compile
+$ THEN
+$ d_sockaddr_sa_len="define"
+$ echo "You have sa_len in the sockaddr struct."
+$ ELSE
+$ d_sockaddr_sa_len="undef"
+$ echo "You do not have sa_len in the sockaddr struct."
+$ ENDIF
+$ ELSE
+$ d_sockaddr_sa_len="undef"
+$ echo "You do not have sa_len in the sockaddr struct."
+$ ENDIF
+$!
+$!
+$! Check for sin6_scope_id
+$!
+$ echo4 "Checking the availability of sin6_scope_id in the struct sockaddr_in6 ..."
+$ IF Has_Dec_C_Sockets .OR. Has_Socketshr
+$ THEN
+$ OS
+$ WS "#include <types.h>"
+$ IF Has_Socketshr
+$ THEN
+$ WS "#include <socketshr.h>"
+$ ELSE
+$ WS "#include <socket.h>"
+$ ENDIF
+$ WS "#include <in.h>"
+$ WS "int main() {"
+$ WS "struct sockaddr_in6 sin6;"
+$ WS "return (sin6.sin6_scope_id);"
+$ WS "}"
+$ CS
+$ GOSUB compile_ok
+$ IF compile_status .EQ. good_compile
+$ THEN
+$ d_sin6_scope_id="define"
+$ echo "You have sin6_scope_id in the sockaddr_in6 struct."
+$ ELSE
+$ d_sin6_scope_id="undef"
+$ echo "You do not have sin6_scope_id in the sockaddr_in6 struct."
+$ ENDIF
+$ ELSE
+$ d_sin6_scope_id="undef"
+$ echo "You do not have sin6_scope_id in the sockaddr_in6 struct."
+$ ENDIF
+$!