* 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
This commit is contained in:
parent
58d69379c1
commit
73d4f4b0bb
@ -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>
|
Sun Sep 8 19:02:28 2002 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||||
|
|
||||||
* time.c: prototype; time_free() to avoid VC++ warnings.
|
* time.c: prototype; time_free() to avoid VC++ warnings.
|
||||||
|
10
ext/extmk.rb
10
ext/extmk.rb
@ -32,19 +32,17 @@ $extlist = []
|
|||||||
$:.replace ["."]
|
$:.replace ["."]
|
||||||
require 'rbconfig'
|
require 'rbconfig'
|
||||||
|
|
||||||
$top_srcdir = Config::CONFIG["srcdir"]
|
srcdir = Config::CONFIG["srcdir"]
|
||||||
|
|
||||||
$:.replace [$top_srcdir, $top_srcdir+"/lib", "."]
|
$:.replace [srcdir, srcdir+"/lib", "."]
|
||||||
|
|
||||||
require 'mkmf'
|
require 'mkmf'
|
||||||
require 'find'
|
require 'find'
|
||||||
require 'ftools'
|
require 'ftools'
|
||||||
require 'shellwords'
|
require 'shellwords'
|
||||||
|
|
||||||
$topdir = File.expand_path(".")
|
$topdir = $hdrdir = File.expand_path(".")
|
||||||
|
$top_srcdir = srcdir
|
||||||
$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"
|
|
||||||
|
|
||||||
Object.class_eval do remove_method :create_makefile end
|
Object.class_eval do remove_method :create_makefile end
|
||||||
|
|
||||||
|
@ -68,7 +68,7 @@ else
|
|||||||
STDERR.print "can't find header files for ruby.\n"
|
STDERR.print "can't find header files for ruby.\n"
|
||||||
exit 1
|
exit 1
|
||||||
end
|
end
|
||||||
$topdir = $hdrdir
|
$topdir = $top_srcdir = $hdrdir
|
||||||
# $hdrdir.gsub!('/', '\\') if RUBY_PLATFORM =~ /mswin32|bccwin32/
|
# $hdrdir.gsub!('/', '\\') if RUBY_PLATFORM =~ /mswin32|bccwin32/
|
||||||
|
|
||||||
CFLAGS = CONFIG["CFLAGS"]
|
CFLAGS = CONFIG["CFLAGS"]
|
||||||
@ -89,9 +89,9 @@ else
|
|||||||
CPPOUTFILE = '-o conftest.i'
|
CPPOUTFILE = '-o conftest.i'
|
||||||
end
|
end
|
||||||
|
|
||||||
$LINK = "#{CONFIG['CC']} #{OUTFLAG}conftest -I#{$hdrdir} #{CFLAGS} %s %s #{CONFIG['LDFLAGS']} %s conftest.c %s %s #{CONFIG['LIBS']}"
|
$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} #{CFLAGS} %s %s conftest.c"
|
$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} #{CFLAGS} %s %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)
|
def rm_f(*files)
|
||||||
targets = []
|
targets = []
|
||||||
|
4
time.c
4
time.c
@ -43,11 +43,11 @@ struct time_object {
|
|||||||
#define GetTimeval(obj, tobj) \
|
#define GetTimeval(obj, tobj) \
|
||||||
Data_Get_Struct(obj, struct time_object, tobj)
|
Data_Get_Struct(obj, struct time_object, tobj)
|
||||||
|
|
||||||
static void time_free _((struct time_object *));
|
static void time_free _((void *));
|
||||||
|
|
||||||
static void
|
static void
|
||||||
time_free(tobj)
|
time_free(tobj)
|
||||||
struct time_object *tobj;
|
void *tobj;
|
||||||
{
|
{
|
||||||
if (tobj) free(tobj);
|
if (tobj) free(tobj);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user