Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 2 Mar 2006 17:40:04 +0000 (UTC)
From:      Maxime Henrion <mux@FreeBSD.org>
To:        projects-committers@FreeBSD.org, cvs-projects@FreeBSD.org, cvs-all@FreeBSD.org
Subject:   cvs commit: projects/csup keyword.c misc.c misc.h
Message-ID:  <200603021740.k22He4Ml057626@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200603021740.k22He4Ml057626>