This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
Re: [PATCH] Add timegm POSIX call [updated]
- From: Brian Inglis <Brian dot Inglis at SystematicSw dot ab dot ca>
- To: newlib at sourceware dot org
- Date: Wed, 22 Aug 2018 17:37:07 -0600
- Subject: Re: [PATCH] Add timegm POSIX call [updated]
- References: <CAEFwyTN5cr1gUcZzBKwid4iy9iyrz6Tj1XW19UJ=j5b_xWnKzA@mail.gmail.com> <1a825c342a2f5fb16042de5d0d303ffd8167f73c.camel@op.pl>
- Reply-to: Brian dot Inglis at SystematicSw dot ab dot ca
On 2018-08-22 15:02, Freddie Chopin wrote:
> On Wed, 2018-08-22 at 12:12 -0700, Andrew Russell via newlib wrote:
>> -static const int DAYS_IN_MONTH[12] =
>> +static const int_least16_t DAYS_IN_MONTH[12] =
>> {31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31};
>
> Shouldn't the type here be actually int_least8_t and int_least16_t used
> here ->
or uint_least{8,16}_t?
>> @@ -58,11 +61,21 @@ static const int DAYS_IN_MONTH[12] =
>> static const int _DAYS_BEFORE_MONTH[12] =
>> {0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334};
and initialization use {U}INT{8,16}_C(value) macros?
--
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada