This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [patch] Default to --enable-libstdcxx-time=auto
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Jonathan Wakely <jwakely dot gcc at gmail dot com>
- Cc: Steve Ellcey <sellcey at imgtec dot com>, libstdc++ <libstdc++ at gcc dot gnu dot org>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Benjamin Kosnik <bkoz at redhat dot com>
- Date: Tue, 28 May 2013 18:32:10 +0200
- Subject: Re: [patch] Default to --enable-libstdcxx-time=auto
- References: <CAH6eHdTgTspzbfHhD3uDwDVD3uXAapb_NMZ0jAZ-4-UjfD4H4g at mail dot gmail dot com> <1369757459 dot 12204 dot 4 dot camel at ubuntu-sellcey> <CAH6eHdS7fLwa+GV1Eteu9muOnuETwM6xB3KMyk3HG0ZUuHbO7w at mail dot gmail dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Tue, May 28, 2013 at 05:29:38PM +0100, Jonathan Wakely wrote:
> > This has broken the mips-mti-elf build for me,
>
> I don't think it was my patch that broke it, because
> compatibility-chrono.cc didn't exist when my patch went in :-)
Yeah, this is from the latest change set.
> Does this help?
I'd say it should (my version just added from_time_t to
compatibility-chrono.cc, but your version is probably better); so, if
this fixes it for the reporter, please commit it also to 4.8 branch.
Thanks.
> --- 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
> }
Jakub