summaryrefslogtreecommitdiff
path: root/ext/dl
diff options
context:
space:
mode:
authorH_Konishi <H_Konishi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-11 01:27:48 +0000
committerH_Konishi <H_Konishi@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-06-11 01:27:48 +0000
commitd0b3651906aa943423e430a61437a42f7dd39422 (patch)
tree9d8c8beee149c50f44406ee8cd6dee4c3913c28f /ext/dl
parentceade7b9268e9620b123843afeb25a7136f8a576 (diff)
new platform [bccwin32] merged.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2543 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext/dl')
-rw-r--r--ext/dl/depend8
-rw-r--r--ext/dl/dl.c2
-rw-r--r--ext/dl/extconf.rb15
-rw-r--r--ext/dl/sym.c2
4 files changed, 21 insertions, 6 deletions
diff --git a/ext/dl/depend b/ext/dl/depend
index 552c67d0f50..313fac43a7f 100644
--- a/ext/dl/depend
+++ b/ext/dl/depend
@@ -6,19 +6,19 @@ LDSHARED_TEST = $(LDSHARED) $(LDFLAGS) test/test.o -o test/libtest.so $(LOCAL_LI
libtest.so: test/libtest.so
test/libtest.so: test/test.o test/libtest.def
- $(RUBY) -rftools -e 'ARGV.each{|d|File.mkpath(File.dirname(d))}' $@
+ $(RUBY) -rftools -e 'ARGV.each do|d|File.mkpath(File.dirname(d))end' $@
$(LDSHARED_TEST:dl.def=test/libtest.def)
test/test.o: $(srcdir)/test/test.c
@$(RUBY) -rftools -e 'File.mkpath(*ARGV)' test
$(CC) $(CFLAGS) $(CPPFLAGS) -c $(srcdir)/test/test.c -o $@
-test:: dl.so libtest.so .force
+test:: dl.so libtest.so force
$(RUBY) -I. -I$(srcdir)/lib $(srcdir)/test/test.rb
-.force:
+force:
-.PHONY: .force test
+.PHONY: force test
allclean: distclean
@rm -f $(CLEANFILES) $(DISTCLEANFILES)
diff --git a/ext/dl/dl.c b/ext/dl/dl.c
index 935ae33e323..dd4f4423b5b 100644
--- a/ext/dl/dl.c
+++ b/ext/dl/dl.c
@@ -626,7 +626,7 @@ rb_dl_callback(int argc, VALUE argv[], VALUE self)
rb_assoc_new(INT2NUM(rettype),INT2NUM(entry)),
rb_assoc_new(type,proc));
sprintf(fname, "rb_dl_callback_func_%d_%d", rettype, entry);
- return rb_dlsym_new(rb_dl_callback_table[rettype][entry], fname, STR2CSTR(type));
+ return rb_dlsym_new((void (*)())rb_dl_callback_table[rettype][entry], fname, STR2CSTR(type));
}
static VALUE
diff --git a/ext/dl/extconf.rb b/ext/dl/extconf.rb
index 7b7c48f1a2a..46b3c6c87dc 100644
--- a/ext/dl/extconf.rb
+++ b/ext/dl/extconf.rb
@@ -176,6 +176,21 @@ $INSTALLFILES = [
["dl.h", "$(archdir)$(target_prefix)", ""],
]
+if /bccwin32/ =~ RUBY_PLATFORM
+ srcdir = $top_srcdir + "/ext/dl/"
+ if !FileTest.exist?( srcdir+"dl.def.org" )
+ File.copy( srcdir+"dl.def", srcdir+"dl.def.org" )
+ open( srcdir+"dl.def.org" ){ |f|
+ open( "dl.def", "w" ) { |g|
+ g.print f.gets
+ while line = f.gets
+ g.print "_", line
+ end
+ }
+ }
+ end
+end
+
create_makefile('dl')
rescue SystemExit
# do nothing
diff --git a/ext/dl/sym.c b/ext/dl/sym.c
index bc51ebe102d..3326d6743fa 100644
--- a/ext/dl/sym.c
+++ b/ext/dl/sym.c
@@ -140,7 +140,7 @@ rb_dlsym_s_new(int argc, VALUE argv[], VALUE self)
sname = NIL_P(name) ? NULL : StringValuePtr(name);
stype = NIL_P(type) ? NULL : StringValuePtr(type);
- val = rb_dlsym_new(saddr, sname, stype);
+ val = rb_dlsym_new((void (*)())saddr, sname, stype);
if( val != Qnil ){
rb_obj_call_init(val, argc, argv);