From owner-freebsd-stable Fri Jun 1 12: 0:26 2001 Delivered-To: freebsd-stable@freebsd.org Received: from castor.ssimicro.com (birch.ssimicro.com [199.247.51.10]) by hub.freebsd.org (Postfix) with ESMTP id 8DFE137B424 for ; Fri, 1 Jun 2001 12:00:22 -0700 (PDT) (envelope-from dmitry@ssimicro.com) Received: from 199.247.84.16 (84x16.ssimicro.com [199.247.84.16]) by castor.ssimicro.com (8.9.3/8.9.3) with ESMTP id NAA08355; Fri, 1 Jun 2001 13:00:14 -0600 (MDT) Date: Fri, 1 Jun 2001 13:00:59 -0600 From: "Dmitry V. Dvoinikov" X-Blank: Reply-To: "Dmitry V. Dvoinikov" X-Priority: 3 (Normal) Message-ID: <149413595408.20010601130059@ssimicro.com> To: Matt Dillon Cc: freebsd-stable@FreeBSD.ORG Subject: Re[2]: time_t definition is worng In-reply-To: <200106011839.f51Idbj86306@earth.backplane.com> References: <20010601135122.A66182@sunbay.com> <20010601044526.A30739@xor.obsecurity.org> <200106011839.f51Idbj86306@earth.backplane.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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 > Matt Dillon: > time_t should remain 'long' on IA32 (even though sizeof(int) == > sizeof(long) on IA32), and it damn well should be 'long' on Alpha ... I believe you are wrong. If it's "long" on both i386 and Alpha, data will not be binary compatible. In fact as far as I understand, the origin of this confusion is making sizeof(int) == sizeof(long) on i386, which is kind of a stretchy. Best regards, Dmitry Dvoinikov mailto:dmitry@ssimicro.com Original message follows: > :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 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message