This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [RFC 2/7] y2038: Provide conversion helpers for struct __timespec64
- From: Joseph Myers <joseph at codesourcery dot com>
- To: Lukasz Majewski <lukma at denx dot de>
- Cc: <libc-alpha at sourceware dot org>, Paul Eggert <eggert at cs dot ucla dot edu>, Zack Weinberg <zackw at panix dot com>
- Date: Wed, 27 Mar 2019 13:43:03 +0000
- Subject: Re: [RFC 2/7] y2038: Provide conversion helpers for struct __timespec64
- References: <20190327085210.22019-1-lukma@denx.de> <20190327085210.22019-3-lukma@denx.de>
On Wed, 27 Mar 2019, Lukasz Majewski wrote:
> Those functions allow easy conversion between Y2038 safe struct __timespec64
> and other time related data structures.
Please include a detailed comment explaining whether these functions are
relevant (but trivial) in the case where the default time_t is 32-bit.
If not, they shouldn't be compiled in that case.
> +/* Check if a value lies with the valid nanoseconds range. */
> +#define IS_VALID_NANOSECONDS(ns) (ns >= 0 && ns <= 999999999)
Surround macro arguments with parentheses so arbitrary expressions are
valid.
--
Joseph S. Myers
joseph@codesourcery.com