[systemd-devel] systemd-196/196 fails to build with x32 Abi support
zbyszek at in.waw.pl
Tue Jan 22 19:53:22 PST 2013
On Wed, Jan 23, 2013 at 04:49:00AM +0100, Lennart Poettering wrote:
> On Wed, 23.01.13 04:08, Kay Sievers (kay at vrfy.org) wrote:
> > >> Not sure what the best way is to detect an architecture where time_t is
> > >> "long long" rather than "long". I figure there must be some macro we
> > >> could check for. If we have that, the code can be changed to:
> > >>
> > >> #ifdef MACRO_TO_CHECK
> > >> assert_cc(sizeof(time_t) == sizeof(long long));
> > >> its.it_value.tv_sec = LONG_LONG_MAX;
> > >> #else
> > >> assert_cc(sizeof(time_t) == sizeof(long));
> > >> its.it_value.tv_sec = LONG_MAX;
> > >> #endif
> > >>
> > >> i.e. the goal here is to initialize the time_t value that is tv_sec to
> > >> the maximum possible value.
> > > Fixed that.
> > Hmm, wouldn't:
> > #define TIME_T_MAX (time_t)((1UL << ((sizeof(time_t) << 3) - 1)) - 1)
> > just do the same without all the configure magic?
> Sure it would. You have commit rights, too... ;-)
Yeah, I'll replace teh configure magic.
More information about the systemd-devel