Re: [Jack-Devel] Problem using Jack2 with MinGW and pthreads
On Mon, Feb 21, 2011 at 10:03:24AM +0000, Peter Nelson wrote:
> On Mon, 2011-02-21 at 19:52 +1000, Tim Mayberry wrote:
> > I've been working on porting an existing application to windows using
> > the MinGW compiler. The application uses both pthreads via
> > (http://sourceware.org/pthreads-win32) and the jack API via jack2
> >
> > The problem I'm having(I think) is that pthread_t is getting redefined
> > via jack/systemdeps.h
> >
> > The relevant section:
> >
> > #elif __MINGW32__ /* MINGW */
> > #include <stdint.h>
> > #include <sys/types.h>
> > #ifndef pthread_t
> > typedef HANDLE pthread_t;
> > #endif
> > #else
>
> #ifndef pthread_t seems bogus to me. pthread_t will be a type, not a
> preprocessor definition.
>
> Does commenting out the typedef help?
on the long run jack api should not contain a reference to pthread_t
i suggest changing it to jack_native_thread_t or somthing.
this doesnt completely solve the problem. but it should get us almost
there.
jack_native_thread_t would be HANDLE on windows.
how to map a pthreads-win32 pthread_t to a HANDLE might be the problem
we need to solve afterwards.
but this is an application specific problem then. and not jacks problem.
--
torben Hohn
1298289631.13586_0.ltw:2,a <20110221115955.GA5314 at siel dot b>