Compiling with pthreads

David Shaw dshaw at jabberwocky.com
Fri Mar 13 13:48:10 UTC 2009


On Mar 13, 2009, at 9:18 AM, Farkas Levente wrote:

> Richard W.M. Jones wrote:
>> On Fri, Mar 13, 2009 at 09:00:19AM -0400, David Shaw wrote:
>>> Sure, that's possible.  There are half a dozen or more autoconf-ish
>>> ways to do this.  What surprises me is that this is necessary.   
>>> Isn't
>>> part of the point here to not need to make such changes for a header
>>> that is supposed to (as per POSIX) be in the main include directory,
>>> rather than a subdirectory?  It seems it would make cross- 
>>> compiling a
>>> much harder task if we need to modify code or put in special  
>>> autoconf
>>> tests to catch the cross-compiling case for something as simple  
>>> (from
>>> the outside, anyway) as pthreads.
>>
>> I think as you say if POSIX specifies it, it's a bug.  Either in our
>> package or in the upstream pthreads-win32 package.  If you file a bug
>> against it, we can resolve it [even better if you file a bug with a
>> patch!] - http://bugzilla.redhat.com/
>>
>> Having said that, you shouldn't expect programs to just compile
>> straightaway without changes.  Although we happen to support an
>> emulation of POSIX pthreads, we don't in general support POSIX at  
>> all,
>> and sometimes you have to make big changes to code to make it run
>> using our compiler -- eg. changing POSIX/libc calls to use  
>> Microsoft's
>> Win32 APIs.
>>
>> mingw32-crossreport, q.v.
>
> we can simple put it into the main include dir with in the spec file
> change from:
> install -m 0644 *.h $RPM_BUILD_ROOT%{_mingw32_includedir}/pthread
> to:
> install -m 0644 *.h $RPM_BUILD_ROOT%{_mingw32_includedir}
> and i tend to agree with david that it'd be better since it's there on
> linux too ...
> should it hurt anyone/anything?

/usr/i686-pc-mingw32/sys-root/mingw/include/pthread/ contains:

config.h  implement.h  need_errno.h  pthread.h  sched.h  semaphore.h

I worry a bit about config.h.

David




More information about the mingw mailing list