summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-03-23 04:14:31 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-03-23 04:14:31 +0000
commit6c2be430400d53832eb05d5b617e495121e9241f (patch)
tree80abe89f64ec3e762f274c6da25385fdd3bfdf1c /ext
parent8f5c38d5fd0f2ef165a71f44b9c5410d1e0743bb (diff)
2000-03-23
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_4@647 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rw-r--r--ext/dbm/extconf.rb7
-rw-r--r--ext/socket/getaddrinfo.c6
-rw-r--r--ext/socket/getnameinfo.c6
-rw-r--r--ext/tk/lib/tk.rb8
-rw-r--r--ext/tk/lib/tktext.rb2
5 files changed, 8 insertions, 21 deletions
diff --git a/ext/dbm/extconf.rb b/ext/dbm/extconf.rb
index f47287c03e..27842074e7 100644
--- a/ext/dbm/extconf.rb
+++ b/ext/dbm/extconf.rb
@@ -1,10 +1,11 @@
require 'mkmf'
dir_config("dbm")
-#if have_library("gdbm", "dbm_open")
-# gdbm = true
-#end
+if have_library("gdbm", "dbm_open")
+ gdbm = true
+else
gdbm = false
+end
gdbm or have_library("db", "dbm_open") or have_library("dbm", "dbm_open")
have_header("cdefs.h")
if have_header("ndbm.h") and have_func("dbm_open")
diff --git a/ext/socket/getaddrinfo.c b/ext/socket/getaddrinfo.c
index fbedac4cbb..0b9d9b6afc 100644
--- a/ext/socket/getaddrinfo.c
+++ b/ext/socket/getaddrinfo.c
@@ -130,12 +130,6 @@ static struct afd {
#define PTON_MAX 4
#endif
-#ifndef INET6
-#ifndef NT
-extern int h_errno;
-#endif
-#endif
-
static int get_name __P((const char *, struct afd *,
struct addrinfo **, char *, struct addrinfo *,
int));
diff --git a/ext/socket/getnameinfo.c b/ext/socket/getnameinfo.c
index 774177c8c1..60bd71bac6 100644
--- a/ext/socket/getnameinfo.c
+++ b/ext/socket/getnameinfo.c
@@ -64,12 +64,6 @@
#include "addrinfo.h"
#include "sockport.h"
-#ifndef INET6
-#ifndef NT
-extern int h_errno;
-#endif
-#endif
-
#define SUCCESS 0
#define ANY 0
#define YES 1
diff --git a/ext/tk/lib/tk.rb b/ext/tk/lib/tk.rb
index c344a2bf8e..107165f8ba 100644
--- a/ext/tk/lib/tk.rb
+++ b/ext/tk/lib/tk.rb
@@ -1062,15 +1062,13 @@ module TkSelection
tk_call 'selection', 'get', type
end
def TkSelection.handle(win, func, type=None, format=None)
- id = install_cmd(func)
- tk_call 'selection', 'handle', win.path, id, type, format
+ tk_call 'selection', 'handle', win.path, func, type, format
end
def handle(func, type=None, format=None)
TkSelection.handle self, func, type, format
end
- def TkSelection.own(win, func=None)
- id = install_cmd(func)
- tk_call 'selection', 'own', win.path, id
+ def TkSelection.own(win=None, func=None)
+ window(tk_call 'selection', 'own', win, func)
end
def own(func=None)
TkSelection.own self, func
diff --git a/ext/tk/lib/tktext.rb b/ext/tk/lib/tktext.rb
index 7872e6a078..9e38db5032 100644
--- a/ext/tk/lib/tktext.rb
+++ b/ext/tk/lib/tktext.rb
@@ -132,7 +132,7 @@ class TkText<TkTextWin
WidgetClassName
end
- def self.new(*args)
+ def self.new(*args, &block)
obj = super(*args){}
obj.init_instance_variable
obj.instance_eval &block if defined? yield