Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 1 Jun 2001 11:39:37 -0700 (PDT)
From:      Matt Dillon <dillon@earth.backplane.com>
To:        Kris Kennaway <kris@obsecurity.org>
Cc:        Amir Shalem <amir@boom.org.il>, Ruslan Ermilov <ru@FreeBSD.ORG>, freebsd-stable@FreeBSD.ORG
Subject:   Re: time_t definition is worng
Message-ID:  <200106011839.f51Idbj86306@earth.backplane.com>
References:  <20010601135122.A66182@sunbay.com> <Pine.BSF.4.33_heb2.09.0106011437410.43119-100000@active.ath.cx> <20010601044526.A30739@xor.obsecurity.org>

next in thread | previous in thread | raw e-mail | index | archive | help

:On Fri, Jun 01, 2001 at 02:39:33PM +0300, Amir Shalem wrote:
:> it was always long int,
:> whenever you want to print time_t
:> in programs it was always
:> printf("%ld", (time_t)time);
:
:That cast is wrong; if you want to print a long, cast it to long.
:time_t is (was) only a long on the i386; on the alpha it was an int,
:and code which assumed it to be a long was unportable.  It was changed
:to help catch exactly this kind of mistake.
:
:Kris

    What, are you guys nuts?  time_t is 64 bits on 64 bit platforms for
    everyone except us?  We may be screwed for 32 bit platforms, but don't
    screw us on 64 bit platforms.

    time_t should remain 'long' on IA32 (even though sizeof(int) == 
    sizeof(long) on IA32), and it damn well should be 'long' on Alpha ...
    the alpha guys should change it if it is currently an int on Alpha.

    Please back out this commit.  It is not appropriate to make time_t
    an 'int' on IA32.  time_t has been 'long' from time immemorial.  This
    is an unbelievably bad commit.

						-Matt

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106011839.f51Idbj86306>