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 --- time.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'time.c') diff --git a/time.c b/time.c index acd589a8fc..1539feb587 100644 --- a/time.c +++ b/time.c @@ -1740,12 +1740,12 @@ localtimew(wideval_t timew, struct vtm *result) return result; } -struct time_object { +PACKED_STRUCT_UNALIGNED(struct time_object { wideval_t timew; /* time_t value * TIME_SCALE. possibly Rational. */ struct vtm vtm; uint8_t gmt:3; /* 0:utc 1:localtime 2:fixoff 3:init */ uint8_t tm_got:1; -} PACKED_STRUCT_UNALIGNED; +}); #define GetTimeval(obj, tobj) ((tobj) = get_timeval(obj)) #define GetNewTimeval(obj, tobj) ((tobj) = get_new_timeval(obj)) -- cgit v1.2.3