From owner-cvs-all@FreeBSD.ORG Thu Mar 2 17:40:05 2006 Return-Path: X-Original-To: cvs-all@FreeBSD.org 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 B21AB16A422; Thu, 2 Mar 2006 17:40:05 +0000 (GMT) (envelope-from mux@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id C7CB843D6D; Thu, 2 Mar 2006 17:40:04 +0000 (GMT) (envelope-from mux@FreeBSD.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.1/8.13.1) with ESMTP id k22He408057627; Thu, 2 Mar 2006 17:40:04 GMT (envelope-from mux@repoman.freebsd.org) Received: (from mux@localhost) by repoman.freebsd.org (8.13.1/8.13.1/Submit) id k22He4Ml057626; Thu, 2 Mar 2006 17:40:04 GMT (envelope-from mux) Message-Id: <200603021740.k22He4Ml057626@repoman.freebsd.org> From: Maxime Henrion Date: Thu, 2 Mar 2006 17:40:04 +0000 (UTC) To: projects-committers@FreeBSD.org, cvs-projects@FreeBSD.org, cvs-all@FreeBSD.org X-FreeBSD-CVS-Branch: HEAD Cc: Subject: cvs commit: projects/csup keyword.c misc.c misc.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Mar 2006 17:40:05 -0000 mux 2006-03-02 17:40:04 UTC FreeBSD projects repository Modified files: csup keyword.c misc.c misc.h Log: - Subtle differences in the strptime() implementation of NetBSD caused csup to fail there. The problem was that strptime() won't fail if we use the %Y format and that the year is only 2 digits on NetBSD, and it fails on FreeBSD. My code was only using the %y format when the %Y one failed, so under NetBSD it was not used and timegm() was called with a wrong structure, and was returning -1. In order to work around this problem, we're looking for the first '.' in the revdate in first, and we're using %Y or %y depending on the length of the first field. - So that we don't duplicate this logic in keyword.c, introduce a new function named rcsdatetotm() that will parse a RCS revdate and put it into a struct tm. Reimplement rcsdatetotime() in terms of rcsdatetotm() and timegm(). - Use the new rcsdatetotm() in keyword.c. Revision Changes Path 1.32 +5 -6 projects/csup/keyword.c 1.28 +26 -7 projects/csup/misc.c 1.25 +4 -2 projects/csup/misc.h