Closed brechtsanders closed 3 years ago
It looks like the cleanups have exposed a few pre-existing issues.
Someone renamed LIST_HEAD
to FIXME_LIST_HEAD
in queue.h to avoid a conflict with Linux macros. That's no longer needed because we no longer include queue.h
for Linux, only on platforms which actually need it.
That call to pthread_mutex_init
with a single parameter has been there since at least April 2019 with a single parameter... The compatibility macro definitely takes two arguments... I'm confused as to how this used to work.
pthread_mutexattr_t
isn't needed for Windows because all locks are recursive by default. I've ifdefd it out, along with the initialisation calls.
I was able to build libkqueue 2.4.0 for Windows with MinGW-w64, but when building libkqueue 2.5.0 there are multiple problems:
LIST_HEAD
is not defined on this platform but it is used insrc/common/private.h
to definekf_ready
pthread.h
, butsrc/windows/platform.h
redefines it anyway, but it's not working:pthread_mutexattr_t
is used insrc/common/private.h
but it's not defined anywheresrc/windows/platform.h
definespthread_mutex_init
with 2 parameters, butsrc/common/kqueue.c
calls it with only 1