From owner-cvs-all Sun Dec 1 17: 9:12 2002 Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3E89937B401; Sun, 1 Dec 2002 17:09:11 -0800 (PST) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id 00DEE43EB2; Sun, 1 Dec 2002 17:09:11 -0800 (PST) (envelope-from peter@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.12.6/8.12.6) with ESMTP id gB2159mV092767; Sun, 1 Dec 2002 17:05:09 -0800 (PST) (envelope-from peter@repoman.freebsd.org) Received: (from peter@localhost) by repoman.freebsd.org (8.12.6/8.12.6/Submit) id gB21596L092766; Sun, 1 Dec 2002 17:05:09 -0800 (PST) Message-Id: <200212020105.gB21596L092766@repoman.freebsd.org> From: Peter Wemm Date: Sun, 1 Dec 2002 17:05:09 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/lib/libc/stdtime localtime.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 peter 2002/12/01 17:05:09 PST Modified files: lib/libc/stdtime localtime.c Log: Replace rev 1.33 with a real fix. The problem was integer overflows when trying to store the year in a signed int. The maximum time_t on ia64 is around 292 billion years in the future, but 'int' and struct tm.tm_year can only represent then ext 2.1 billion years or so. This solves the problem of mktime/localtime looping on ia64. Unfortunately, the standards say that tm_year is an 'int', so we are still stuck with a y2147483647 bug. bash2's configure script looks for bugs in mktime() and fails on ia64 because of this. However, mktime() on FreeBSD fails the test normally anyway so this is no big loss. This change does not affect any other platforms besides ia64. Approved by: re Revision Changes Path 1.34 +2 -8 src/lib/libc/stdtime/localtime.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message