在 2025-02-09 03:18, Kirill Makurin 写道:
I think the idea of including pthread_time.h through pthread_compat.h from pthread.h is to make `clock_gettime` and other time functions available for MSVC users without explicitly including pthread_time.h, which is a non-standard header file.

Declaration of `clockid_t` in pthread_compat.h may be removed since it is also declared in both pthread_time.h and pthread.h anyway. Some functions in pthread.h and sched.h have an argument of type `pid_t` and this type is not declared in Microsoft header files.

We could move definition of `WINPTHREAD_API ` in pthread.h just above `#include "pthread_compat.h"` to not duplicate it in pthread_time.h, but I think it could be useful to make pthread_time.h usable on its own.

This makes sense. However, wouldn't a more reasonable choice is to `#include "pthread_compat.h"` in pthread_time.h, not the other way around?



--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
Mingw-w64-public@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to