On 8/25/2010 5:29 AM, Earnie wrote:
> John E. / TDM wrote:
>>  * Every C++ program would require the pthreads-w32 DLL to be
>>  distributed with it.
>
> You mean every thread enabled program would need to distribute it, 
> correct?  Wouldn't libstdc++ be coded to be conditionally dependent on 
> the threads library if it were available?  Is this any different than 
> Linux where pthreads is common?

In the case of libstdc++ being statically linked, this is mostly 
correct. We could either (A) add "-lpthread" to the G++ link spec or (B) 
omit it and let the user add it when he sees undefined references to 
pthreads functions.

The libstdc++ DLL would have a direct dependency on pthreadGC2.dll.

>>  * Every C++ program would thereby require the
>>  entire pthreads-w32 source code to be distributed with it, due to
>>  clause 4 of the LGPL.
>>
>
> Doesn't it just say you have to have the source code available for 
> delivery in the same manner as the binary in the event someone asks 
> for it?  Although it is usually good advice to distribute the source 
> for the binary with the binary to avoid having to store the source for 
> X period of time.

No, it's a bit more specific than that.

> I see no harm in a C++ program using std::thread to require pthreads-w32.

I find it distasteful for any portion of the standard runtime to 
restrict how the GCC user may distribute his binaries.

> Why not code pthreads to use Windows gthreads?  It would get wider 
> acceptance in GCC if the library normally used for threading with GCC 
> is used for the implementation.

"gthreads" is just a few source files in GCC that create a 
platform-independent interface for GCC's threading functions. It wraps 
pthreads on POSIX platforms, and WinAPI threads on Windows.

> P.S. The w32 and Win32 speak needs to be modified to be Windows.

When I say "pthreads-w32", that is the library's actual name.

-John E. / TDM

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to