зеркало из https://github.com/github/ruby.git
* 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:
Родитель
58d69379c1
Коммит
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>
|
||||
|
||||
* time.c: prototype; time_free() to avoid VC++ warnings.
|
||||
|
|
10
ext/extmk.rb
10
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
|
||||
|
||||
|
|
|
@ -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 = []
|
||||
|
|
4
time.c
4
time.c
|
@ -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);
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче