diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-01 11:18:18 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2009-01-01 11:18:18 +0000 |
commit | 6e4149f04a31d3347a8adff35ef7ab4f7fe7d00a (patch) | |
tree | 187a72a6462132ff6ce052e2a0cc28145e110f94 /ext/socket/socket.c | |
parent | 10bc6f8d49ab82e16e6aab39a263cdc838207154 (diff) | |
download | ruby-6e4149f04a31d3347a8adff35ef7ab4f7fe7d00a.tar.gz |
* ext/socket/socket.c: include constants.h at top.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21246 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/socket/socket.c')
-rw-r--r-- | ext/socket/socket.c | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c index 90ce5af347..6561c89b98 100644 --- a/ext/socket/socket.c +++ b/ext/socket/socket.c @@ -130,6 +130,14 @@ struct sockaddr_storage { }; #endif +static void sock_define_const(const char *name, int value, VALUE mConst); +static void sock_define_uconst(const char *name, unsigned int value, VALUE mConst); +#define sock_define_const(name, value) sock_define_const(name, value, mConst) +#define sock_define_uconst(name, value) sock_define_uconst(name, value, mConst) +#include "constants.h" +#undef sock_define_const +#undef sock_define_uconst + #if defined(INET6) && (defined(LOOKUP_ORDER_HACK_INET) || defined(LOOKUP_ORDER_HACK_INET6)) #define LOOKUP_ORDERS (sizeof(lookup_order_table) / sizeof(lookup_order_table[0])) static const int lookup_order_table[] = { @@ -981,8 +989,6 @@ sock_addrinfo(VALUE host, VALUE port, int socktype, int flags) return sock_getaddrinfo(host, port, &hints); } -static char *family_to_str(int val); - static VALUE ipaddr(struct sockaddr *sockaddr, int norevlookup) { @@ -2264,9 +2270,6 @@ unix_peeraddr(VALUE sock) } #endif -static int family_to_int(char *str, int len, int *valp); -static int socktype_to_int(char *str, int len, int *valp); - static void setup_domain_and_type(VALUE domain, int *dv, VALUE type, int *tv) { @@ -3516,11 +3519,6 @@ sock_define_uconst(const char *name, unsigned int value, VALUE mConst) rb_define_const(mConst, name, UINT2NUM(value)); } -#define sock_define_const(name, value) sock_define_const(name, value, mConst) -#define sock_define_uconst(name, value) sock_define_uconst(name, value, mConst) - -#include "constants.h" - /* * Class +Socket+ provides access to the underlying operating system * socket implementations. It can be used to provide more operating system |