summaryrefslogtreecommitdiff
path: root/timev.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-25 07:00:10 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-02-25 07:00:10 +0000
commitdf9199d468ffd0b0dfc669dbbb8923301a4b1d07 (patch)
tree7e3714b240777b2637cdfecadc8741daa09e87d9 /timev.h
parent7af1261dc8478fde09aa7ed0c9052c03917f2c18 (diff)
configure.in, win32/Makefile.sub: PACKED_STRUCT with VC
* 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
Diffstat (limited to 'timev.h')
-rw-r--r--timev.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/timev.h b/timev.h
index bedf9a1..3947477 100644
--- a/timev.h
+++ b/timev.h
@@ -1,7 +1,7 @@
#ifndef RUBY_TIMEV_H
#define RUBY_TIMEV_H
-struct vtm {
+PACKED_STRUCT_UNALIGNED(struct vtm {
VALUE year; /* 2000 for example. Integer. */
VALUE subsecx; /* 0 <= subsecx < TIME_SCALE. possibly Rational. */
VALUE utc_offset; /* -3600 as -01:00 for example. possibly Rational. */
@@ -14,7 +14,7 @@ struct vtm {
uint8_t sec:6; /* 0..60 */
uint8_t wday:3; /* 0:Sunday, 1:Monday, ..., 6:Saturday 7:init */
uint8_t isdst:2; /* 0:StandardTime 1:DayLightSavingTime 3:init */
-} PACKED_STRUCT_UNALIGNED;
+});
#define TIME_SCALE 1000000000