Re: timespec_get: Fix compilation error with MSVC 14

2022-09-04 Thread Paul Eggert
On 9/4/22 17:00, Bruno Haible wrote: But I am lazy here, as 'timespec_get' is usually not the kind of function that people will call from an extern inline function. timespec_get is so new that I wouldn't expect it to be called from anywhere. Still, this business of "static inline" for

Re: timespec_get: Fix compilation error with MSVC 14

2022-09-04 Thread Bruno Haible
Paul Eggert wrote: > > this platform's contains a 'static inline' > > definition of timespec_get > > That violates the C standard, as it means an extern inline function > cannot call timespec_get. Oh, indeed. > Shouldn't we instead fix Gnulib's timespec_get module to work around > this MSVC

Re: timespec_get: Fix compilation error with MSVC 14

2022-09-04 Thread Paul Eggert
On 9/4/22 10:15, Bruno Haible wrote: this platform's contains a 'static inline' definition of timespec_get That violates the C standard, as it means an extern inline function cannot call timespec_get. Shouldn't we instead fix Gnulib's timespec_get module to work around this MSVC 14 bug?

timespec_get: Fix compilation error with MSVC 14

2022-09-04 Thread Bruno Haible
Haible timespec_get: Fix compilation error with MSVC 14. * m4/gettime.m4 (gl_CHECK_FUNC_TIMESPEC_GET): New macro. (gl_GETTIME): Use it instead of AC_CHECK_FUNCS_ONCE. * m4/timespec_get.m4 (gl_FUNC_TIMESPEC_GET): Likewise. diff --git a/m4/gettime.m4 b/m4/gettime.m