summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-17 05:03:43 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-01-17 05:03:43 +0000
commit377b18956260db3a5755695cfd755ce1116784a3 (patch)
tree451f7ec727ed7b60dd873e67043218d5fb7393cd
parentd611e071fe4134a57fef357461f5484df175cd7f (diff)
time.c: use "unsigned int" for bitfields
Followup to r61870 git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--time.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/time.c b/time.c
index f39fb47c9b..2b5721898c 100644
--- a/time.c
+++ b/time.c
@@ -1597,18 +1597,12 @@ localtimew(wideval_t timew, struct vtm *result)
return result;
}
-#if defined(__STDC_VERSION__) && (__STDC_VERSION__ >= 199901L)
-#define bits_t uint8_t
-#else
-#define bits_t unsigned int
-#endif
PACKED_STRUCT_UNALIGNED(struct time_object {
wideval_t timew; /* time_t value * TIME_SCALE. possibly Rational. */
struct vtm vtm;
- bits_t gmt:3; /* 0:localtime 1:utc 2:fixoff 3:init */
- bits_t tm_got:1;
+ unsigned int gmt:3; /* 0:localtime 1:utc 2:fixoff 3:init */
+ unsigned int tm_got:1;
});
-#undef bits_t
#define GetTimeval(obj, tobj) ((tobj) = get_timeval(obj))
#define GetNewTimeval(obj, tobj) ((tobj) = get_new_timeval(obj))