This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/67114] [MinGW64] build failure with POSIX threads enabled
- From: "ralphengels at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 19 Mar 2016 01:04:18 +0000
- Subject: [Bug libstdc++/67114] [MinGW64] build failure with POSIX threads enabled
- Auto-submitted: auto-generated
- References: <bug-67114-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67114
--- Comment #20 from ralphengels at gmail dot com <ralphengels at gmail dot com> ---
Clarification.
If not using pthreads-w32
#ifdef PTW32_VERSION
// See libstdc++/67114
# define _GLIBCXX_THREAD_ID_LESS(X, Y) ((X).x < (Y).x) <- this
#endif
would end up undefined if say we build with winpthreads.
As you noticed yourself os_defines.h gets pulled in after gthr.h so it fails,
my suggestion if using a macro would be to put it in gthr_posix.h instead.
My reason for this suggestion is that gthr_posix.h gets linked to gthr.h when
building with posix threads and is visible to all parts of the code.
My patch was made for the mingw.org compiler,
since they still use pthreads-w32.
Hope this clears it up,
i was a little tired at the time of writing my last reply.