This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] Default to --enable-libstdcxx-time=auto


On 28 May 2013 18:39, Steve Ellcey wrote:
> On Tue, 2013-05-28 at 17:29 +0100, Jonathan Wakely wrote:
>
>>
>> I don't think it was my patch that broke it, because
>> compatibility-chrono.cc didn't exist when my patch went in  :-)
>
> Sorry about that, I guess I got lost in a maze of twisty checkins.

Well the later checkins were Jakub and Benjamin fixing the unexpected
fallout from my one, so it was all related.

>> Does this help?
>>
>> --- src/c++11/compatibility-chrono.cc.orig      2013-05-28
>> 17:27:54.631919423 +0100
>> +++ src/c++11/compatibility-chrono.cc   2013-05-28 17:28:43.697861786 +0100
>> @@ -78,7 +78,9 @@
>>                                  + chrono::microseconds(tv.tv_usec)));
>>  #else
>>        std::time_t __sec = std::time(0);
>> -      return system_clock::from_time_t(__sec);
>> +      typedef chrono::time_point<system_clock, seconds>        __from;
>> +      return time_point_cast<system_clock::duration>
>> +              (__from(chrono::seconds(__sec)));
>>  #endif
>>      }
>
> Yes, it does.  My build worked fine after applying this patch to my
> local tree.

Excellent, thanks. I'll commit that in an hour or two when I get home.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]