Date: Fri, 1 Jun 2001 04:45:26 -0700 From: Kris Kennaway <kris@obsecurity.org> To: Amir Shalem <amir@boom.org.il> Cc: Ruslan Ermilov <ru@FreeBSD.ORG>, freebsd-stable@FreeBSD.ORG Subject: Re: time_t definition is worng Message-ID: <20010601044526.A30739@xor.obsecurity.org> In-Reply-To: <Pine.BSF.4.33_heb2.09.0106011437410.43119-100000@active.ath.cx>; from amir@boom.org.il on Fri, Jun 01, 2001 at 02:39:33PM %2B0300 References: <20010601135122.A66182@sunbay.com> <Pine.BSF.4.33_heb2.09.0106011437410.43119-100000@active.ath.cx>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
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
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.6 (FreeBSD)
Comment: For info see http://www.gnupg.org
iD8DBQE7F4BVWry0BWjoQKURAjbYAKCNQ+wFi/WEvA7eVO+yQ/S0zq/bYgCg/LeN
0EUXdszpaK6XVLEeKTAkBow=
=vEWh
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010601044526.A30739>
