diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2016-09-13 21:49:10 -0700 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2016-09-13 21:50:49 -0700 |
commit | 6625c98b469b35281bb4f562a6b86af004b71b9a (patch) | |
tree | 2b274c88375925d308a2dd2d18c8292d93bc644f /lib/parse-datetime.y | |
parent | 66786c1c03cc91ceb0d5b7df9a0797748892b4d0 (diff) | |
download | gnulib-6625c98b469b35281bb4f562a6b86af004b71b9a.tar.gz |
intprops: new macro TYPE_WIDTH
* lib/intprops.h (TYPE_WIDTH): New macro.
(TYPE_MAXIMUM, _GL_SIGNED_INT_MAXIMUM, INT_STRLEN_BOUND):
* lib/ftoastr.h (_GL_FLOAT_DIG_BITS_BOUND):
* lib/parse-datetime.y (parse_datetime2):
Use it.
Diffstat (limited to 'lib/parse-datetime.y')
-rw-r--r-- | lib/parse-datetime.y | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/parse-datetime.y b/lib/parse-datetime.y index 997895555c..51ba4cc2ce 100644 --- a/lib/parse-datetime.y +++ b/lib/parse-datetime.y @@ -2013,8 +2013,7 @@ parse_datetime2 (struct timespec *result, char const *p, long int abs_time_zone = time_zone < 0 ? - time_zone : time_zone; long int abs_time_zone_hour = abs_time_zone / 60; int abs_time_zone_min = abs_time_zone % 60; - char tz1buf[sizeof "XXX+0:00" - + sizeof pc.time_zone * CHAR_BIT / 3]; + char tz1buf[sizeof "XXX+0:00" + TYPE_WIDTH (pc.time_zone) / 3]; if (!tz_was_altered) tz0 = get_tz (tz0buf); sprintf (tz1buf, "XXX%s%ld:%02d", &"-"[time_zone < 0], |