X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 	tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <49F82327.4090400@gmail.com>
Date: Wed, 29 Apr 2009 10:51:35 +0100
From: Dave Korn <dave.korn.cygwin@googlemail.com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: GCC 4.4.0 - Can't activate threading support
References: <23292063.post@talk.nabble.com> <49F817C2.2000908@gmail.com> <23293465.post@talk.nabble.com> <49F81E85.3080802@gmail.com>
In-Reply-To: <49F81E85.3080802@gmail.com>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

Dave Korn wrote:
> Casull wrote:
>> The GCC 4.4 implementation of std::thread is guarded by the
>> following preprocessing directive:
>>
>>    #if defined(_GLIBCXX_HAS_GTHREADS) &&
>> defined(_GLIBCXX_USE_C99_STDINT_TR1)
>>
>> When looking at the bits/c++config.h, _GLIBCXX_USE_C99_STDINT_TR1 is defined
>> but _GLIBCXX_HAS_GTHREADS isn't.
> 
>   Ah.  There is an autoconf test in libstdc++-v3 that defines that, and the
> comment says:
> 
>> dnl Check if gthread implementation defines the types and functions
>> dnl required by the c++0x thread library.  Conforming gthread
>> dnl implementations can define __GTHREADS_CXX0X to enable use with c++0x.

  It fails because :

// In case of POSIX threads check _POSIX_TIMEOUTS too.
#if (defined(_PTHREADS) && (!defined(_POSIX_TIMEOUTS) || _POSIX_TIMEOUTS <= 0))
#error
#endif


... we don't have any definition of _POSIX_TIMEOUTS.  That's a feature test
macro the exact definition of which I haven't found yet, but from libstdc's
point of view, it appears to mean that the pthread_mutex_timedlock function is
supported.  Which indeed Cygwin doesn't currently implement.

http://www.opengroup.org/onlinepubs/009695399/functions/pthread_mutex_timedlock.html

  Looks like it wouldn't be too hard to add, PTC I suppose.

    cheers,
      DaveK


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

