From owner-freebsd-standards@FreeBSD.ORG Sun Jul 31 12:17:25 2005 Return-Path: X-Original-To: freebsd-standards@hub.freebsd.org Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CBB7816A420; Sun, 31 Jul 2005 12:17:25 +0000 (GMT) (envelope-from matteo@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C82843D46; Sun, 31 Jul 2005 12:17:25 +0000 (GMT) (envelope-from matteo@FreeBSD.org) Received: from freefall.freebsd.org (matteo@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j6VCHPIV017518; Sun, 31 Jul 2005 12:17:25 GMT (envelope-from matteo@freefall.freebsd.org) Received: (from matteo@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j6VCHPSd017513; Sun, 31 Jul 2005 12:17:25 GMT (envelope-from matteo) Date: Sun, 31 Jul 2005 12:17:25 GMT From: Matteo Riondato Message-Id: <200507311217.j6VCHPSd017513@freefall.freebsd.org> To: pornin@bolet.org, matteo@FreeBSD.org, freebsd-standards@FreeBSD.org Cc: Subject: Re: standards/35307: standard include files are not standard compliant X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 31 Jul 2005 12:17:26 -0000 Synopsis: standard include files are not standard compliant State-Changed-From-To: patched->closed State-Changed-By: matteo State-Changed-When: Sun Jul 31 12:16:55 GMT 2005 State-Changed-Why: Fixed, but won't be MFC'ed to RELENG_4 http://www.freebsd.org/cgi/query-pr.cgi?pr=35307 From owner-freebsd-standards@FreeBSD.ORG Mon Aug 1 11:02:16 2005 Return-Path: X-Original-To: freebsd-standards@freebsd.org Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6B6EF16A433 for ; Mon, 1 Aug 2005 11:02:16 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2B7D943D55 for ; Mon, 1 Aug 2005 11:02:16 +0000 (GMT) (envelope-from owner-bugmaster@freebsd.org) Received: from freefall.freebsd.org (peter@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j71B2GGj017343 for ; Mon, 1 Aug 2005 11:02:16 GMT (envelope-from owner-bugmaster@freebsd.org) Received: (from peter@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j71B2EA6017337 for freebsd-standards@freebsd.org; Mon, 1 Aug 2005 11:02:14 GMT (envelope-from owner-bugmaster@freebsd.org) Date: Mon, 1 Aug 2005 11:02:14 GMT Message-Id: <200508011102.j71B2EA6017337@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: peter set sender to owner-bugmaster@freebsd.org using -f From: FreeBSD bugmaster To: freebsd-standards@FreeBSD.org Cc: Subject: Current problem reports assigned to you X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 01 Aug 2005 11:02:16 -0000 Current FreeBSD problem reports Critical problems Serious problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2001/03/05] bin/25542 standards /bin/sh: null char in quoted string o [2002/12/13] kern/46239 standards posix semaphore implementation errors o [2003/04/21] standards/51209standards [PATCH] add a64l()/l64a/l64a_r functions o [2003/07/12] standards/54410standards one-true-awk not POSIX compliant (no exte o [2004/11/03] standards/73500standards 'set +o' in /bin/sh does not include unse o [2005/03/03] standards/78357standards getaddrinfo() doesn't appear to support A o [2005/06/25] standards/82654standards C99 long double math functions are missin 7 problems total. Non-critical problems S Submitted Tracker Resp. Description ------------------------------------------------------------------------------- o [2000/09/24] bin/21519 standards sys/dir.h should be deprecated some more o [2001/01/16] bin/24390 standards Replacing old dir-symlinks when using /bi s [2001/01/24] standards/24590standards timezone function not compatible witn Sin s [2001/06/18] kern/28260 standards UIO_MAXIOV needs to be made public p [2001/11/20] standards/32126standards getopt(3) not Unix-98 conformant s [2002/03/19] standards/36076standards Implementation of POSIX fuser command o [2002/06/14] standards/39256standards [v]snprintf aren't POSIX-conformant for s o [2002/07/09] kern/40378 standards stdlib.h gives needless warnings with -an p [2002/08/12] standards/41576standards POSIX compliance of ln(1) o [2002/10/23] standards/44425standards getcwd() succeeds even if current dir has o [2002/12/09] standards/46119standards Priority problems for SCHED_OTHER using p o [2003/07/24] standards/54809standards pcvt deficits o [2003/07/25] standards/54833standards more pcvt deficits o [2003/07/25] standards/54839standards pcvt deficits o [2003/07/31] standards/55112standards glob.h, glob_t's gl_pathc should be "size o [2003/09/05] standards/56476standards cd9660 unicode support simple hack o [2003/10/29] standards/58676standards grantpt(3) alters storage used by ptsname s [2004/02/14] standards/62858standards malloc(0) not C99 compliant p [2004/02/21] standards/63173standards Patch to add getopt_long_only(3) to libc o [2004/03/29] kern/64875 standards [patch] add a system call: fdatasync() o [2004/05/07] standards/66357standards make POSIX conformance problem ('sh -e' & o [2004/05/11] standards/66531standards _gettemp uses a far smaller set of filena o [2004/08/22] standards/70813standards [PATCH] ls not Posix compliant o [2004/08/26] docs/70985 standards [patch] sh(1): incomplete documentation o o [2004/09/22] standards/72006standards floating point formating in non-C locales o [2005/03/20] standards/79055standards Add an IFS regression test for shells o [2005/03/20] standards/79056standards regex(3) regression tests o [2005/03/21] standards/79067standards /bin/sh should be more intelligent about o [2005/05/20] standards/81287standards [PATCH]: fingerd(8) might send a line not o [2005/07/21] standards/83845standards [ patch ] add log2() and log2f() support o [2005/07/22] standards/83919standards ls man page "sort by size" example out no 31 problems total. From owner-freebsd-standards@FreeBSD.ORG Wed Aug 3 15:34:45 2005 Return-Path: X-Original-To: freebsd-standards@freebsd.org Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0884D16A421 for ; Wed, 3 Aug 2005 15:34:45 +0000 (GMT) (envelope-from bogorodskiy@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.207]) by mx1.FreeBSD.org (Postfix) with ESMTP id C7AFF43D53 for ; Wed, 3 Aug 2005 15:34:43 +0000 (GMT) (envelope-from bogorodskiy@gmail.com) Received: by wproxy.gmail.com with SMTP id 36so82952wra for ; Wed, 03 Aug 2005 08:34:43 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:date:from:to:cc:subject:message-id:references:mime-version:content-type:content-disposition:in-reply-to:x-pgp; b=iVa0ddtLnOczI3vcivUi0za8SZw2T5MEEGnGvDD7Pkd9bBgXcQk+CUKefqB7Y0n7Ia2BTYndHldelbRv/HM8P4pRY7xTqitOtfzhuu155ofimghTbYblaBK1s3BIgpbBSPt8YbeUnrbRzjd8VoAEK41Dj4IY86v6UvdF1i94hQo= Received: by 10.54.49.48 with SMTP id w48mr702056wrw; Wed, 03 Aug 2005 08:34:42 -0700 (PDT) Received: from localhost ([195.161.251.210]) by mx.gmail.com with ESMTP id 13sm1434953wrl.2005.08.03.08.34.33; Wed, 03 Aug 2005 08:34:42 -0700 (PDT) Date: Wed, 3 Aug 2005 19:34:25 +0400 From: Roman Bogorodskiy To: Roman Bogorodskiy Message-ID: <20050803153425.GA36074@lame.novel.ru> References: <20050726192450.GA71206@freefall.freebsd.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="1yeeQ81UyVL57Vl7" Content-Disposition: inline In-Reply-To: <20050726192450.GA71206@freefall.freebsd.org> X-PGP: http://people.freebsd.org/~novel/novel.key.asc Cc: freebsd-standards@FreeBSD.org, mike@FreeBSD.org Subject: Re: project's webpage X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Aug 2005 15:34:45 -0000 --1yeeQ81UyVL57Vl7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Roman wrote: > I'd like to update the status board at http://www.freebsd.org/projects/c99/ Patch is here: http://people.freebsd.org/~novel/patches/freebsd/www.projects.c99.diff. I'd like to know what you think about it. PS Somebody knows, is mike@ active? He didn't respond to my previous mail and it seems he has not committed anything for about 2 years. Roman Bogorodskiy --1yeeQ81UyVL57Vl7 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.1 (FreeBSD) iQCVAwUBQvDkAYB0WzgdqspGAQJyogP7B/oVWY6HyiIxUR0JFgFuJ5wj8FZ2eKmJ Gl6GFc0bgdtICwAhXB62q15VD/qT66A93pHtMtd/mwou8WPivftNWRdgz+7XdWeR eerC1HB5mMnzpm0pqG7LCqPd5FjFOe3PGrkxQEo11nycF8l7MX1TcnNFlapX721x Fe8Q0qaweM0= =1B1H -----END PGP SIGNATURE----- --1yeeQ81UyVL57Vl7-- From owner-freebsd-standards@FreeBSD.ORG Thu Aug 4 06:30:11 2005 Return-Path: X-Original-To: freebsd-standards@hub.freebsd.org Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1554116A41F for ; Thu, 4 Aug 2005 06:30:11 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8C27F43D48 for ; Thu, 4 Aug 2005 06:30:10 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j746UAvf035859 for ; Thu, 4 Aug 2005 06:30:10 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j746UATG035858; Thu, 4 Aug 2005 06:30:10 GMT (envelope-from gnats) Resent-Date: Thu, 4 Aug 2005 06:30:10 GMT Resent-Message-Id: <200508040630.j746UATG035858@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-standards@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Roman Bogorodskiy Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E73A516A41F for ; Thu, 4 Aug 2005 06:25:10 +0000 (GMT) (envelope-from novel@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id AE83543D46 for ; Thu, 4 Aug 2005 06:25:10 +0000 (GMT) (envelope-from novel@FreeBSD.org) Received: from freefall.freebsd.org (novel@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j746PANf035778 for ; Thu, 4 Aug 2005 06:25:10 GMT (envelope-from novel@freefall.freebsd.org) Received: (from novel@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j746PADR035777; Thu, 4 Aug 2005 06:25:10 GMT (envelope-from novel) Message-Id: <200508040625.j746PADR035777@freefall.freebsd.org> Date: Thu, 4 Aug 2005 06:25:10 GMT From: Roman Bogorodskiy To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Cc: Subject: standards/84539: [ patch ] add support of -V and -v args for command (sh(1) builtin) X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Roman Bogorodskiy List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 04 Aug 2005 06:30:11 -0000 >Number: 84539 >Category: standards >Synopsis: [ patch ] add support of -V and -v args for command (sh(1) builtin) >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Thu Aug 04 06:30:09 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Roman Bogorodskiy >Release: FreeBSD 4.11-STABLE i386 >Organization: >Environment: System: FreeBSD freefall.freebsd.org 4.11-STABLE FreeBSD 4.11-STABLE #16: Sat Feb 26 00:02:03 GMT 2005 kensmith@freefall.freebsd.org:/c/src/sys/compile/FREEFALL i386 >Description: Make sh(1) builtin "command" POSIX 2001 complant by adding -v and -V args support. Patch is avaible here: http://people.freebsd.org/~novel/patches/freebsd/src.bin.sh.command_vV.diff Notes: I made two separate functions for -v (prints what will be executed) and -V (prints description). It's possible to make one function for that, which would read verbosity level from second arg. But I'm not sure it would be better/faster/easier/etc. References: http://people.freebsd.org/~schweikh/posix-utilities.html#command >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-standards@FreeBSD.ORG Sat Aug 6 06:16:19 2005 Return-Path: X-Original-To: standards@freebsd.org Delivered-To: freebsd-standards@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9DA4F16A41F for ; Sat, 6 Aug 2005 06:16:19 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 26EE343D48 for ; Sat, 6 Aug 2005 06:16:19 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id j766FHVd061123 for ; Sat, 6 Aug 2005 00:15:17 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 06 Aug 2005 00:16:20 -0600 (MDT) Message-Id: <20050806.001620.82098789.imp@bsdimp.com> To: standards@freebsd.org From: "M. Warner Losh" X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 06 Aug 2005 00:15:17 -0600 (MDT) Cc: Subject: Inconsistancy between mktime and system time accross leapsecond X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Aug 2005 06:16:19 -0000 During a leap second on a system controlled by ntp, the last second of the month is replayed. This keeps the system time in the right day (the leap second is considered to be part of the last day of the month, not the first of the next) and has a few other nice properties. If one gets the time of day during the leap second with ntp_gettime, the time state will indicate that a leap second is in progress and that the TAI offset is now one larger than before. If we look at the TAI offset plus the system time, we get a conversion from the UTC second that time_t represents to the TAI time. mktime, however, when fed a leap second says that it is the first second of the first day of the month (which is the second that gets repeated). posix is silent on what, exactly, to do with leap seconds. It gives a formula that seems to support mktime's return value. However, since leap seconds are undefined in posix's time_t epoch, a case can be made for other values. In addition, there's a one second jump if one tries to compute TAI time from UTC time_t time for the leap second. These flaws, while trivial to many programs, matter to some folks. I'd like to resolve this ambigutiy. Since ntp isn't going to change how it handles leap seconds, and since I believe that to be the right way to deal with leap seconds since it preserves the right day of week and doesn't kick of jobs too early, etc, I'd like to change mktime's behavior to match system time's during the leap second. Comments on the following patch? Warner Index: localtime.c =================================================================== RCS file: /cache/ncvs/src/lib/libc/stdtime/localtime.c,v retrieving revision 1.40 diff -u -r1.40 localtime.c --- localtime.c 24 Aug 2004 00:15:37 -0000 1.40 +++ localtime.c 5 Aug 2005 22:57:21 -0000 @@ -1506,7 +1506,20 @@ saved_seconds = yourtm.tm_sec; yourtm.tm_sec = SECSPERMIN - 1; } else { - saved_seconds = yourtm.tm_sec; + /* + ** Posix time_t is specified such that leap seconds + ** are swizzled into the time. As such, the last + ** second of the day is repeated. Without this adjustment, + ** we incorrectly repeat the first second of the following + ** day. To be pedantically correct, we should look up to + ** see if this is really a leap second or not. + */ + if (yourtm.tm_hour == HOURSPERDAY - 1 && + yourtm.tm_min == MINSPERHOUR - 1 && + yourtm.tm_sec == SECSPERMIN) + saved_seconds = SECSPERMIN - 1; + else + saved_seconds = yourtm.tm_sec; yourtm.tm_sec = 0; } /* From owner-freebsd-standards@FreeBSD.ORG Sat Aug 6 06:34:19 2005 Return-Path: X-Original-To: standards@freebsd.org Delivered-To: freebsd-standards@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A494516A41F for ; Sat, 6 Aug 2005 06:34:19 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3923C43D45 for ; Sat, 6 Aug 2005 06:34:19 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id j766Y85M061277 for ; Sat, 6 Aug 2005 00:34:08 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 06 Aug 2005 00:35:12 -0600 (MDT) Message-Id: <20050806.003512.25158891.imp@bsdimp.com> To: standards@freebsd.org From: "M. Warner Losh" In-Reply-To: <20050806.001620.82098789.imp@bsdimp.com> References: <20050806.001620.82098789.imp@bsdimp.com> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 06 Aug 2005 00:34:08 -0600 (MDT) Cc: Subject: Re: Inconsistancy between mktime and system time accross leapsecond X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Aug 2005 06:34:19 -0000 In message: <20050806.001620.82098789.imp@bsdimp.com> "M. Warner Losh" writes: : Comments on the following patch? A common practice is to add tm_sec += 20 to get the time 20 seconds in the future. This patch breaks that for non-leap seconds. I'll update the patch to fix that properly. Warner From owner-freebsd-standards@FreeBSD.ORG Sat Aug 6 11:20:13 2005 Return-Path: X-Original-To: freebsd-standards@hub.freebsd.org Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3939B16A41F for ; Sat, 6 Aug 2005 11:20:13 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id B56E243D55 for ; Sat, 6 Aug 2005 11:20:12 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j76BKCTD019098 for ; Sat, 6 Aug 2005 11:20:12 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j76BKCko019096; Sat, 6 Aug 2005 11:20:12 GMT (envelope-from gnats) Resent-Date: Sat, 6 Aug 2005 11:20:12 GMT Resent-Message-Id: <200508061120.j76BKCko019096@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-standards@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Joćo Rocha Braga Filho Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3292216A41F for ; Sat, 6 Aug 2005 11:12:31 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 04A3943D46 for ; Sat, 6 Aug 2005 11:12:31 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id j76BCUGq061466 for ; Sat, 6 Aug 2005 11:12:30 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id j76BCUst061455; Sat, 6 Aug 2005 11:12:30 GMT (envelope-from nobody) Message-Id: <200508061112.j76BCUst061455@www.freebsd.org> Date: Sat, 6 Aug 2005 11:12:30 GMT From: Joćo Rocha Braga Filho To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: standards/84610: Error um printf man page. Return value is diff. X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Aug 2005 11:20:13 -0000 >Number: 84610 >Category: standards >Synopsis: Error um printf man page. Return value is diff. >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: doc-bug >Submitter-Id: current-users >Arrival-Date: Sat Aug 06 11:20:12 GMT 2005 >Closed-Date: >Last-Modified: >Originator: Joćo Rocha Braga Filho >Release: 5.4-STABLE >Organization: >Environment: FreeBSD senechal.webkey.com.br 5.4-STABLE FreeBSD 5.4-STABLE #0: Sun May 15 18:50:14 BRT 2005 goffredo@senechal.webkey.com.br:/usr/src/sys/i386/compile/SENECHAL i386 >Description: Man page says: " DIAGNOSTICS The printf utility exits 0 on success, and >0 if an error occurs. " But works diff. And my ANSI 89 C book says: " The printf function returns the number of characters it has printed. In case of error, it returns a negative value. " >How-To-Repeat: >Fix: >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-standards@FreeBSD.ORG Sat Aug 6 12:05:08 2005 Return-Path: X-Original-To: freebsd-standards@hub.freebsd.org Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 95AF416A420; Sat, 6 Aug 2005 12:05:08 +0000 (GMT) (envelope-from stefanf@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4FA2143D45; Sat, 6 Aug 2005 12:05:08 +0000 (GMT) (envelope-from stefanf@FreeBSD.org) Received: from freefall.freebsd.org (stefanf@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.3/8.13.3) with ESMTP id j76C58Zw024993; Sat, 6 Aug 2005 12:05:08 GMT (envelope-from stefanf@freefall.freebsd.org) Received: (from stefanf@localhost) by freefall.freebsd.org (8.13.3/8.13.1/Submit) id j76C588I024989; Sat, 6 Aug 2005 12:05:08 GMT (envelope-from stefanf) Date: Sat, 6 Aug 2005 12:05:08 GMT From: Stefan Farfeleder Message-Id: <200508061205.j76C588I024989@freefall.freebsd.org> To: goffredo@gmail.com, stefanf@FreeBSD.org, freebsd-standards@FreeBSD.org Cc: Subject: Re: standards/84610: Error um printf man page. Return value is diff. X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Aug 2005 12:05:08 -0000 Synopsis: Error um printf man page. Return value is diff. State-Changed-From-To: open->closed State-Changed-By: stefanf State-Changed-When: Sat Aug 6 12:03:10 GMT 2005 State-Changed-Why: Try `man 3 printf' for the printf() C library function. The text you quoted is from printf(1) which is the man page for /usr/bin/printf. http://www.freebsd.org/cgi/query-pr.cgi?pr=84610 From owner-freebsd-standards@FreeBSD.ORG Sat Aug 6 16:59:38 2005 Return-Path: X-Original-To: standards@freebsd.org Delivered-To: freebsd-standards@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9C02B16A41F for ; Sat, 6 Aug 2005 16:59:38 +0000 (GMT) (envelope-from wollman@khavrinen.csail.mit.edu) Received: from khavrinen.csail.mit.edu (khavrinen.csail.mit.edu [128.30.28.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id 252F443D45 for ; Sat, 6 Aug 2005 16:59:37 +0000 (GMT) (envelope-from wollman@khavrinen.csail.mit.edu) Received: from khavrinen.csail.mit.edu (localhost.csail.mit.edu [127.0.0.1]) by khavrinen.csail.mit.edu (8.13.1/8.13.1) with ESMTP id j76GxWmV067086 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK CN=khavrinen.csail.mit.edu issuer=Client+20CA); Sat, 6 Aug 2005 12:59:32 -0400 (EDT) (envelope-from wollman@khavrinen.csail.mit.edu) Received: (from wollman@localhost) by khavrinen.csail.mit.edu (8.13.1/8.13.1/Submit) id j76GxRiT067083; Sat, 6 Aug 2005 12:59:27 -0400 (EDT) (envelope-from wollman) From: Garrett Wollman MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17140.60527.658336.649822@khavrinen.csail.mit.edu> Date: Sat, 6 Aug 2005 12:59:27 -0400 To: "M. Warner Losh" In-Reply-To: <20050806.001620.82098789.imp@bsdimp.com> References: <20050806.001620.82098789.imp@bsdimp.com> X-Mailer: VM 7.17 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-1.6 (khavrinen.csail.mit.edu [127.0.0.1]); Sat, 06 Aug 2005 12:59:32 -0400 (EDT) X-Spam-Status: No, score=0.0 required=5.0 tests=none version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on khavrinen.csail.mit.edu Cc: standards@freebsd.org Subject: Inconsistancy between mktime and system time accross leapsecond X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Aug 2005 16:59:38 -0000 < said: > mktime, however, when fed a leap second says that it is the first > second of the first day of the month (which is the second that gets > repeated). posix is silent on what, exactly, to do with leap > seconds. Actually, POSIX is not silent. It says they are to be ignored. From XBD section 4.4: As represented in seconds since the Epoch, each and every day shall be accounted for by exactly 86400 seconds. You can model this as the POSIX epoch advancing by one second for every leap second inserted (and similarly for deletions). > It gives a formula that seems to support mktime's return value. > However, since leap seconds are undefined in posix's time_t epoch, a > case can be made for other values. A case has been made, which has repeatedly been rejected by the POSIX committee. If you specify 23:59:60Z, a POSIX implementation *must* normalize it to 00:00:00 the following day. If you don't care about POSIX compliance, then the code already supports what you want, by encoding the leap-second tables into the timezone files. See src/share/zoneinfo/Makefile. You'll want to add calls to time2posix() and posix2time() to ntpd to adjust kernel times appropriately. -GAWollman From owner-freebsd-standards@FreeBSD.ORG Sat Aug 6 19:01:33 2005 Return-Path: X-Original-To: standards@freebsd.org Delivered-To: freebsd-standards@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 31DDC16A41F for ; Sat, 6 Aug 2005 19:01:33 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (vc4-2-0-87.dsl.netrack.net [199.45.160.85]) by mx1.FreeBSD.org (Postfix) with ESMTP id C9EFF43D45 for ; Sat, 6 Aug 2005 19:01:32 +0000 (GMT) (envelope-from imp@bsdimp.com) Received: from localhost (localhost.village.org [127.0.0.1] (may be forged)) by harmony.bsdimp.com (8.13.3/8.13.3) with ESMTP id j76IxKYU069986; Sat, 6 Aug 2005 12:59:21 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Sat, 06 Aug 2005 13:00:24 -0600 (MDT) Message-Id: <20050806.130024.75615324.imp@bsdimp.com> To: wollman@csail.mit.edu From: "M. Warner Losh" In-Reply-To: <17140.60527.658336.649822@khavrinen.csail.mit.edu> References: <20050806.001620.82098789.imp@bsdimp.com> <17140.60527.658336.649822@khavrinen.csail.mit.edu> X-Mailer: Mew version 3.3 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (harmony.bsdimp.com [127.0.0.1]); Sat, 06 Aug 2005 12:59:21 -0600 (MDT) Cc: standards@freebsd.org Subject: Re: Inconsistancy between mktime and system time accross leapsecond X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Aug 2005 19:01:33 -0000 In message: <17140.60527.658336.649822@khavrinen.csail.mit.edu> Garrett Wollman writes: : < said: : : > mktime, however, when fed a leap second says that it is the first : > second of the first day of the month (which is the second that gets : > repeated). posix is silent on what, exactly, to do with leap : > seconds. : : Actually, POSIX is not silent. It says they are to be ignored. From : XBD section 4.4: : : As represented in seconds since the Epoch, each and every day : shall be accounted for by exactly 86400 seconds. : : You can model this as the POSIX epoch advancing by one second for : every leap second inserted (and similarly for deletions). Yes. I understand that. The inserted second is the last second of the day on the day it is inserted. I understand that time_t will be ambiguous at that time. : > It gives a formula that seems to support mktime's return value. : > However, since leap seconds are undefined in posix's time_t epoch, a : > case can be made for other values. : : A case has been made, which has repeatedly been rejected by the POSIX : committee. If you specify 23:59:60Z, a POSIX implementation *must* : normalize it to 00:00:00 the following day. If you don't care about : POSIX compliance, then the code already supports what you want, by : encoding the leap-second tables into the timezone files. See : src/share/zoneinfo/Makefile. You'll want to add calls to time2posix() : and posix2time() to ntpd to adjust kernel times appropriately. Can you site where this is in the standard or in some followup doc? I can't find it at all. I'm not talking about turning on code to keep the leapseconds in the time_t value. I'm talking about making mktime() return the same value that the kernel returns during the leap second. Specifically, the sequence of time at the end of this year will be, on systems whose time is steered by ntpd or equivalent, will be time_t UTC time TAI offset TAI since 1970 1136098798 23:59:58 0 (or 32) 1136098830 1136098799 23:59:59 0 (or 32) 1136098831 1136098799 23:59:60 1 (or 33) 1136098832 1136098800 00:00:00 1 (or 33) 1136098833 1136098801 00:00:01 1 (or 33) 1136098834 Since the system time will be 1136098799 during the leap second, mktime() of that time should also be 1136098799 for that exact second. Also, to get the TAI time correctrly, the above sequence has to happen in that order. You are right that all other :60 situations should normalize to the next day. There are many things that depend on this behavir. However, :60 means 'the next second after :59'. For all non-leap second days, this is the first second of the next day. For leap second days, this is the repated second... Who said leap seconds were easy... Warner From owner-freebsd-standards@FreeBSD.ORG Sat Aug 6 19:12:53 2005 Return-Path: X-Original-To: standards@freebsd.org Delivered-To: freebsd-standards@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6458716A41F for ; Sat, 6 Aug 2005 19:12:53 +0000 (GMT) (envelope-from wollman@khavrinen.csail.mit.edu) Received: from khavrinen.csail.mit.edu (khavrinen.csail.mit.edu [128.30.28.20]) by mx1.FreeBSD.org (Postfix) with ESMTP id E1C3C43D67 for ; Sat, 6 Aug 2005 19:12:52 +0000 (GMT) (envelope-from wollman@khavrinen.csail.mit.edu) Received: from khavrinen.csail.mit.edu (localhost.csail.mit.edu [127.0.0.1]) by khavrinen.csail.mit.edu (8.13.1/8.13.1) with ESMTP id j76JCnk8067975 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK CN=khavrinen.csail.mit.edu issuer=Client+20CA); Sat, 6 Aug 2005 15:12:49 -0400 (EDT) (envelope-from wollman@khavrinen.csail.mit.edu) Received: (from wollman@localhost) by khavrinen.csail.mit.edu (8.13.1/8.13.1/Submit) id j76JCnIg067972; Sat, 6 Aug 2005 15:12:49 -0400 (EDT) (envelope-from wollman) From: Garrett Wollman MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <17141.2993.393364.510305@khavrinen.csail.mit.edu> Date: Sat, 6 Aug 2005 15:12:49 -0400 To: "M. Warner Losh" In-Reply-To: <20050806.130024.75615324.imp@bsdimp.com> References: <20050806.001620.82098789.imp@bsdimp.com> <17140.60527.658336.649822@khavrinen.csail.mit.edu> <20050806.130024.75615324.imp@bsdimp.com> X-Mailer: VM 7.17 under 21.4 (patch 17) "Jumbo Shrimp" XEmacs Lucid X-Greylist: Sender DNS name whitelisted, not delayed by milter-greylist-1.6 (khavrinen.csail.mit.edu [127.0.0.1]); Sat, 06 Aug 2005 15:12:50 -0400 (EDT) X-Spam-Status: No, score=0.0 required=5.0 tests=none version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on khavrinen.csail.mit.edu Cc: standards@freebsd.org Subject: Re: Inconsistancy between mktime and system time accross leapsecond X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Aug 2005 19:12:53 -0000 < said: > You are right that all other :60 situations should normalize to the > next day. There are many things that depend on this behavir. > However, :60 means 'the next second after :59'. For all non-leap > second days, this is the first second of the next day. For leap > second days, this is the repated second... In POSIX, there are no "leap second days" and "non-leap second days". The behavior of mktime() must be equivalent to the formula in XBD section 4.4. The Standard is clear and conforming implementations must implement the behavior described: # The relationship between the tm structure (defined in the # header) and the time in seconds since the Epoch is that the result # shall be as specified in the expression given in the definition of # seconds since the Epoch (see the Base Definitions volume of IEEE Std # 1003.1-2001, Section 4.14, Seconds Since the Epoch) corrected for # timezone and any seasonal time adjustments, where the names in the # structure and in the expression correspond. (XSH page 765 in the original edition of the Standard.) The Standard may be wrong, but the committee has been unable to make progress on this issue in more than a decade of sometimes-contentious debate, so the existing language stands. -GAWollman