On 07/08/16 12:03, zjuzw wrote:
> I know that someone has asked the same question before.
Yes, it's been discussed to death, in various pthreads-win32 fora.
> In my opinion, just deleting the definition of this structure in
> the header file ... could be valid for resolving this problem.
Sure ... until you stumble into a use-case where it's needed.
What version of pthreads-win32 are you using? The proper solution is
to run configure-time tests, to determine if the definition is
actually required, rather than just making arbitrary, and potentially
incorrect assumptions, (as pthread-w32-2.9.x did). Anyway, this is
not a MinGW issue; it is a pthreads-win32 (a.k.a. pthreads4w) issue,
and it is already fixed in their (upstream) git repository.
I plan to publish an updated MinGW specific build, based on their
current repository, but with much of their undesirable public header
pollution filtered out. This will reflect the local build I've used,
when I built gcc-5.3.0-mingw32, but I'm making no promises regarding
when I may get around to packaging it for publication.
Public key available from keys.gnupg.net
Key fingerprint: C19E C018 1547 DE50 E1D4 8F53 C0AD 36C6 347E 5A3F
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.20 (GNU/Linux)
Thanks for your so quickly reply.The version of my pthreads-win32 is 2.9.1.
I still have two questions:
(1) How to run configure-time tests, to determine if the definition is actually required.
(2) Just as you said,pthreads-win32 is already fixed in their git repository.The corresponding website I've found is https://github.com/GerHobbelt/pthread-win32.Is it valid to substitute my pthread.h for the new one?