* 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
This commit is contained in:
akr 2009-01-01 11:18:18 +00:00
Родитель 10bc6f8d49
Коммит 6e4149f04a
2 изменённых файлов: 12 добавлений и 10 удалений

Просмотреть файл

@ -1,3 +1,7 @@
Thu Jan 1 20:17:47 2009 Tanaka Akira <akr@fsij.org>
* ext/socket/socket.c: include constants.h at top.
Thu Jan 1 19:53:33 2009 Tanaka Akira <akr@fsij.org>
* ext/socket/mkconstants.rb: add valp argument for family_to_int and

Просмотреть файл

@ -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