summaryrefslogtreecommitdiff
path: root/timev.h
AgeCommit message (Collapse)Author
2018-10-08Timezone support by Time [Feature #14850]nobu
* strftime.c (rb_strftime): support timezone object by `%z`. * time.c (time_init_1, time_new_timew, time_getlocaltime): accept timezone object as `off`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64952 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-25* expand tabs.svn
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64834 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-09-25Moved `struct vtm` stuff from internal.h to timev.hnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64833 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-08-08Store String as zone in struct vtm.akr
This removes zone_table and use fstring instead. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64227 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-16timev.h: just use "unsigned int" for bitfieldsnormal
There's no point in having separate types depending on C dialect when using bitfields, "unsigned int" bitfields are bitfields anywhere. Note: we also have test_memsize in test_time.rb in case users of other platforms want to enable size assertions if they don't trust their compiler. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61870 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-01-02bit-fields other than int is a C99ismshyouhei
To be precise C90 says "A bit-field may have type int, unsigned int, or signed int". It is clear that char or enum are NG. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-25configure.in, win32/Makefile.sub: PACKED_STRUCT with VCnobu
* configure.in (PACKED_STRUCT): check VC pragma too, and make function-style macro. * win32/Makefile.sub (PACKED_STRUCT): enable with VC. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45173 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-24time: only use packed struct on x86*normal
* configure.in: define PACKED_STRUCT_UNALIGNED for x86* * timev.h (struct vtm): use PACKED_STRUCT_UNALIGNED * time.c (struct time_object): ditto [Bug #9558] non-x86 cannot safely access unaligned addresses git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45165 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-24time: rearrange+pack vtm and time_object structsnormal
struct time_object shrinks from 88 to 46 bytes on my 64-bit system. * configure.in: use -Wno-packed-bitfield-compat for GCC 4.4+ use __attribute__((packed)) if available * timev.h: shrink and pack struct vtm * time.c: pack struct time_object and adjust/introduce helpers [ruby-core:60794] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45155 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-03-30timev.h: move time_t stuffsnobu
* timev.h (TYPEOF_TIMEVAL_TV_SEC, unsigned_time_t): move from time.c. * thread.c: use definitions in timev.h. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40011 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-08-29* timev.h (TIME_SCALE): defined as 1000000000.akr
(struct vtm): subsec is replaced by subsecx. subsec * TIME_SCALE == subsecx. * time.c: avoid rational in most cases. (struct time_object): timev is replaced by timexv. timev * TIME_SCALE == timexv. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24707 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-04-21* time.c: remove time_t restriction from Time class.akr
* timev.h: new file to define struct vtm. * strftime.c: format struct vtm instead of struct tm. * ext/syck/rubyext.c (mktime_do): don't use time_t; [ruby-dev:38191] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@23242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e