Compiling with pthreads

Farkas Levente lfarkas at lfarkas.org
Fri Mar 13 13:18:17 UTC 2009


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?


-- 
  Levente                               "Si vis pacem para bellum!"



More information about the mingw mailing list