From owner-cvs-src@FreeBSD.ORG Fri Jan 19 09:32:31 2007 Return-Path: X-Original-To: cvs-src@freebsd.org Delivered-To: cvs-src@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 58E5016A407; Fri, 19 Jan 2007 09:32:31 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (c220-239-3-125.belrs4.nsw.optusnet.com.au [220.239.3.125]) by mx1.freebsd.org (Postfix) with ESMTP id DAE0213C44C; Fri, 19 Jan 2007 09:32:30 +0000 (UTC) (envelope-from peterjeremy@optushome.com.au) Received: from turion.vk2pj.dyndns.org (localhost.vk2pj.dyndns.org [127.0.0.1]) by turion.vk2pj.dyndns.org (8.13.8/8.13.8) with ESMTP id l0J9WTH2001476; Fri, 19 Jan 2007 20:32:29 +1100 (EST) (envelope-from peter@turion.vk2pj.dyndns.org) Received: (from peter@localhost) by turion.vk2pj.dyndns.org (8.13.8/8.13.8/Submit) id l0J9WTIY001475; Fri, 19 Jan 2007 20:32:29 +1100 (EST) (envelope-from peter) Date: Fri, 19 Jan 2007 20:32:29 +1100 From: Peter Jeremy To: Warner Losh Message-ID: <20070119093229.GB860@turion.vk2pj.dyndns.org> References: <200701190116.l0J1GZcD021864@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="oC1+HKm2/end4ao3" Content-Disposition: inline In-Reply-To: <200701190116.l0J1GZcD021864@repoman.freebsd.org> X-PGP-Key: http://members.optusnet.com.au/peterjeremy/pubkey.asc User-Agent: Mutt/1.5.13 (2006-08-11) Cc: cvs-src@freebsd.org, src-committers@freebsd.org, cvs-all@freebsd.org Subject: Re: cvs commit: src/lib/libc/stdtime localtime.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 19 Jan 2007 09:32:31 -0000 --oC1+HKm2/end4ao3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, 2007-Jan-19 01:16:35 +0000, Warner Losh wrote: >imp 2007-01-19 01:16:35 UTC > > FreeBSD src repository > > Modified files: > lib/libc/stdtime localtime.c=20 > Log: > On FreeBSD/arm, any value > 50 bits will result in a rediculously huge > number being returned for mktime and timegm calls. Actually, I have some code that can convert a UTC struct tm into a time_t without any loops[1]. Converting localtime would need a couple of probes to handle DST. This should be far more efficient than a binary search. Is there any interest in this? [1] The date to day number core started as a FORTRAN one-liner but I can't find the source. I've written C and perl versions and exhaustively tested them. --=20 Peter Jeremy --oC1+HKm2/end4ao3 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (FreeBSD) iD8DBQFFsJAt/opHv/APuIcRAv/wAJ9+S5iQ254hx2L12gDMFmcvkUnvbACffYig levrg3QXHLfr8vZ3uxI0hQA= =b/8g -----END PGP SIGNATURE----- --oC1+HKm2/end4ao3--