From owner-cvs-all Sun Oct 28 11:54:53 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id D334137B403; Sun, 28 Oct 2001 11:54:49 -0800 (PST) Received: (from dillon@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f9SJsnF44189; Sun, 28 Oct 2001 11:54:49 -0800 (PST) (envelope-from dillon) Message-Id: <200110281954.f9SJsnF44189@freefall.freebsd.org> From: Matt Dillon Date: Sun, 28 Oct 2001 11:54:49 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/include time.h src/lib/libc/stdtime Makefile.inc time32.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG dillon 2001/10/28 11:54:49 PST Modified files: include time.h lib/libc/stdtime Makefile.inc Added files: lib/libc/stdtime time32.c Log: Add routines to convert time_t to/from fixed-bit fields. These routines serve two purposes: (1) so we can maintain backwards compatibility with protocols (rwhod, dump, etc...) that either assume time_t is 32 bits or assume sizeof(time_t) == sizeof(int), or make other similar assumptions. (2) To tag such routines (by the presence of these calls) for future cleanup/extension work. The 32->64 routine, time32_to_time() (when time_t is 64 bits, that is), is defined specifically to implement temporal locality to properly set the msb bits of a 64 bit time_t quantity, using the 50 year rule. The locality code has not been implemented yet (and doesn't need to be for a while), but that is the intent. This will allow us to maintain backwards protocol compatibility past 2038. These routines are intended to be platform and time_t agnostic. MFC after: 1 week Revision Changes Path 1.17 +7 -0 src/include/time.h 1.13 +3 -2 src/lib/libc/stdtime/Makefile.inc 1.1 +60 -0 src/lib/libc/stdtime/time32.c (new) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message