[PATCH v3] y2038: Replace __clock_gettime with __clock_gettime64
Florian Weimer
fweimer@redhat.com
Wed May 27 12:50:14 GMT 2020
* H. J. Lu:
> On Wed, May 27, 2020 at 5:44 AM Florian Weimer <fweimer@redhat.com> wrote:
>>
>> * Andreas Schwab:
>>
>> > I don't think it make sense for benchtests to define _ISMAC if it uses
>> > glibc internal interfaces.
>>
>> We have some internal interfaces that are available for !_ISOMAC,
>> e.g. pretty much the entire support/ directory.
>>
>> I assume this is about <hp-timing.h>? We could decide that it should be
>> in this category as well.
>
> To be precise, it is sysdeps/generic/hp-timing.h:
>
> #define HP_TIMING_NOW(var) \
> ({ \
> struct __timespec64 tv; \
> __clock_gettime64 (CLOCK_MONOTONIC, &tv); \
> (var) = (tv.tv_nsec + UINT64_C(1000000000) * tv.tv_sec); \
> })
Okay, then we could add an #ifdef _ISOMAC and use clock_gettime outside
glibc. Temporarily, until we have clock_gettime64 available outside
glibc, too.
Or would that be too awkward?
Thanks,
Florian
More information about the Libc-alpha
mailing list