在 2025-4-19 21:45, Kirill Makurin 写道:
`SIZEOF_TIME_T` is defined in config.h as the result of `AC_CHECK_SIZEOF(time_t)` added to configure.ac. (I did not included result from running `autoreconf` in the patches).

Thanks for noticing usage of `inline`, I think it also makes sense for existing 
`WINPTHREADS_INLINE `.

The `WINPTHREAD_DBG` seems to be used to enable some additional debug output. I didn't notice that function protected with this macro are not used at all. I think we're good to get rid of this macro?

In source files we can check for `_USE_32BIT_TIME_T`.

I kinda think it's not correct to use configure to check for size of `time_t`, as it's part of ABI and can't be changed; had better be hard-coded.


Reuse of inline definitions should be possible, I think. If not the libtool issue, I would prefer to have a .def file which has something like this

DEF is for the shared library only, so doesn't seem an option.


I also forgot to mention setting of `errno` to `ERANGE` in clock_gettime32 if time does not fit in 32bit time_t. Is there any better `errno` value for this?

https://pubs.opengroup.org/onlinepubs/9799919799/functions/clock_gettime.html

   The clock_gettime() function shall fail if:

   [EOVERFLOW]
   The number of seconds will not fit in an object of type time_t.


--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to