From df9199d468ffd0b0dfc669dbbb8923301a4b1d07 Mon Sep 17 00:00:00 2001 From: nobu Date: Tue, 25 Feb 2014 07:00:10 +0000 Subject: 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 --- timev.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'timev.h') diff --git a/timev.h b/timev.h index bedf9a174a..3947477630 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 -- cgit v1.2.1