[RFC 00/12] [RFC] y2038: Convert timespec_{sub|add|create} in support to be Y2038 safe

Lukasz Majewski lukma@denx.de
Wed Jun 3 11:42:03 GMT 2020

Hi Joseph,

> On Mon, 1 Jun 2020, Lukasz Majewski wrote:
> > First timespec* functions are renamed to have common "__" prefix
> > for internal functions. This is a preparatory work for further
> > conversion.  
> Leading "__" is *only* needed when the name is used in contexts where
> it could conflict with a user identifier.  For example, in installed
> headers or with external linkage.
> In particular, static inline functions in non-installed headers never
> need a leading "__".  So there is no justification for renaming 
> timespec_compare unless you plan to make it an extern, non-inline 
> function, in which case you should say so explicitly in that patch's 
> commit message.
> xclock_gettime is inherently unsuitable for use in installed
> libraries, because it exits (FAIL_EXIT1) on error, which is not
> suitable for library code.  So there is no need to rename that
> function; any installed library code that uses it has to be fixed not
> to use it and instead to do appropriate error checks on the result of
> clock_gettime (returning an error from the caller if appropriate)
> itself; library code should almost never exit the process on error.
> Likewise xclock_now, because it calls xclock_gettime, must not be
> used in installed libraries.
> These function naming changes are only appropriate for external
> linkage functions whose semantics are appropriate for use in
> installed libraries and that are actually used in such libraries or
> that you intend to be used in such libraries.  Please review all
> those changes to make sure that you don't rename functions for which
> such library use is not appropriate or not planned.

Thanks for very detailed explanation. Considering the above arguments -
there is no point in converting timespec_* and xclock_* functions as
those are only used internally in glibc - either as helper functions or
for writing tests.

I will drop patches 02-07.

Best regards,

Lukasz Majewski


DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 488 bytes
Desc: OpenPGP digital signature
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20200603/ba346d46/attachment.sig>

More information about the Libc-alpha mailing list