summaryrefslogtreecommitdiff
path: root/ext/socket/rubysocket.h
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-17 18:14:34 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-01-17 18:14:34 +0000
commit86aa5043d86a24ad9e1bbddecbf84ed21b87005a (patch)
tree58289e991373d5e846e59a61ca8cad4864317b46 /ext/socket/rubysocket.h
parent75e0fde36b829fa558b87ac1a3edd6a8dbccf600 (diff)
* ext/socket/raddrinfo.c (addrinfo_mdump): new method.
(addrinfo_mload): new method. (Init_addrinfo): define the method above. * ext/socket/constants.c (constant_arg): str_to_int's first argument constified. * ext/socket/mkconstants.rb (gen_name_to_int_decl): generated function's first argument constified. (gen_name_to_int_func_in_guard): ditto. (ipproto_to_int): generated. * ext/socket/rubysocket.h (IS_IP_FAMILY): moved from raddrinfo.c. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21643 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/rubysocket.h')
-rw-r--r--ext/socket/rubysocket.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/ext/socket/rubysocket.h b/ext/socket/rubysocket.h
index 464649f..bb2f6a6 100644
--- a/ext/socket/rubysocket.h
+++ b/ext/socket/rubysocket.h
@@ -74,6 +74,12 @@
# define NI_MAXSERV 32
#endif
+#ifdef AF_INET6
+# define IS_IP_FAMILY(af) ((af) == AF_INET || (af) == AF_INET6)
+#else
+# define IS_IP_FAMILY(af) ((af) == AF_INET)
+#endif
+
#ifndef HAVE_SOCKADDR_STORAGE
/*
* RFC 2553: protocol-independent placeholder for socket addresses