From 78211f7a4c4de708832f2fad9f5d45a221289761 Mon Sep 17 00:00:00 2001 From: matz Date: Fri, 29 Oct 1999 09:25:48 +0000 Subject: [PATCH] 19991029 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/socket/extconf.rb | 6 +++++- string.c | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ext/socket/extconf.rb b/ext/socket/extconf.rb index 47addfeff8..6975994ef8 100644 --- a/ext/socket/extconf.rb +++ b/ext/socket/extconf.rb @@ -148,7 +148,6 @@ EOF $CFLAGS="-DHAVE_SA_LEN "+$CFLAGS end -have_header("sys/sysctl.h") have_header("netinet/tcp.h") have_header("netinet/udp.h") @@ -160,6 +159,10 @@ if try_run(< #include +#ifndef AF_LOCAL +#define AF_LOCAL AF_UNIX +#endif + main() { int passive, gaierr, inet4 = 0, inet6 = 0; @@ -176,6 +179,7 @@ main() goto bad; } for (ai = aitop; ai; ai = ai->ai_next) { + if (ai->ai_family == AF_LOCAL) continue; if (ai->ai_addr == NULL || ai->ai_addrlen == 0 || getnameinfo(ai->ai_addr, ai->ai_addrlen, diff --git a/string.c b/string.c index f7366cf99a..c77d27fba4 100644 --- a/string.c +++ b/string.c @@ -2069,6 +2069,7 @@ rb_str_split_method(argc, argv, str) if (!NIL_P(limit) && lim <= ++i) break; } end++; + if (ismbchar(*ptr)) ptr++; } } }