Date: Fri, 1 Jun 2001 18:31:34 -0400 (EDT) From: Thomas David Rivers <rivers@dignus.com> To: dillon@earth.backplane.com, dmitry@ssimicro.com Cc: freebsd-stable@FreeBSD.ORG Subject: Re: Re[4]: time_t definition is worng Message-ID: <200106012231.SAA86897@lakes.dignus.com> In-Reply-To: <200106012110.f51LAt388881@earth.backplane.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200106012231.SAA86897>
