From owner-freebsd-stable Fri Jun 1 15:29:13 2001 Delivered-To: freebsd-stable@freebsd.org Received: from fjord.dignus.com (sdsl-66-80-58-206.dsl.lax.megapath.net [66.80.58.206]) by hub.freebsd.org (Postfix) with ESMTP id EEEBE37B424 for ; Fri, 1 Jun 2001 15:29:09 -0700 (PDT) (envelope-from rivers@dignus.com) Received: from lakes.dignus.com (lakes.dignus.com [10.0.0.3]) by fjord.dignus.com (8.11.1/8.11.1) with ESMTP id f51MTrf76590; Fri, 1 Jun 2001 18:29:53 -0400 (EDT) (envelope-from rivers@dignus.com) Received: (from rivers@localhost) by lakes.dignus.com (8.9.3/8.6.9) id SAA86897; Fri, 1 Jun 2001 18:31:34 -0400 (EDT) Date: Fri, 1 Jun 2001 18:31:34 -0400 (EDT) From: Thomas David Rivers Message-Id: <200106012231.SAA86897@lakes.dignus.com> To: dillon@earth.backplane.com, dmitry@ssimicro.com Subject: Re: Re[4]: time_t definition is worng Cc: freebsd-stable@FreeBSD.ORG In-Reply-To: <200106012110.f51LAt388881@earth.backplane.com> 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 I'll add to this discussion with a quick investigation of what other operating systems/C libraries do. First AIX - which seems to have the most complicated mechanism: They have (int inttypes.h) the following idea: /* These types provide variable size types that preserve source compatibility * for 32 and 64 bit application interfaces with int types in structures * that need to be 64 bits wide in 64 bit kernel and/or kernel extensions. */ #if defined(__64BIT_KERNEL) && defined(_KERNEL) typedef signed long int32long64_t; typedef unsigned long uint32long64_t; #else typedef signed int int32long64_t; typedef unsigned int uint32long64_t; #endif /* __64BIT_KERNEL && _KERNEL */ time_t on AIX is defined as an int32long64_t... Linux defines it as long int so, presumably on 64-bit linux, time_t is 64 bits. Systems/C mainframe C library simply defines it as long Solaris (version 5.7) defines it as: #ifndef _TIME_T #define _TIME_T typedef long time_t; /* time of day in seconds */ #endif /* _TIME_T */ So - I believe the weight of consensus is that time_t is 64-bits on 64-bit machines, and 32-bits on 32-bit machines. And, thus, for FreeBSD, should probably remain a long (IMHO.) - Dave Rivers - -- rivers@dignus.com Work: (919) 676-0847 Get your mainframe programming tools at http://www.dignus.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-stable" in the body of the message