From owner-freebsd-standards@FreeBSD.ORG Mon Mar 22 11:07:13 2010 Return-Path: Delivered-To: freebsd-standards@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4A5E0106567E for ; Mon, 22 Mar 2010 11:07:13 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 393288FC14 for ; Mon, 22 Mar 2010 11:07:13 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o2MB7DY2015172 for ; Mon, 22 Mar 2010 11:07:13 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o2MB7CUm015170 for freebsd-standards@FreeBSD.org; Mon, 22 Mar 2010 11:07:12 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 22 Mar 2010 11:07:12 GMT Message-Id: <201003221107.o2MB7CUm015170@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-standards@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-standards@FreeBSD.org 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, 22 Mar 2010 11:07:13 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o stand/144231 standards bind/connect/sendto too strict about sockaddr length o stand/143358 standards [libm] nearbyint(3) raises spurious inexact exception o stand/142803 standards j0 Bessel function inaccurate near zeros of the functi o stand/142255 standards scandir prototype in dirent.h isn't compliant with POS s stand/141705 standards [libc] [request] libc lacks cexp (and friends) o stand/130067 standards Wrong numeric limits in system headers? o stand/129196 standards Inconsistent errno in strtol() o bin/125855 standards sh(1) allows for multiline, non-escaped control struct o stand/124860 standards flockfile(3) doesn't work when the memory has been exh o stand/123688 standards POSIX standard changes in unistd.h and grp.h o stand/121921 standards [patch] Add leap second support to at(1), atrun(8) o stand/121568 standards [patch] ln(1): wrong "ln -s" behaviour o stand/120947 standards xsm ignores system.xsm and .xsmstartup o stand/116826 standards [patch] sh support for POSIX character classes o stand/116477 standards rm(1): rm behaves unexpectedly when using -r and relat o bin/116413 standards incorrect getconf(1) handling of unsigned constants gi o stand/116081 standards make does not work with the directive sinclude p stand/107561 standards [libc] [patch] [request] Missing SUS function tcgetsid o stand/104743 standards [headers] [patch] Wrong values for _POSIX_ minimal lim o stand/100017 standards [Patch] Add fuser(1) functionality to fstat(1) o stand/96236 standards [patch] [posix] sed(1) incorrectly describes a functio o stand/96016 standards [headers] clock_getres et al should be in o stand/94729 standards [libc] fcntl() throws undocumented ENOTTY o kern/93705 standards [headers] [patch] ENODATA and EGREGIOUS (for glibc com o stand/92362 standards [headers] [patch] Missing SIGPOLL in kernel headers a stand/86484 standards [patch] mkfifo(1) uses wrong permissions o stand/83845 standards [libm] [patch] add log2() and log2f() support for libm o stand/82654 standards C99 long double math functions are missing o stand/81287 standards [patch] fingerd(8) might send a line not ending in CRL a stand/80293 standards sysconf() does not support well-defined unistd values o stand/79056 standards [feature request] [atch] regex(3) regression tests o stand/70813 standards [patch] ls(1) not Posix compliant o stand/66357 standards make POSIX conformance problem ('sh -e' & '+' command- s kern/64875 standards [libc] [patch] [request] add a system call: fdatasync( s stand/62858 standards malloc(0) not C99 compliant o stand/56476 standards [patch] cd9660 unicode support simple hack o stand/54839 standards [pcvt] pcvt deficits o stand/54833 standards [pcvt] more pcvt deficits o stand/54410 standards one-true-awk not POSIX compliant (no extended REs) o stand/46119 standards Priority problems for SCHED_OTHER using pthreads o stand/44425 standards getcwd() succeeds even if current dir has perm 000. p stand/41576 standards POSIX compliance of ln(1) o stand/39256 standards snprintf/vsnprintf aren't POSIX-conformant for strings o kern/27835 standards [libc] execve() doesn't conform to execve(2) spec in s a docs/26003 standards getgroups(2) lists NGROUPS_MAX but not syslimits.h s stand/24590 standards timezone function not compatible witn Single Unix Spec o bin/24390 standards ln(1) Replacing old dir-symlinks when using /bin/ln o stand/21519 standards sys/dir.h should be deprecated some more s bin/14925 standards getsubopt isn't poisonous enough 49 problems total. From owner-freebsd-standards@FreeBSD.ORG Sat Mar 27 17:30:02 2010 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9FE11065702 for ; Sat, 27 Mar 2010 17:30:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C64108FC14 for ; Sat, 27 Mar 2010 17:30:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o2RHU2sC015341 for ; Sat, 27 Mar 2010 17:30:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o2RHU2lk015338; Sat, 27 Mar 2010 17:30:02 GMT (envelope-from gnats) Resent-Date: Sat, 27 Mar 2010 17:30:02 GMT Resent-Message-Id: <201003271730.o2RHU2lk015338@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, jhell Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF9481065674 for ; Sat, 27 Mar 2010 17:28:38 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id CE2F98FC15 for ; Sat, 27 Mar 2010 17:28:38 +0000 (UTC) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id o2RHScup060012 for ; Sat, 27 Mar 2010 17:28:38 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id o2RHSck3060011; Sat, 27 Mar 2010 17:28:38 GMT (envelope-from nobody) Message-Id: <201003271728.o2RHSck3060011@www.freebsd.org> Date: Sat, 27 Mar 2010 17:28:38 GMT From: jhell To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: standards/145082: Patch against w(1) & uptime(1) to use 24H time by default. 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, 27 Mar 2010 17:30:03 -0000 >Number: 145082 >Category: standards >Synopsis: Patch against w(1) & uptime(1) to use 24H time by default. >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sat Mar 27 17:30:02 UTC 2010 >Closed-Date: >Last-Modified: >Originator: jhell >Release: FreeBSD 7.3-STABLE r205709 >Organization: >Environment: FreeBSD centel.dataix.local 7.3-STABLE FreeBSD 7.3-STABLE #0 r205709M Fri Mar 26 22:00:19 EDT 2010 root@centel.dataix.local:/usr/obj/usr/src/sys/SH4500 i386 >Description: By default w(1) and uptime(1) use 12 hour time while the rest of the system uses 24 hour time. Example output above in uname -a and date(1) are two of the more commonly used commands that show 24 hour usage. Programs with a default of 24 hour output: last(1), date(1), who(1), ls(1) Programs with a default of 12 hour output: ps(1), w(1), uptime(1), others.... >How-To-Repeat: Old output: # date Sat Mar 27 13:18:34 EDT 2010 # w 1:18PM up 26 days, 4:10, 1 users, load averages: 0.00, 0.00, 0.00 USER TTY FROM LOGIN@ IDLE WHAT jhell p2 centel 1:13PM - w # uptime 1:18PM up 26 days, 4:10, 1 users, load averages: 0.00, 0.00, 0.00 >Fix: New output with attached patch: # date Sat Mar 27 13:18:34 EDT 2010 # w 13:18 up 4:23, 1 users, load averages: 0.15, 0.24, 0.18 USER TTY FROM LOGIN@ IDLE WHAT jhell p2 :0.0 13:04 - w # uptime 13:18 up 4:23, 1 users, load averages: 0.11, 0.19, 0.17 I recommend patching any other utilities to use 24 hour time by default since this can be modified at other levels if a user still wants 12 hour format. Patch attached with submission follows: extern.h | 2 +- pr_time.c | 12 ++++++------ w.c | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) Index: usr.bin/w/pr_time.c =================================================================== --- usr.bin/w/pr_time.c (revision 205709) +++ usr.bin/w/pr_time.c (working copy) @@ -75,23 +75,23 @@ tm.tm_year != tp.tm_year) { /* The line below does not take DST into consideration */ /* else if (*now / 86400 != *started / 86400) { */ - fmt = use_ampm ? L"%a%I%p" : L"%a%H"; + fmt = use_time24 ? L"%a%H" : L"%a%I%p"; } - /* Default is hh:mm{am,pm}. */ + /* Default is hh:mm. */ else { - fmt = use_ampm ? L"%l:%M%p" : L"%k:%M"; + fmt = use_time24 ? L"%H:%M" : L"%l:%M%p"; } (void)wcsftime(buf, sizeof(buf), fmt, &tp); len = wcslen(buf); width = wcswidth(buf, len); if (len == width) - (void)wprintf(L"%-7.7ls", buf); + (void)wprintf(L" %-7.7ls", buf); else if (width < 7) - (void)wprintf(L"%ls%.*s", buf, 7 - width, " "); + (void)wprintf(L" %ls%.*s", buf, 7 - width, " "); else { - (void)wprintf(L"%ls", buf); + (void)wprintf(L" %ls", buf); offset = width - 7; } return (offset); Index: usr.bin/w/w.c =================================================================== --- usr.bin/w/w.c (revision 205709) +++ usr.bin/w/w.c (working copy) @@ -100,7 +100,7 @@ int nflag; /* true if -n flag: don't convert addrs */ int dflag; /* true if -d flag: output debug info */ int sortidle; /* sort by idle time */ -int use_ampm; /* use AM/PM time */ +int use_time24; /* use 24 hour time */ int use_comma; /* use comma as floats separator */ char **sel_users; /* login array of particular users selected */ @@ -145,7 +145,7 @@ char *dot; (void)setlocale(LC_ALL, ""); - use_ampm = (*nl_langinfo(T_FMT_AMPM) != '\0'); + use_time24 = (*nl_langinfo(T_FMT) != '\0'); use_comma = (*nl_langinfo(RADIXCHAR) != ','); /* Are we w(1) or uptime(1)? */ @@ -429,7 +429,7 @@ * Print time of day. */ if (strftime(buf, sizeof(buf), - use_ampm ? "%l:%M%p" : "%k:%M", localtime(nowp)) != 0) + use_time24 ? "%H:%M" : "%l:%M%p", localtime(nowp)) != 0) (void)printf("%s ", buf); /* * Print how long system has been up. Index: usr.bin/w/extern.h =================================================================== --- usr.bin/w/extern.h (revision 205709) +++ usr.bin/w/extern.h (working copy) @@ -35,7 +35,7 @@ */ -extern int use_ampm; +extern int use_time24; struct kinfo_proc; int pr_attime(time_t *, time_t *); >Release-Note: >Audit-Trail: >Unformatted: From owner-freebsd-standards@FreeBSD.ORG Sat Mar 27 18:40:02 2010 Return-Path: Delivered-To: freebsd-standards@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D91CA106564A for ; Sat, 27 Mar 2010 18:40:02 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id C72AA8FC19 for ; Sat, 27 Mar 2010 18:40:02 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.4/8.14.4) with ESMTP id o2RIe2pI075212 for ; Sat, 27 Mar 2010 18:40:02 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.4/8.14.4/Submit) id o2RIe22V075211; Sat, 27 Mar 2010 18:40:02 GMT (envelope-from gnats) Date: Sat, 27 Mar 2010 18:40:02 GMT Message-Id: <201003271840.o2RIe22V075211@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org From: jhell Cc: Subject: Re: standards/145082: Patch against w(1) & uptime(1) to use 24H time by default. X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: jhell List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 27 Mar 2010 18:40:02 -0000 The following reply was made to PR standards/145082; it has been noted by GNATS. From: jhell To: jhell Cc: freebsd-gnats-submit@freebsd.org Subject: Re: standards/145082: Patch against w(1) & uptime(1) to use 24H time by default. Date: Sat, 27 Mar 2010 14:15:12 -0400 On 03/27/2010 13:28, jhell wrote: >> Number: 145082 >> Category: standards >> Synopsis: Patch against w(1) & uptime(1) to use 24H time by default. >> Confidential: no >> Severity: non-critical >> Priority: medium >> Responsible: freebsd-standards >> State: open >> Quarter: >> Keywords: >> Date-Required: >> Class: change-request >> Submitter-Id: current-users >> Arrival-Date: Sat Mar 27 17:30:02 UTC 2010 >> Closed-Date: >> Last-Modified: >> Originator: jhell >> Release: FreeBSD 7.3-STABLE r205709 >> Organization: >> Environment: > FreeBSD centel.dataix.local 7.3-STABLE FreeBSD 7.3-STABLE #0 r205709M Fri Mar 26 22:00:19 EDT 2010 root@centel.dataix.local:/usr/obj/usr/src/sys/SH4500 i386 >> Description: > By default w(1) and uptime(1) use 12 hour time while the rest of the system uses 24 hour time. Example output above in uname -a and date(1) are two of the more commonly used commands that show 24 hour usage. > > Programs with a default of 24 hour output: > last(1), date(1), who(1), ls(1) > > Programs with a default of 12 hour output: > ps(1), w(1), uptime(1), others.... >> How-To-Repeat: > Old output: > > # date > Sat Mar 27 13:18:34 EDT 2010 > > # w > 1:18PM up 26 days, 4:10, 1 users, load averages: 0.00, 0.00, 0.00 > USER TTY FROM LOGIN@ IDLE WHAT > jhell p2 centel 1:13PM - w > > # uptime > 1:18PM up 26 days, 4:10, 1 users, load averages: 0.00, 0.00, 0.00 >> Fix: > New output with attached patch: > > # date > Sat Mar 27 13:18:34 EDT 2010 > > # w > 13:18 up 4:23, 1 users, load averages: 0.15, 0.24, 0.18 > USER TTY FROM LOGIN@ IDLE WHAT > jhell p2 :0.0 13:04 - w > > # uptime > 13:18 up 4:23, 1 users, load averages: 0.11, 0.19, 0.17 > > > I recommend patching any other utilities to use 24 hour time by default since this can be modified at other levels if a user still wants 12 hour format. > > Patch attached with submission follows: > > > extern.h | 2 +- > pr_time.c | 12 ++++++------ > w.c | 6 +++--- > 3 files changed, 10 insertions(+), 10 deletions(-) > > Index: usr.bin/w/pr_time.c > =================================================================== > --- usr.bin/w/pr_time.c (revision 205709) > +++ usr.bin/w/pr_time.c (working copy) > @@ -75,23 +75,23 @@ > tm.tm_year != tp.tm_year) { > /* The line below does not take DST into consideration */ > /* else if (*now / 86400 != *started / 86400) { */ > - fmt = use_ampm ? L"%a%I%p" : L"%a%H"; > + fmt = use_time24 ? L"%a%H" : L"%a%I%p"; > } > > - /* Default is hh:mm{am,pm}. */ > + /* Default is hh:mm. */ > else { > - fmt = use_ampm ? L"%l:%M%p" : L"%k:%M"; > + fmt = use_time24 ? L"%H:%M" : L"%l:%M%p"; > } > > (void)wcsftime(buf, sizeof(buf), fmt, &tp); > len = wcslen(buf); > width = wcswidth(buf, len); > if (len == width) > - (void)wprintf(L"%-7.7ls", buf); > + (void)wprintf(L" %-7.7ls", buf); > else if (width < 7) > - (void)wprintf(L"%ls%.*s", buf, 7 - width, " "); > + (void)wprintf(L" %ls%.*s", buf, 7 - width, " "); > else { > - (void)wprintf(L"%ls", buf); > + (void)wprintf(L" %ls", buf); > offset = width - 7; > } > return (offset); > Index: usr.bin/w/w.c > =================================================================== > --- usr.bin/w/w.c (revision 205709) > +++ usr.bin/w/w.c (working copy) > @@ -100,7 +100,7 @@ > int nflag; /* true if -n flag: don't convert addrs */ > int dflag; /* true if -d flag: output debug info */ > int sortidle; /* sort by idle time */ > -int use_ampm; /* use AM/PM time */ > +int use_time24; /* use 24 hour time */ > int use_comma; /* use comma as floats separator */ > char **sel_users; /* login array of particular users selected */ > > @@ -145,7 +145,7 @@ > char *dot; > > (void)setlocale(LC_ALL, ""); > - use_ampm = (*nl_langinfo(T_FMT_AMPM) != '\0'); > + use_time24 = (*nl_langinfo(T_FMT) != '\0'); > use_comma = (*nl_langinfo(RADIXCHAR) != ','); > > /* Are we w(1) or uptime(1)? */ > @@ -429,7 +429,7 @@ > * Print time of day. > */ > if (strftime(buf, sizeof(buf), > - use_ampm ? "%l:%M%p" : "%k:%M", localtime(nowp)) != 0) > + use_time24 ? "%H:%M" : "%l:%M%p", localtime(nowp)) != 0) > (void)printf("%s ", buf); > /* > * Print how long system has been up. > Index: usr.bin/w/extern.h > =================================================================== > --- usr.bin/w/extern.h (revision 205709) > +++ usr.bin/w/extern.h (working copy) > @@ -35,7 +35,7 @@ > */ > > > -extern int use_ampm; > +extern int use_time24; > > struct kinfo_proc; > int pr_attime(time_t *, time_t *); > > >> Release-Note: >> Audit-Trail: >> Unformatted: PS: The one against ps(1) is much smaller ;) Index: bin/ps/print.c =================================================================== --- bin/ps/print.c (revision 205709) +++ bin/ps/print.c (working copy) @@ -414,7 +414,7 @@ VAR *v; time_t then; struct tm *tp; - static int use_ampm = -1; + static int use_time24 = -1; char buf[100]; v = ve->var; @@ -422,16 +422,16 @@ (void)printf("%-*s", v->width, "-"); return; } - if (use_ampm < 0) - use_ampm = (*nl_langinfo(T_FMT_AMPM) != '\0'); + if (use_time24 < 0) + use_time24 = (*nl_langinfo(T_FMT) != '\0'); then = k->ki_p->ki_start.tv_sec; tp = localtime(&then); if (now - k->ki_p->ki_start.tv_sec < 24 * 3600) { (void)strftime(buf, sizeof(buf), - use_ampm ? "%l:%M%p" : "%k:%M ", tp); + use_time24 ? "%H:%M" : "%l:%M%p ", tp); } else if (now - k->ki_p->ki_start.tv_sec < 7 * 86400) { (void)strftime(buf, sizeof(buf), - use_ampm ? "%a%I%p" : "%a%H ", tp); + use_time24 ? "%a%H" : "%a%I%p ", tp); } else (void)strftime(buf, sizeof(buf), "%e%b%y", tp); (void)printf("%-*s", v->width, buf); -- jhell