ruby-cvs:21205
From: akr ruby-lang.org
Date: Mon, 19 Nov 2007 18:09:39 +0900 (JST)
Subject: [ruby-cvs:21205] Ruby:r13968 (trunk): * configure.in: check struct timespec, clock_gettime, utimensat,
akr 2007-11-19 18:09:38 +0900 (Mon, 19 Nov 2007)
New Revision: 13968
Modified files:
trunk/ChangeLog
trunk/configure.in
trunk/file.c
trunk/include/ruby/intern.h
trunk/include/ruby/missing.h
trunk/lib/time.rb
trunk/marshal.c
trunk/test/ruby/test_time.rb
trunk/test/yaml/test_yaml.rb
trunk/time.c
trunk/variable.c
Log:
* configure.in: check struct timespec, clock_gettime, utimensat,
struct stat.st_atim,
struct stat.st_atimespec,
struct stat.st_atimensec,
struct stat.st_mtim,
struct stat.st_mtimespec,
struct stat.st_mtimensec,
struct stat.st_ctim,
struct stat.st_ctimespec,
struct stat.st_ctimensec.
* include/ruby/missing.h: provide struct timespec if not available.
* time.c: support nanosecond-resolution using struct timespec.
* include/ruby/intern.h: provide rb_time_nano_new.
* file.c (utime_internal): use utimensat if available.
(rb_file_s_utime): refactored.
(rb_f_test): use stat_atime, stat_mtime, stat_ctime.
(rb_stat_cmp): check tv_nsec.
(stat_atimespec): new function.
(stat_atime): ditto.
(stat_mtimespec): ditto.
(stat_mtime): ditto.
(stat_ctimespec): ditto.
(stat_ctime): ditto.
(rb_stat_atime): use stat_atime.
(rb_file_s_atime): ditto.
(rb_file_atime): ditto.
(rb_stat_mtime): use stat_mtime.
(rb_file_s_mtime): ditto.
(rb_file_mtime): ditto.
(rb_file_ctime): use stat_ctime.
(rb_file_s_ctime): ditto.
(rb_stat_ctime): ditto.
* variable.c (rb_copy_generic_ivar): clear clone's instance variables
if obj has no instance variable.
* marshal.c (w_object): dump instance variables of generated string
for TYPE_USERDEF, even if original object has instance variables.
* lib/time.rb (Time#xmlschema): use nsec instead of usec.
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/time.c?r1=13968&r2=13967
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/variable.c?r1=13968&r2=13967
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/lib/time.rb?r1=13968&r2=13967
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/file.c?r1=13968&r2=13967
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/include/ruby/missing.h?r1=13968&r2=13967
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=13968&r2=13967
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/yaml/test_yaml.rb?r1=13968&r2=13967
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/test/ruby/test_time.rb?r1=13968&r2=13967
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/marshal.c?r1=13968&r2=13967
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/configure.in?r1=13968&r2=13967
http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/include/ruby/intern.h?r1=13968&r2=13967