diff options
author | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-09-08 12:59:08 +0000 |
---|---|---|
committer | eban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-09-08 12:59:08 +0000 |
commit | 73d4f4b0bbe7918134fc2d687298af0181a5030d (patch) | |
tree | 3c5975217964388c44d7df879a8c5d8a4cff661d | |
parent | 58d69379c19db540c4a9692c0d6dba75668e7629 (diff) |
* time.c (time_free): prototype; struct time_object -> void *.
avoid GCC warnings.
* lib/mkmf.rb, ext/extmk.rb ($LINK, $CPP): move to lib/mkmf.rb.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2826 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | ext/extmk.rb | 10 | ||||
-rw-r--r-- | lib/mkmf.rb | 8 | ||||
-rw-r--r-- | time.c | 4 |
4 files changed, 17 insertions, 12 deletions
@@ -1,3 +1,10 @@ +Sun Sep 8 21:29:25 2002 WATANABE Hirofumi <eban@ruby-lang.org> + + * time.c (time_free): prototype; struct time_object -> void *. + avoid GCC warnings. + + * lib/mkmf.rb, ext/extmk.rb ($LINK, $CPP): move to lib/mkmf.rb. + Sun Sep 8 19:02:28 2002 NAKAMURA Usaku <usa@ruby-lang.org> * time.c: prototype; time_free() to avoid VC++ warnings. diff --git a/ext/extmk.rb b/ext/extmk.rb index 77757dc830..ca46e25beb 100644 --- a/ext/extmk.rb +++ b/ext/extmk.rb @@ -32,19 +32,17 @@ $extlist = [] $:.replace ["."] require 'rbconfig' -$top_srcdir = Config::CONFIG["srcdir"] +srcdir = Config::CONFIG["srcdir"] -$:.replace [$top_srcdir, $top_srcdir+"/lib", "."] +$:.replace [srcdir, srcdir+"/lib", "."] require 'mkmf' require 'find' require 'ftools' require 'shellwords' -$topdir = File.expand_path(".") - -$LINK = "#{CONFIG['CC']} #{OUTFLAG}conftest -I#$topdir -I#$top_srcdir #{CFLAGS} %s %s #{CONFIG['LDFLAGS']} %s conftest.c %s %s #{CONFIG['LIBS']}" -$CPP = "#{CONFIG['CPP']} #{CONFIG['CPPFLAGS']} %s -I#$topdir -I#$top_srcdir #{CFLAGS} %s %s %s conftest.c" +$topdir = $hdrdir = File.expand_path(".") +$top_srcdir = srcdir Object.class_eval do remove_method :create_makefile end diff --git a/lib/mkmf.rb b/lib/mkmf.rb index a0e01c47c7..fb2ce78ee7 100644 --- a/lib/mkmf.rb +++ b/lib/mkmf.rb @@ -68,7 +68,7 @@ else STDERR.print "can't find header files for ruby.\n" exit 1 end -$topdir = $hdrdir +$topdir = $top_srcdir = $hdrdir # $hdrdir.gsub!('/', '\\') if RUBY_PLATFORM =~ /mswin32|bccwin32/ CFLAGS = CONFIG["CFLAGS"] @@ -89,9 +89,9 @@ else CPPOUTFILE = '-o conftest.i' end -$LINK = "#{CONFIG['CC']} #{OUTFLAG}conftest -I#{$hdrdir} #{CFLAGS} %s %s #{CONFIG['LDFLAGS']} %s conftest.c %s %s #{CONFIG['LIBS']}" -$CC = "#{CONFIG['CC']} -c #{CONFIG['CPPFLAGS']} %s -I#{$hdrdir} #{CFLAGS} %s %s conftest.c" -$CPP = "#{CONFIG['CPP']} #{CONFIG['CPPFLAGS']} %s -I#{$hdrdir} #{CFLAGS} %s %s %s conftest.c" +$LINK = "#{CONFIG['CC']} #{OUTFLAG}conftest -I#{$hdrdir} -I#{$top_srcdir} #{CFLAGS} %s %s #{CONFIG['LDFLAGS']} %s conftest.c %s %s #{CONFIG['LIBS']}" +$CC = "#{CONFIG['CC']} -c #{CONFIG['CPPFLAGS']} %s -I#{$hdrdir} -I#{$top_srcdir} #{CFLAGS} %s %s conftest.c" +$CPP = "#{CONFIG['CPP']} #{CONFIG['CPPFLAGS']} %s -I#{$hdrdir} -I#{$top_srcdir} #{CFLAGS} %s %s %s conftest.c" def rm_f(*files) targets = [] @@ -43,11 +43,11 @@ struct time_object { #define GetTimeval(obj, tobj) \ Data_Get_Struct(obj, struct time_object, tobj) -static void time_free _((struct time_object *)); +static void time_free _((void *)); static void time_free(tobj) - struct time_object *tobj; + void *tobj; { if (tobj) free(tobj); } |