From owner-svn-src-all@FreeBSD.ORG Tue Oct 19 21:04:45 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A81B8106566B; Tue, 19 Oct 2010 21:04:45 +0000 (UTC) (envelope-from edwin@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9645C8FC08; Tue, 19 Oct 2010 21:04:45 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o9JL4j2P027128; Tue, 19 Oct 2010 21:04:45 GMT (envelope-from edwin@svn.freebsd.org) Received: (from edwin@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o9JL4j5w027126; Tue, 19 Oct 2010 21:04:45 GMT (envelope-from edwin@svn.freebsd.org) Message-Id: <201010192104.o9JL4j5w027126@svn.freebsd.org> From: Edwin Groothuis Date: Tue, 19 Oct 2010 21:04:45 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org X-SVN-Group: stable-8 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r214079 - stable/8/lib/libc/stdtime X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Oct 2010 21:04:45 -0000 Author: edwin Date: Tue Oct 19 21:04:45 2010 New Revision: 214079 URL: http://svn.freebsd.org/changeset/base/214079 Log: MFC of r207830 strptime(3) confused July with June with the fr_FR locale. When parsing the month "juillet" (abbr "jul"), %B recognized it as "juin" (abbr "jui") because the full name of the month names is checked at the same time as the abbrevation. The new behaviour checks the full names first before checking the abbrevation names. PR: kern/141939 Submitted by: Denis Chatelain Modified: stable/8/lib/libc/stdtime/strptime.c Directory Properties: stable/8/lib/libc/ (props changed) stable/8/lib/libc/locale/ (props changed) stable/8/lib/libc/stdtime/ (props changed) stable/8/lib/libc/sys/ (props changed) Modified: stable/8/lib/libc/stdtime/strptime.c ============================================================================== --- stable/8/lib/libc/stdtime/strptime.c Tue Oct 19 21:02:05 2010 (r214078) +++ stable/8/lib/libc/stdtime/strptime.c Tue Oct 19 21:04:45 2010 (r214079) @@ -408,6 +408,14 @@ label: if (strncasecmp(buf, tptr->month[i], len) == 0) break; + } + } + /* + * Try the abbreviated month name if the full name + * wasn't found and Oalternative was not requested. + */ + if (i == asizeof(tptr->month) && !Oalternative) { + for (i = 0; i < asizeof(tptr->month); i++) { len = strlen(tptr->mon[i]); if (strncasecmp(buf, tptr->mon[i], len) == 0)