[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
struct timespec on mingw vs. pthreads-win32
From: |
Eric Blake |
Subject: |
struct timespec on mingw vs. pthreads-win32 |
Date: |
Tue, 02 Nov 2010 16:28:32 -0600 |
User-agent: |
Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.12) Gecko/20101027 Fedora/3.1.6-1.fc13 Mnenhy/0.8.3 Thunderbird/3.1.6 |
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 address@hidden +1-801-349-2682
Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- struct timespec on mingw vs. pthreads-win32,
Eric Blake <=