From owner-freebsd-stable Fri Jun 1 4:45:30 2001 Delivered-To: freebsd-stable@freebsd.org Received: from obsecurity.dyndns.org (adsl-63-207-60-66.dsl.lsan03.pacbell.net [63.207.60.66]) by hub.freebsd.org (Postfix) with ESMTP id 9586237B422; Fri, 1 Jun 2001 04:45:27 -0700 (PDT) (envelope-from kris@obsecurity.org) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id 8547F675B2; Fri, 1 Jun 2001 04:45:26 -0700 (PDT) Date: Fri, 1 Jun 2001 04:45:26 -0700 From: Kris Kennaway To: Amir Shalem Cc: Ruslan Ermilov , freebsd-stable@FreeBSD.ORG Subject: Re: time_t definition is worng Message-ID: <20010601044526.A30739@xor.obsecurity.org> References: <20010601135122.A66182@sunbay.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-md5; protocol="application/pgp-signature"; boundary="HcAYCG3uE/tztfnV" Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: ; from amir@boom.org.il on Fri, Jun 01, 2001 at 02:39:33PM +0300 Sender: owner-freebsd-stable@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --HcAYCG3uE/tztfnV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 --HcAYCG3uE/tztfnV Content-Type: application/pgp-signature Content-Disposition: inline -----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----- --HcAYCG3uE/tztfnV-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message