The <pthreads.h> shipped with pthreads-win32 is horribly broken; it pollutes the global namespace with more than just bad macros (such as the incorrect macros for asctime_r that we are already working around in time.in.h), but also by including a <config.h> specific to how pthreads-win32 was configured, which may clash horribly with how the current package is being compiled.
Rather than making our <time.h> drag in the botched pthreads-win32 header just for struct timespec, is there a way that we can instead keep the namespace clean by providing our own struct timespec, and then take stronger measures in our <pthread.h> replacement to work around the broken <pthread.h> header without penalizing packages like libvirt that intentionally avoid pthreads-win32 for other reasons? It looks like the pthreads-win32 will avoid declaring struct timespec if HAVE_STRUCT_TIMESPEC is already defined; therefore, it seems like our replacement <time.h> could define this macro, and our replacement <pthread.h> could be sure that our replacement <time.h> is included _prior_ to the include_next of the system <pthread.h> (for just mingw). -- Eric Blake ebl...@redhat.com +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature