From owner-freebsd-standards Mon Apr 8 11:18:40 2002 Delivered-To: freebsd-standards@freebsd.org Received: from a96180.upc-a.chello.nl (a96180.upc-a.chello.nl [62.163.96.180]) by hub.freebsd.org (Postfix) with ESMTP id D1D1037B419 for ; Mon, 8 Apr 2002 11:18:38 -0700 (PDT) Received: by a96180.upc-a.chello.nl (Postfix, from userid 1001) id CEF302170; Mon, 8 Apr 2002 20:18:37 +0200 (CEST) Date: Mon, 8 Apr 2002 20:18:37 +0200 From: Jeroen Ruigrok/asmodai To: standards@freebsd.org Subject: gettimeofday() Message-ID: <20020408181837.GC40979@daemon.ninth-circle.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.3.28i Organisation: Ninth Circle Enterprises Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG http://www.freebsd.org/cgi/query-pr.cgi?pr=misc/34596 Can anyone say something sensible about this? I do not have an older 4.x box to run the test against, so I would welcome any results. Of someone know from the top of their head that we mucked around deeply with it? -- Jeroen Ruigrok van der Werven / asmodai / Kita no Mono asmodai@[wxs.nl|xmach.org], finger asmodai@ninth-circle.org http://www.softweyr.com/asmodai/ | http://www.[tendra|xmach].org/ We decide who's crazy or not... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Mon Apr 8 13: 2: 4 2002 Delivered-To: freebsd-standards@freebsd.org Received: from rwcrmhc52.attbi.com (rwcrmhc52.attbi.com [216.148.227.88]) by hub.freebsd.org (Postfix) with ESMTP id D8E1D37B417 for ; Mon, 8 Apr 2002 13:02:00 -0700 (PDT) Received: from attbi.com ([12.237.241.112]) by rwcrmhc52.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020408200200.LZOP3676.rwcrmhc52.attbi.com@attbi.com>; Mon, 8 Apr 2002 20:02:00 +0000 Message-ID: <3CB1F73C.173C77ED@attbi.com> Date: Mon, 08 Apr 2002 15:02:04 -0500 From: Joe Halpin X-Mailer: Mozilla 4.76 [en] (X11; U; Linux 2.4.2-2 i686) X-Accept-Language: en MIME-Version: 1.0 To: Jeroen Ruigrok/asmodai Cc: standards@freebsd.org Subject: Re: gettimeofday() References: <20020408181837.GC40979@daemon.ninth-circle.org> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Jeroen Ruigrok/asmodai wrote: > > http://www.freebsd.org/cgi/query-pr.cgi?pr=misc/34596 > > Can anyone say something sensible about this? > > I do not have an older 4.x box to run the test against, so I would welcome > any results. > > Of someone know from the top of their head that we mucked around deeply with > it? I tried it on my machine, the following from dmesg Timecounter "i8254" frequency 1193182 Hz CPU: Pentium II/Pentium II Xeon/Celeron (300.68-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x651 Stepping = 1 Features=0x183f9ff real memory = 100663296 (98304K bytes) One comment is that the test program needs to be compiled as a C++ program. I doubt that's significant, but ... Here are my results $ time ./a.out delta: 5s 43662us 5.06s real 0.64s user 4.40s system I know the machines aren't really comparable, but since mine's about million times slower than the submitter's machine and it ran in the about the same time his did ... I've got a spare partition, I'll try to load 4.2 and try it there as well tonight. joe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Mon Apr 8 16: 0:44 2002 Delivered-To: freebsd-standards@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id CED9437B41E for ; Mon, 8 Apr 2002 16:00:01 -0700 (PDT) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.11.4/8.11.6) id g38Mxxh45388; Mon, 8 Apr 2002 18:59:59 -0400 (EDT) (envelope-from wollman) Date: Mon, 8 Apr 2002 18:59:59 -0400 (EDT) From: Garrett Wollman Message-Id: <200204082259.g38Mxxh45388@khavrinen.lcs.mit.edu> To: Jeroen Ruigrok/asmodai Cc: standards@FreeBSD.ORG Subject: gettimeofday() In-Reply-To: <20020408181837.GC40979@daemon.ninth-circle.org> References: <20020408181837.GC40979@daemon.ninth-circle.org> Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG < said: > http://www.freebsd.org/cgi/query-pr.cgi?pr=misc/34596 > Can anyone say something sensible about this? Not a standards issue. -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Mon Apr 8 16: 9:16 2002 Delivered-To: freebsd-standards@freebsd.org Received: from h066060062167.isol.net.ar (h066060062167.isol.net.ar [66.60.62.167]) by hub.freebsd.org (Postfix) with ESMTP id ADB9637B422 for ; Mon, 8 Apr 2002 16:09:01 -0700 (PDT) Received: from h066060062169.isol.net.ar (h066060062169.isol.net.ar [66.60.62.169]) by h066060062167.isol.net.ar (8.11.6/8.11.6) with ESMTP id g38N7rn80713 for ; Mon, 8 Apr 2002 20:07:53 -0300 (ART) (envelope-from root@h066060062169.isol.net.ar) Date: Mon, 8 Apr 2002 15:54:05 GMT Message-Id: <200204081554.g38Fs5u53930@h066060062169.isol.net.ar> Subject: LIQUID V - IMMEDIATE RESULTS NO PRESCRIPTION NECESSARY From: liquidv12@liquidv12.com.isol.net.ar To: liquidv12@liquidv12.com.isol.net.ar MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_001__26423154_69463,55" Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG This is a Multipart MIME message. ------=_NextPart_000_001__26423154_69463,55 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit LIQUID V -  ALL NATURAL ----------------------------------------- Increase blood flow Increase Frequency Increase Desire Increase Sensation Increase Stamina Increase Satisfaction ---------------------------------------- HOW LIQUID-V WORKS: LIQUID-V is a revolutionary way to get your erection back to its youthful state. Oral absorption is the fastest, most effective way to get a dose of erection enhancing supplements into your system. LIQUID-V immediately allows the maximum amount of blood to fill the penile chambers, this process allows for an increase in penile length, girth and hardness. When put into the mouth, micro-sized beads are immediately absorbed into the tissue through the capillaries, which lie close to the surface of the lining in the mouth. This process allows the supplement to be absorbed within seconds. LIQUID-Vis superior to a pill because it absorbs into the blood stream immediately. Your penis has 3 chambers which fill with blood during an erection. These chambers are a collection of blood vessels which become swollen with blood during sexual arousal. While you're not sexually aroused the penile chambers are open and allow for the flow of blood through the filling chambers. When you are sexually aroused the chambers remain open and the exit gates close. When the exit gates close the blood that remains in the penis gives you your erection. Once the penile gates close the amount of blood in the chambers will determine how you perform . A revolutionary way to get your desire back to its youthful state LIQUID-V WORKS When put into the mouth, micro-sized beads are immediately absorbed into the tissue through the capillaries. This process allows the supplement to be absorbed within seconds. 100% SECURE ONLINE COMMERCE CLICK HERE FOR MORE DETAILS (http://66.60.62.169/index.htm) --------------------------------- If you do not want to receive further mailings or have been inadvertently placed on our mailing list, please click "Unsubscribe" (http://66.60.62.169/unsubscribe.htm) Your address will be removed in 24 hours ----------------------------------- ------=_NextPart_000_001__26423154_69463,55 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: base64 PCFET0NUWVBFIEhUTUwgUFVCTElDICItLy9XM0MvL0RURCBIVE1MIDQuMCBUcmFuc2l0aW9u YWwvL0VOIj4NCjxodG1sPg0KDQo8aGVhZD4NCjx0aXRsZT5saXF1aWQgViBBbGwgTmF0dXJh bDwvdGl0bGU+DQo8L2hlYWQ+DQoNCjxib2R5IGxpbms9IiMwMDgwMDAiIHZsaW5rPSIjMDA4 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,55-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Mon Apr 8 21:40:12 2002 Delivered-To: freebsd-standards@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 3A2F137B417 for ; Mon, 8 Apr 2002 21:40:08 -0700 (PDT) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id OAA03471; Tue, 9 Apr 2002 14:39:55 +1000 Date: Tue, 9 Apr 2002 14:40:01 +1000 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Jeroen Ruigrok/asmodai Cc: standards@FreeBSD.ORG Subject: Re: gettimeofday() In-Reply-To: <20020408181837.GC40979@daemon.ninth-circle.org> Message-ID: <20020409143913.L1697-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Mon, 8 Apr 2002, Jeroen Ruigrok/asmodai wrote: > http://www.freebsd.org/cgi/query-pr.cgi?pr=misc/34596 > > Can anyone say something sensible about this? FreeBSD elected to use a pessimal timecounter for some reason. This is not a standards issue. Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Mon Apr 8 22:14:47 2002 Delivered-To: freebsd-standards@freebsd.org Received: from a96180.upc-a.chello.nl (a96180.upc-a.chello.nl [62.163.96.180]) by hub.freebsd.org (Postfix) with ESMTP id 5E58437B417 for ; Mon, 8 Apr 2002 22:14:45 -0700 (PDT) Received: by a96180.upc-a.chello.nl (Postfix, from userid 1001) id 46B2E2170; Tue, 9 Apr 2002 07:14:43 +0200 (CEST) Date: Tue, 9 Apr 2002 07:14:42 +0200 From: Jeroen Ruigrok/asmodai To: Bruce Evans Cc: standards@FreeBSD.ORG Subject: Re: gettimeofday() Message-ID: <20020409051442.GP40979@daemon.ninth-circle.org> References: <20020408181837.GC40979@daemon.ninth-circle.org> <20020409143913.L1697-100000@gamplex.bde.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020409143913.L1697-100000@gamplex.bde.org> User-Agent: Mutt/1.3.28i Organisation: Ninth Circle Enterprises Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG -On [20020409 06:45], Bruce Evans (bde@zeta.org.au) wrote: >FreeBSD elected to use a pessimal timecounter for some reason. Mmm, thanks. >This is not a standards issue. OK, figured as much, but it could've been something was changed which was that apparent to me from reading some source files. Thanks for verifying. -- Jeroen Ruigrok van der Werven / asmodai / Kita no Mono asmodai@[wxs.nl|xmach.org], finger asmodai@ninth-circle.org http://www.softweyr.com/asmodai/ | http://www.[tendra|xmach].org/ May you get - not what you deserve - but your heart's desire... To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Tue Apr 9 21:20:45 2002 Delivered-To: freebsd-standards@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id C4ED537B41E for ; Tue, 9 Apr 2002 21:20:02 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3A4K2f45933; Tue, 9 Apr 2002 21:20:02 -0700 (PDT) (envelope-from gnats) Received: from theshell.com (arsenic.theshell.com [63.236.138.5]) by hub.freebsd.org (Postfix) with SMTP id 95ED437B417 for ; Tue, 9 Apr 2002 21:16:02 -0700 (PDT) Received: (qmail 29266 invoked by uid 500); 10 Apr 2002 04:16:02 -0000 Message-Id: <20020410041602.29265.qmail@theshell.com> Date: 10 Apr 2002 04:16:02 -0000 From: Peter Avalos Reply-To: Peter Avalos To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 Subject: standards/36950: Add -n to renice(8) Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >Number: 36950 >Category: standards >Synopsis: Add -n to renice(8) >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-standards >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Tue Apr 09 21:20:02 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Peter Avalos >Release: FreeBSD 4.5-STABLE i386 >Organization: >Environment: System: FreeBSD arsenic.theshell.com 4.5-STABLE FreeBSD 4.5-STABLE #0: Tue Mar 26 11:15:29 PST 2002 pavalos@arsenic.theshell.com:/usr/obj/usr/src/sys/ARSENIC i386 >Description: Please review the following patch. o Accept the -n option. o Make usage() and SYNOPSIS style(9) compliant. o Accept only one -g, -p, or -u option, and clarify how they affect the interpretation of the following IDs. o Update the EXAMPLES section to match this new behavior. o Note that it is IEEE Std 1003.1-2001 compliant, but we still accept a nice value for POLA. o Use __FBSDID. o Use static for local functions. o Change K&R declarations. o Remove register. o int main(int argc, char *argv[]) o style(9) variable declaration. o Allow user to specify both user names and user ids. o Use sysexits when appropriate. >How-To-Repeat: >Fix: Index: renice.8 =================================================================== RCS file: /cvsroot/fbsd/src/usr.bin/renice/renice.8,v retrieving revision 1.9 diff -u -r1.9 renice.8 --- renice.8 5 Aug 2001 22:07:27 -0000 1.9 +++ renice.8 7 Mar 2002 09:26:45 -0000 @@ -40,90 +40,103 @@ .Nd alter priority of running processes .Sh SYNOPSIS .Nm -.Ar priority +.Ar nice_value .Oo -.Op Fl p -.Ar pid ... +.Fl g | +.Fl p +| +.Fl u .Oc +.Ar ID ... +.Nm +.Fl n Ar increment .Oo -.Op Fl g -.Ar pgrp ... -.Oc -.Oo -.Op Fl u -.Ar user ... +.Fl g | +.Fl p +| +.Fl u .Oc +.Ar ID ... .Sh DESCRIPTION .Nm Renice alters the scheduling priority of one or more running processes. -The following -.Ar who -parameters are interpreted as process ID's, process group -ID's, or user names. -.Nm Renice Ns 'ing +By default, the processes to be affected are specified by +their process ID's. +Specifying a process group causes all processes in the process group to have their scheduling priority altered. -.Nm Renice Ns 'ing +Specifying a user causes all processes owned by the user to have their scheduling priority altered. -By default, the processes to be affected are specified by -their process ID's. +.Pp +If the requested priority or increment would exceed PRIO_MIN (\-20) +or PRIO_MAX (20), the limit that was exceeded is used. +Only the superuser may affect the scheduling priority of processes +owned by another user. +Only the superuser may increase the scheduling priority of a process +(decrease the nice_value). .Pp Options supported by .Nm : .Bl -tag -width Ds +.It Fl n Ar increment +Increment the scheduling priority of the specified process. +Positive values will decrease the scheduling priority, and negative +values will increase the scheduling priority. +Only the superuser may specify a negative value. .It Fl g -Force -.Ar who -parameters to be interpreted as process group ID's. -.It Fl u -Force the -.Ar who -parameters to be interpreted as user names. +Interpret all +.Ar ID +arguments as unsigned decimal integer process group ID's. .It Fl p -Resets the -.Ar who -interpretation to be (the default) process ID's. +Interpret all +.Ar ID +arguments as unsigned decimal integer process ID's. +This is the default if no options are specified. +.It Fl u +Interpret all +.Ar ID +arguments as users. +The +.Ar ID +may be a valid user name or an unsigned decimal integer user ID. .El .Pp -For example, -.Bd -literal -offset -renice +1 987 -u daemon root -p 32 -.Ed -.Pp -would change the priority of process ID's 987 and 32, and -all processes owned by users daemon and root. -.Pp -Users other than the super-user may only alter the priority of -processes they own, -and can only monotonically increase their ``nice value'' -within the range 0 to -.Dv PRIO_MAX -(20). -(This prevents overriding administrative fiats.) -The super-user -may alter the priority of any process -and set the priority to any value in the range -.Dv PRIO_MIN -(\-20) -to -.Dv PRIO_MAX . -Useful priorities are: +Useful nice_values are: 20 (the affected processes will run only when nothing else in the system wants to), 0 (the ``base'' scheduling priority), anything negative (to make things go very fast). -.Sh FILES -.Bl -tag -width /etc/passwd -compact -.It Pa /etc/passwd -to map user names to user ID's -.El +.Sh EXAMPLES +Adjust the system scheduling priority so group +ID's 69 and 77 have a lower priority: +.Pp +.Dl % renice -n 5 -g 69 77 +.Pp +Adjust the system scheduling priority so process +ID's 2987 and 85723 have the lowest priority: +.Pp +.Dl % renice 20 2987 85723 +.Pp +Adjust the system scheduling priority so user +foo and user ID 2000 have higher priority: +.Pp +.Dl # renice -n -5 -u foo 2000 +.Pp .Sh SEE ALSO .Xr nice 1 , .Xr rtprio 1 , .Xr getpriority 2 , .Xr setpriority 2 +.Sh STANDARDS +The +.Nm +utility conforms to +.St -p1003.1-2001 +Note: Specifying +.Ar nice_value +is deprecated, but it is accepted due to its historical significance. .Sh BUGS Non super-users cannot increase scheduling priorities of their own processes, even if they were the ones that decreased the priorities in the first place. Index: renice.c =================================================================== RCS file: /cvsroot/fbsd/src/usr.bin/renice/renice.c,v retrieving revision 1.8 diff -u -r1.8 renice.c --- renice.c 22 Mar 2002 01:33:21 -0000 1.8 +++ renice.c 10 Apr 2002 04:01:08 -0000 @@ -32,18 +32,19 @@ */ #ifndef lint -static const char copyright[] = +static char copyright[] = "@(#) Copyright (c) 1983, 1989, 1993\n\ The Regents of the University of California. All rights reserved.\n"; #endif /* not lint */ -#ifndef lint #if 0 +#ifndef lint static char sccsid[] = "@(#)renice.c 8.1 (Berkeley) 6/9/93"; -#endif -static const char rcsid[] = - "$FreeBSD: src/usr.bin/renice/renice.c,v 1.8 2002/03/22 01:33:21 imp Exp $"; #endif /* not lint */ +#endif + +#include +__FBSDID("$FreeBSD$"); #include #include @@ -51,12 +52,14 @@ #include #include +#include +#include #include #include #include -#include +#include -int donice(int, int, int); +static int donice(int, int, int, int); static void usage(void); /* @@ -65,66 +68,79 @@ * running. */ int -main(argc, argv) - int argc; - char **argv; +main(int argc, char *argv[]) { - int which = PRIO_PROCESS; - int who = 0, prio, errs = 0; + struct passwd *pwd; + char *endptr; + int errs, nflag, prio, which, who; + + which = PRIO_PROCESS; + errs = 0, nflag = 0, who = 0; argc--, argv++; if (argc < 2) usage(); - prio = atoi(*argv); + + /* Parse priority or -n increment. */ + if (strcmp(*argv, "-n") == 0) { + nflag = 1; + argc--, argv++; + if (argc < 2) + usage(); + } + prio = strtol(*argv, &endptr, 10); + if (*endptr || + ((prio == LONG_MAX || prio == LONG_MIN) && errno == ERANGE)) + errx(EX_DATAERR, "Invalid input: %s", *argv); argc--, argv++; - if (prio > PRIO_MAX) - prio = PRIO_MAX; - if (prio < PRIO_MIN) - prio = PRIO_MIN; + + /* + * Accept -g, -p, -u, or a number. If it's a number, default + * to -p (PRIO_PROCESS). + */ + if (strcmp(*argv, "-g") == 0) { + which = PRIO_PGRP; + argc--, argv++; + } else if (strcmp(*argv, "-u") == 0) { + which = PRIO_USER; + argc--, argv++; + } else if (strcmp(*argv, "-p") == 0) + argc--, argv++; + for (; argc > 0; argc--, argv++) { - if (strcmp(*argv, "-g") == 0) { - which = PRIO_PGRP; - continue; - } - if (strcmp(*argv, "-u") == 0) { - which = PRIO_USER; - continue; - } - if (strcmp(*argv, "-p") == 0) { - which = PRIO_PROCESS; + who = strtoul(*argv, &endptr, 10); + + /* If argv is not a number, then we should be PRIO_USER. */ + if ((*endptr && which != PRIO_USER) || + ((who == LONG_MAX || who == LONG_MIN) && errno == ERANGE)) { + warnx("Invalid input: %s", *argv); continue; } - if (which == PRIO_USER) { - register struct passwd *pwd = getpwnam(*argv); + if (which == PRIO_USER && *endptr) { + pwd = getpwnam(*argv); if (pwd == NULL) { warnx("%s: unknown user", *argv); continue; } who = pwd->pw_uid; - } else { - who = atoi(*argv); - if (who < 0) { - warnx("%s: bad value", *argv); - continue; - } } - errs += donice(which, who, prio); + errs += donice(which, who, prio, nflag); } - exit(errs != 0); + exit(errs); } static void -usage() +usage(void) { - fprintf(stderr, -"usage: renice priority [ [ -p ] pids ] [ [ -g ] pgrps ] [ [ -u ] users ]\n"); - exit(1); + + fprintf(stderr, "usage: renice nice_value [-g | -p | -u] ID ...\n"); + fprintf(stderr, " renice -n increment [-g | -p | -u] ID ...\n"); + exit(EX_USAGE); } -int -donice(which, who, prio) - int which, who, prio; +static int +donice(int which, int who, int prio, int nflag) { int oldprio; @@ -133,10 +149,12 @@ warn("%d: getpriority", who); return (1); } + if (nflag) + prio += oldprio; /* Possible over/underflow here. */ if (setpriority(which, who, prio) < 0) { warn("%d: setpriority", who); return (1); } - printf("%d: old priority %d, new priority %d\n", who, oldprio, prio); + printf("%d: old nice_value %d, new nice_value %d\n", who, oldprio, prio); return (0); } >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Wed Apr 10 0:40:10 2002 Delivered-To: freebsd-standards@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 4080237B417 for ; Wed, 10 Apr 2002 00:40:03 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3A7e3590514; Wed, 10 Apr 2002 00:40:03 -0700 (PDT) (envelope-from gnats) Date: Wed, 10 Apr 2002 00:40:03 -0700 (PDT) Message-Id: <200204100740.g3A7e3590514@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org Cc: From: "Tim J. Robbins" Subject: Re: standards/36950: Add -n to renice(8) Reply-To: "Tim J. Robbins" Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG The following reply was made to PR standards/36950; it has been noted by GNATS. From: "Tim J. Robbins" To: Peter Avalos Cc: freebsd-gnats-submit@FreeBSD.ORG Subject: Re: standards/36950: Add -n to renice(8) Date: Wed, 10 Apr 2002 17:10:37 +1000 On Wed, Apr 10, 2002 at 04:16:02AM -0000, Peter Avalos wrote: > >Number: 36950 > >Category: standards > >Synopsis: Add -n to renice(8) > Index: renice.8 > =================================================================== > +.Sh STANDARDS > +The > +.Nm > +utility conforms to > +.St -p1003.1-2001 > +Note: Specifying > +.Ar nice_value > +is deprecated, but it is accepted due to its historical significance. The comment about historical behaviour probably belongs in a COMPATIBILITY section. > Index: renice.c > =================================================================== > -static const char copyright[] = > +static char copyright[] = I believe this should stay const. You could consider using the __COPYRIGHT macro, but \n's in its argument don't work properly. > + prio = strtol(*argv, &endptr, 10); > + if (*endptr || Should check whether endptr == *argv. renice '' should not be allowed. > + ((prio == LONG_MAX || prio == LONG_MIN) && errno == ERANGE)) > + errx(EX_DATAERR, "Invalid input: %s", *argv); prio is an int so might not ever be able to take value LONG_{MIN,MAX}. -n should be accepted with its argument joined to it, for example -n4 as well as -n 4. Solaris accepts this and the standard specifies it. NetBSD has got it wrong. > + /* > + * Accept -g, -p, -u, or a number. If it's a number, default > + * to -p (PRIO_PROCESS). > + */ > + if (strcmp(*argv, "-g") == 0) { > + which = PRIO_PGRP; > + argc--, argv++; > + } else if (strcmp(*argv, "-u") == 0) { > + which = PRIO_USER; > + argc--, argv++; > + } else if (strcmp(*argv, "-p") == 0) > + argc--, argv++; > + Handling these in the loop is the traditional BSD, and SUSv2 behaviour. Worth noting in the COMPATIBILITY section of the manual page that this syntax isn't allowed anymore if you choose to remove it. > + /* If argv is not a number, then we should be PRIO_USER. */ No, non-numeric arguments are invalid unless preceeded by -u. > - exit(errs != 0); > + exit(errs); Existing code was better; knowing how many requests failed is not useful, and it could wrap back around to 0 (success) or other strange things. > - printf("%d: old priority %d, new priority %d\n", who, oldprio, prio); > + printf("%d: old nice_value %d, new nice_value %d\n", who, oldprio, prio); This should just be removed alltogether - SUSv3 specifies that standard output is not used at all, despite this being traditional behaviour. Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Wed Apr 10 5:33:51 2002 Delivered-To: freebsd-standards@freebsd.org Received: from Awfulhak.org (gw.Awfulhak.org [217.204.245.18]) by hub.freebsd.org (Postfix) with ESMTP id 2536F37B417; Wed, 10 Apr 2002 05:33:44 -0700 (PDT) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [IPv6:fec0::1:12]) by Awfulhak.org (8.12.2/8.11.6) with ESMTP id g3ACXeoi029429; Wed, 10 Apr 2002 13:33:40 +0100 (BST) (envelope-from brian@freebsd-services.com) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.12.2/8.12.2) with ESMTP id g3ACXaOF052655; Wed, 10 Apr 2002 13:33:36 +0100 (BST) (envelope-from brian@freebsd-services.com) Message-Id: <200204101233.g3ACXaOF052655@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Sean Chittenden Cc: current@FreeBSD.org, freebsd-standards@FreeBSD.org Subject: Re: mktime() doesn't fix deadzones... In-Reply-To: Message from Sean Chittenden of "Tue, 09 Apr 2002 23:40:05 PDT." <20020409234005.V66679@ninja1.internal> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 10 Apr 2002 13:33:36 +0100 From: Brian Somers Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi, I've cc'd -standards as I think this would be of interest there. IMHO the SQL code you quote in the PR should fail with an ``invalid time'' error. Personally I like the fact that mktime() returns -1 - it allows date's -v option to act sanely, although I must admit it was a PITA to get right. The really big question is, how can you ``fix'' mktime() ? If a value of 2002-4-7 2:0:0.0 becomes 2002-4-7 3:0:0.0 PDT, then you can deduce that 2 == 3 and go on to deduce other equally bizarre things.... Thinking about it makes my head hurt ! > I haven't read POSIX yet, but mktime() fails on the boundary condition > blackholes when timezones change. I just filed a patch for the > PostgreSQL port so that it deals with this problem. > > http://www.freebsd.org/cgi/query-pr.cgi?pr=3D36954 > > I believe that Linux and SunOS handle this automatically and am > wondering if FreeBSD should too (this was the 1st time the PostgreSQL > guys had heard of this in over 6 years). I'm not a daylight savings > expert, but am wondering what other people think. Seems like a good > idea(TM) to me. For example (PST/PDT assumed): > > 2002-4-7 2:0:0.0 > > should be: > > 2002-4-7 3:0:0.0 > > Anyone object or have any thoughts? -sc -- Brian http://www.freebsd-services.com/ Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Wed Apr 10 7:50:21 2002 Delivered-To: freebsd-standards@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 1CBF937B41B for ; Wed, 10 Apr 2002 07:50:04 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3AEo4k99545; Wed, 10 Apr 2002 07:50:04 -0700 (PDT) (envelope-from gnats) Date: Wed, 10 Apr 2002 07:50:04 -0700 (PDT) Message-Id: <200204101450.g3AEo4k99545@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org Cc: From: Mike Barcroft Subject: Re: standards/36950: Add -n to renice(8) Reply-To: Mike Barcroft Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG The following reply was made to PR standards/36950; it has been noted by GNATS. From: Mike Barcroft To: freebsd-gnats-submit@FreeBSD.org Cc: Subject: Re: standards/36950: Add -n to renice(8) Date: Wed, 10 Apr 2002 10:41:49 -0400 Tim J. Robbins writes: > On Wed, Apr 10, 2002 at 04:16:02AM -0000, Peter Avalos wrote: > > > Index: renice.c > > =================================================================== > > > -static const char copyright[] = > > +static char copyright[] = > > I believe this should stay const. You could consider using the __COPYRIGHT > macro, but \n's in its argument don't work properly. Vendor copyrights should be left in their original form. Adding `const' here is a necessary evil in order prevent diagnostics on modern compilers. > > - printf("%d: old priority %d, new priority %d\n", who, oldprio, prio); > > + printf("%d: old nice_value %d, new nice_value %d\n", who, oldprio, +prio); > > This should just be removed alltogether - SUSv3 specifies that standard > output is not used at all, despite this being traditional behaviour. I'm not sure of the impact to the existing userbase, but I agree that this diagnostic is very unbecoming (particularly since it's outputted to stdout instead of stderr). Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Wed Apr 10 12:54:41 2002 Delivered-To: freebsd-standards@freebsd.org Received: from mail.tgd.net (mail.tgd.net [209.81.25.10]) by hub.freebsd.org (Postfix) with ESMTP id 9288A37B43F; Wed, 10 Apr 2002 12:54:09 -0700 (PDT) Received: by mail.tgd.net (Postfix, from userid 1001) id 6552420F1F; Wed, 10 Apr 2002 12:54:09 -0700 (PDT) Date: Wed, 10 Apr 2002 12:54:09 -0700 From: Sean Chittenden To: Brian Somers Cc: freebsd-standards@FreeBSD.org, current@freebsd.org Subject: Re: mktime() doesn't fix deadzones... Message-ID: <20020410125409.B34587@ninja1.internal> References: <200204101233.g3ACXaOF052655@hak.lan.Awfulhak.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bp/iNruPH9dso1Pn" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200204101233.g3ACXaOF052655@hak.lan.Awfulhak.org>; from "brian@freebsd-services.com" on Wed, Apr 10, 2002 at = 01:33:36PM X-PGP-Key: 0x1EDDFAAD X-PGP-Fingerprint: C665 A17F 9A56 286C 5CFB 1DEA 9F4F 5CEF 1EDD FAAD X-Web-Homepage: http://sean.chittenden.org/ Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --bp/iNruPH9dso1Pn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable [please trim current@ from the CC list on reply] > IMHO the SQL code you quote in the PR should fail with an ``invalid > time'' error. There's some truth to that... but Apr 7th 2am -8:00 isn't an invalid datetime. It isn't correct, Apr 7th 3am -7:00 is the correct time, but they're identical because UNIX time never sees any of these kludgey timezone problems. > Personally I like the fact that mktime() returns -1 - it allows > date's -v option to act sanely, although I must admit it was a PITA > to get right. I like that mktime() returns -1 for invalid times, but I don't think Apr 7th @2am-8 is an invalid time. Not correct, but not invalid either. > The really big question is, how can you ``fix'' mktime() ? For now, tm->tm_hour +=3D 1 is a reasonable solution, IMHO. From the testing done by the PostgreSQL folks, I gather that most other *NIX's automatically account for this border condition and change the passed in time structure. The alternative seems to me would be to have it return -1 on 2am and then leave it up to the application writer to detect this and attempt a 2nd call w/ tm->tm_hour incremented. The only caveat to that being that I'm not sure if all daylight savings shifts are 60min. Last thing to think about in favor of having mktime() handle this, October 40th automatically gets changed to November 9th already. Having mktime() adjust things for timezones as well as dates doesn't seem too unreasonable. > If a value of 2002-4-7 2:0:0.0 becomes 2002-4-7 3:0:0.0 PDT, then > you can deduce that 2 =3D=3D 3 and go on to deduce other equally bizarre > things.... Thinking about it makes my head hurt ! Sun Apr 07 02:00:00 PST 2002 =3D 1018173600 Sun Apr 07 03:00:00 PDT 2002 =3D 1018173600 That's a non-issue, I think you head is just going to have to continue to hurt. :~) -sc --=20 Sean Chittenden --bp/iNruPH9dso1Pn Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Comment: Sean Chittenden iEYEARECAAYFAjy0mGEACgkQn09c7x7d+q1ZGgCg2ZN3pJqLYpYbX9qZu3Ps2bLc B74AoKd6OoQipiWoarEyS/5yKn9U6oAr =mJt9 -----END PGP SIGNATURE----- --bp/iNruPH9dso1Pn-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Wed Apr 10 13:28:14 2002 Delivered-To: freebsd-standards@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id EAC7A37B400 for ; Wed, 10 Apr 2002 13:28:08 -0700 (PDT) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.11.4/8.11.6) id g3AKS5h68482; Wed, 10 Apr 2002 16:28:05 -0400 (EDT) (envelope-from wollman) Date: Wed, 10 Apr 2002 16:28:05 -0400 (EDT) From: Garrett Wollman Message-Id: <200204102028.g3AKS5h68482@khavrinen.lcs.mit.edu> To: Sean Chittenden Cc: freebsd-standards@FreeBSD.ORG Subject: Re: mktime() doesn't fix deadzones... In-Reply-To: <20020410125409.B34587@ninja1.internal> References: <200204101233.g3ACXaOF052655@hak.lan.Awfulhak.org> <20020410125409.B34587@ninja1.internal> Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG < said: > I like that mktime() returns -1 for invalid times, but I don't think > Apr 7th @2am-8 is an invalid time. Not correct, but not invalid > either. There is no such time as 2001-04-07T0200 when US DST rules are used. This time simply does not exist, and mktime() correctly returns an error. It has no way of knowing that you ``really meant'' 2001-04-07T0300. The way mktime() works is by performing a binary search on the time_t space, after normalization. If it determines that the time you have requested is not a possible return value of localtime(), then it returns an error. (It will also return an error if the time you have requested is not unique, as happens during the autumn transition period if tm_isdst is set to -1.) > Sun Apr 07 02:00:00 PST 2002 =3D 1018173600 ...except that PST is not in effect at that time in your timezone. However, there is a bug here. Perhaps this is fixed in a more recent tzcode; someone should check. The bug has to do with normalization. Consider the following test program fragment: tm.tm_year = 102; tm.tm_mon = 3; tm.tm_mday = 7; tm.tm_hour = 1; tm.tm_min = 61; tm.tm_sec = 0; tm.tm_isdst = -1; t = mktime(&tm); mktime() should not return -1 in this case, because the time specified does in fact exist, after normalization. The normalized time in `tm' should be 2002-04-07T03:02, with tm_isdst positive, which certainly does exist. The current code does not do this. Even worse, the current code returns an error even if tm_isdst is explicitly zero or positive, which should be enough to explicitly identify the time in question. -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Apr 11 3:23:41 2002 Delivered-To: freebsd-standards@freebsd.org Received: from Awfulhak.org (gw.Awfulhak.org [217.204.245.18]) by hub.freebsd.org (Postfix) with ESMTP id 78C4537B404 for ; Thu, 11 Apr 2002 03:23:37 -0700 (PDT) Received: from hak.lan.Awfulhak.org (root@hak.lan.Awfulhak.org [IPv6:fec0::1:12]) by Awfulhak.org (8.12.2/8.11.6) with ESMTP id g3BANXoi040778; Thu, 11 Apr 2002 11:23:33 +0100 (BST) (envelope-from brian@freebsd-services.com) Received: from hak.lan.Awfulhak.org (brian@localhost [127.0.0.1]) by hak.lan.Awfulhak.org (8.12.2/8.12.2) with ESMTP id g3BANUOF032971; Thu, 11 Apr 2002 11:23:30 +0100 (BST) (envelope-from brian@freebsd-services.com) Message-Id: <200204111023.g3BANUOF032971@hak.lan.Awfulhak.org> X-Mailer: exmh version 2.5 07/13/2001 with nmh-1.0.4 To: Sean Chittenden Cc: Brian Somers , freebsd-standards@FreeBSD.org Subject: Re: mktime() doesn't fix deadzones... In-Reply-To: Message from Sean Chittenden of "Wed, 10 Apr 2002 12:54:09 PDT." <20020410125409.B34587@ninja1.internal> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 11 Apr 2002 11:23:30 +0100 From: Brian Somers Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > [please trim current@ from the CC list on reply] > > > IMHO the SQL code you quote in the PR should fail with an ``invalid > > time'' error. > > There's some truth to that... but Apr 7th 2am -8:00 isn't an invalid > datetime. It isn't correct, Apr 7th 3am -7:00 is the correct time, > but they're identical because UNIX time never sees any of these > kludgey timezone problems. I think that ``Apr 7th 2am PST'' and ``Apr 7th 2am PDT'' are both invalid times. The PDT/PST bit suggests that they've already been ``normalised''. > > Personally I like the fact that mktime() returns -1 - it allows > > date's -v option to act sanely, although I must admit it was a PITA > > to get right. > > I like that mktime() returns -1 for invalid times, but I don't think > Apr 7th @2am-8 is an invalid time. Not correct, but not invalid > either. > > > The really big question is, how can you ``fix'' mktime() ? > > For now, tm->tm_hour +=3D 1 is a reasonable solution, IMHO. From the > testing done by the PostgreSQL folks, I gather that most other *NIX's > automatically account for this border condition and change the passed > in time structure. > > The alternative seems to me would be to have it return -1 on 2am and > then leave it up to the application writer to detect this and attempt > a 2nd call w/ tm->tm_hour incremented. The only caveat to that being > that I'm not sure if all daylight savings shifts are 60min. I believe there are other shifts. AFAIR wollman told me that in an email a few years ago. In the date -v case, this is dealt with more sensibly than if mktime() just added an hour. > Last thing to think about in favor of having mktime() handle this, > October 40th automatically gets changed to November 9th already. > Having mktime() adjust things for timezones as well as dates doesn't > seem too unreasonable. If mktime() adjusts the passed date, it makes it difficult for applications to deal with it - When I say 2:30, and that falls in a 2:00 - 3:00 gap, do I mean 1:30, 3:30, 1:59 or 3:00 ? This really depends on the application. [.....] -- Brian http://www.freebsd-services.com/ Don't _EVER_ lose your sense of humour ! To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Apr 11 19:29:30 2002 Delivered-To: freebsd-standards@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id AADA537B405 for ; Thu, 11 Apr 2002 19:29:23 -0700 (PDT) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id g3C2TLi12117; Thu, 11 Apr 2002 20:29:22 -0600 (MDT) (envelope-from imp@village.org) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id g3C2TKc48043; Thu, 11 Apr 2002 20:29:21 -0600 (MDT) (envelope-from imp@village.org) Date: Thu, 11 Apr 2002 20:29:16 -0600 (MDT) Message-Id: <20020411.202916.81341318.imp@village.org> To: bgd@icomag.de Cc: standards@freebsd.org Subject: Re: 'rm' incompatibility with Posix.2 From: "M. Warner Losh" In-Reply-To: <20020409112048.D75449-200000@fw.cgn.icom> References: <20020409112048.D75449-200000@fw.cgn.icom> X-Mailer: Mew version 2.1 on Emacs 21.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <20020409112048.D75449-200000@fw.cgn.icom> Bogdan TARU writes: : bgd@cvs$ mkdir temp : bgd@cvs$ ln -s temp b : bgd@cvs$ ls -ald temp b : lrwxr-xr-x 1 bgd wheel 4 Apr 9 11:27 b -> temp : drwxr-xr-x 2 bgd wheel 512 Apr 9 11:27 temp : bgd@cvs$ rm -rf b/ : bgd@cvs$ ls -ald temp b : ls: temp: No such file or directory : lrwxr-xr-x 1 bgd wheel 4 Apr 9 11:27 b -> temp : bgd@cvs$ : As you can see, when I tried to remove the symlink 'b' with a trailing : slash 'rm -rf b/', the target directory was removed instead of the actual : symlink. Of course, this is weird (tryied it on some other 10 un*xes, and : all worked in another way). No, you removed 'b/' which is the same thing as 'b/.' which is the directory to which 'b' points. That's BSD, and that's not likely going to change. Too many user scripts would break, I can guarantee that. I'd like to see chapter and vers of "Posix.2" quoted that requires this. There is no "Posix.2" standard anymore, so I kinda doubt that is such a requirement. This should also be discussed on the standards list, so I've changed the CC to that list and only bcc'd hackers@. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Apr 11 19:37:58 2002 Delivered-To: freebsd-standards@freebsd.org Received: from chiark.greenend.org.uk (chiark.greenend.org.uk [212.22.195.2]) by hub.freebsd.org (Postfix) with ESMTP id A779737B416 for ; Thu, 11 Apr 2002 19:37:56 -0700 (PDT) Received: from fanf by chiark.greenend.org.uk with local (Exim 3.12 #1) id 16vqwK-0007y1-00 (Debian); Fri, 12 Apr 2002 03:37:28 +0100 Date: Fri, 12 Apr 2002 03:37:28 +0100 From: Tony Finch To: "M. Warner Losh" Cc: bgd@icomag.de, standards@freebsd.org Subject: Re: 'rm' incompatibility with Posix.2 Message-ID: <20020412033728.A25420@chiark.greenend.org.uk> References: <20020409112048.D75449-200000@fw.cgn.icom> <20020411.202916.81341318.imp@village.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020411.202916.81341318.imp@village.org>; from imp@village.org on Thu, Apr 11, 2002 at 08:29:16PM -0600 Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, Apr 11, 2002 at 08:29:16PM -0600, M. Warner Losh wrote: > > No, you removed 'b/' which is the same thing as 'b/.' which is the > directory to which 'b' points. That's BSD, and that's not likely > going to change. Too many user scripts would break, I can guarantee > that. That's also what SUS says. The relevant URL is http://www.opengroup.org/onlinepubs/007904975/basedefs/xbd_chap04.html#tag_04_11 which says : A pathname that contains at least one non-slash character and that : ends with one or more trailing slashes shall be resolved as if a single : dot character ( '.' ) were appended to the pathname. Tony. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Apr 11 21:27:26 2002 Delivered-To: freebsd-standards@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id A719237B404; Thu, 11 Apr 2002 21:27:25 -0700 (PDT) Received: (from tjr@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3C4RPd33364; Thu, 11 Apr 2002 21:27:25 -0700 (PDT) (envelope-from tjr) Date: Thu, 11 Apr 2002 21:27:25 -0700 (PDT) From: Message-Id: <200204120427.g3C4RPd33364@freefall.freebsd.org> To: tjr@FreeBSD.org, freebsd-standards@FreeBSD.org, tjr@FreeBSD.org Subject: Re: standards/36126: P1003.1-2001 tabs utility Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Synopsis: P1003.1-2001 tabs utility Responsible-Changed-From-To: freebsd-standards->tjr Responsible-Changed-By: tjr Responsible-Changed-When: Thu Apr 11 21:22:34 PDT 2002 Responsible-Changed-Why: Over to me. http://www.freebsd.org/cgi/query-pr.cgi?pr=36126 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Apr 11 21:43:55 2002 Delivered-To: freebsd-standards@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 8A97837B404; Thu, 11 Apr 2002 21:43:54 -0700 (PDT) Received: (from tjr@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3C4hsR35782; Thu, 11 Apr 2002 21:43:54 -0700 (PDT) (envelope-from tjr) Date: Thu, 11 Apr 2002 21:43:54 -0700 (PDT) From: Message-Id: <200204120443.g3C4hsR35782@freefall.freebsd.org> To: tjr@FreeBSD.org, freebsd-standards@FreeBSD.org, tjr@FreeBSD.org Subject: Re: standards/36076: Implementation of POSIX fuser command Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Synopsis: Implementation of POSIX fuser command Responsible-Changed-From-To: freebsd-standards->tjr Responsible-Changed-By: tjr Responsible-Changed-When: Thu Apr 11 21:40:52 PDT 2002 Responsible-Changed-Why: Over to me. http://www.freebsd.org/cgi/query-pr.cgi?pr=36076 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Apr 11 23:21:50 2002 Delivered-To: freebsd-standards@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 6B71237B404; Thu, 11 Apr 2002 23:21:47 -0700 (PDT) Received: (from tjr@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3C6LlJ58703; Thu, 11 Apr 2002 23:21:47 -0700 (PDT) (envelope-from tjr) Date: Thu, 11 Apr 2002 23:21:47 -0700 (PDT) From: Message-Id: <200204120621.g3C6LlJ58703@freefall.freebsd.org> To: tjr@FreeBSD.org, freebsd-standards@FreeBSD.org, tjr@FreeBSD.org Subject: Re: standards/36087: P1003.1-2001 c99 utility Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Synopsis: P1003.1-2001 c99 utility Responsible-Changed-From-To: freebsd-standards->tjr Responsible-Changed-By: tjr Responsible-Changed-When: Thu Apr 11 23:21:23 PDT 2002 Responsible-Changed-Why: Over to me. http://www.freebsd.org/cgi/query-pr.cgi?pr=36087 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Apr 11 23:22:41 2002 Delivered-To: freebsd-standards@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 026EA37B419; Thu, 11 Apr 2002 23:22:40 -0700 (PDT) Received: (from tjr@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3C6MdC58873; Thu, 11 Apr 2002 23:22:39 -0700 (PDT) (envelope-from tjr) Date: Thu, 11 Apr 2002 23:22:39 -0700 (PDT) From: Message-Id: <200204120622.g3C6MdC58873@freefall.freebsd.org> To: tjr@FreeBSD.org, freebsd-standards@FreeBSD.org, tjr@FreeBSD.org Subject: Re: standards/36128: Reimplementation of who utility Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Synopsis: Reimplementation of who utility Responsible-Changed-From-To: freebsd-standards->tjr Responsible-Changed-By: tjr Responsible-Changed-When: Thu Apr 11 23:22:08 PDT 2002 Responsible-Changed-Why: Over to me. http://www.freebsd.org/cgi/query-pr.cgi?pr=36128 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Apr 12 5:40: 7 2002 Delivered-To: freebsd-standards@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id BB96D37B404 for ; Fri, 12 Apr 2002 05:40:03 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3CCe3a52899; Fri, 12 Apr 2002 05:40:03 -0700 (PDT) (envelope-from gnats) Date: Fri, 12 Apr 2002 05:40:03 -0700 (PDT) Message-Id: <200204121240.g3CCe3a52899@freefall.freebsd.org> To: freebsd-standards@FreeBSD.org Cc: From: "Tim J. Robbins" Subject: Re: standards/36783 Reply-To: "Tim J. Robbins" Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG The following reply was made to PR standards/36783; it has been noted by GNATS. From: "Tim J. Robbins" To: freebsd-gnats-submit@FreeBSD.ORG Cc: Subject: Re: standards/36783 Date: Fri, 12 Apr 2002 20:05:39 +1000 An improve version of ths patch is here for review. http://people.freebsd.org/~tjr/36783-od.diff The most notable changes from the previous patch I posted are some clarifications to the manual page, support for `long double' than I wimped out of adding before, and a WARNS=2 cleanup. I'd appreciate it if someone who knows IEEE floating point well could comment on at least the following: + case sizeof(long double): + odadd("1/12 \" %21.14e \" \"\\n\""); + break; This format string for long double is the same as that used for double. says #define LDBL_DIG DBL_DIG , but it seems odd to be printing out long doubles with no more precision than doubles. Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Apr 12 9:39:36 2002 Delivered-To: freebsd-standards@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id 8B61D37B404 for ; Fri, 12 Apr 2002 09:39:33 -0700 (PDT) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.11.4/8.11.6) id g3CGdOZ90234; Fri, 12 Apr 2002 12:39:24 -0400 (EDT) (envelope-from wollman) Date: Fri, 12 Apr 2002 12:39:24 -0400 (EDT) From: Garrett Wollman Message-Id: <200204121639.g3CGdOZ90234@khavrinen.lcs.mit.edu> To: "Tim J. Robbins" Cc: freebsd-standards@FreeBSD.ORG Subject: Re: standards/36783 In-Reply-To: <200204121240.g3CCe3a52899@freefall.freebsd.org> References: <200204121240.g3CCe3a52899@freefall.freebsd.org> Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG < said: > This format string for long double is the same as that used for double. > says #define LDBL_DIG DBL_DIG , but it seems > odd to be printing out long doubles with no more precision than doubles. The exact type of a `long double' differs from machine to machine. On IA-32 machines, it's usually 80-bit ``extended double precision''. On SPARCv9, it's always ``quad precision'' (which is not an IEEE-sanctioned type, but is the obvious analogue of IEEE double with twice as many bits in the representation). Some other processors have other representations. Because of the way the IA-32 FPU is configured by default, using extended precision generally doesn't do any good, and I think in the current compilers a double and a long double are both implemented as FPU doubles. (This certainly was true at one time.) -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Apr 12 11:16:55 2002 Delivered-To: freebsd-standards@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 25B3137B400 for ; Fri, 12 Apr 2002 11:16:53 -0700 (PDT) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id g3CIGpi15830; Fri, 12 Apr 2002 12:16:51 -0600 (MDT) (envelope-from imp@village.org) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id g3CIGoc52958; Fri, 12 Apr 2002 12:16:50 -0600 (MDT) (envelope-from imp@village.org) Date: Fri, 12 Apr 2002 12:16:45 -0600 (MDT) Message-Id: <20020412.121645.03985114.imp@village.org> To: wollman@lcs.mit.edu Cc: tim@robbins.dropbear.id.au, freebsd-standards@FreeBSD.ORG Subject: Re: standards/36783 From: "M. Warner Losh" In-Reply-To: <200204121639.g3CGdOZ90234@khavrinen.lcs.mit.edu> References: <200204121240.g3CCe3a52899@freefall.freebsd.org> <200204121639.g3CGdOZ90234@khavrinen.lcs.mit.edu> X-Mailer: Mew version 2.1 on Emacs 21.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <200204121639.g3CGdOZ90234@khavrinen.lcs.mit.edu> : Because of the way the IA-32 FPU is configured by default, using : extended precision generally doesn't do any good, and I think in the : current compilers a double and a long double are both implemented as : FPU doubles. (This certainly was true at one time.) This is no longer true. Long doubles can and do give better precision than doubles, but at a high performance cost. printf can't print a long double more precisely than what double can represent, however, since printf casts it to a double first. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Apr 12 11:22:11 2002 Delivered-To: freebsd-standards@freebsd.org Received: from khavrinen.lcs.mit.edu (khavrinen.lcs.mit.edu [18.24.4.193]) by hub.freebsd.org (Postfix) with ESMTP id D4E6E37B404 for ; Fri, 12 Apr 2002 11:22:09 -0700 (PDT) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.11.4/8.11.6) id g3CIM4491247; Fri, 12 Apr 2002 14:22:04 -0400 (EDT) (envelope-from wollman) Date: Fri, 12 Apr 2002 14:22:04 -0400 (EDT) From: Garrett Wollman Message-Id: <200204121822.g3CIM4491247@khavrinen.lcs.mit.edu> To: "M. Warner Losh" Cc: wollman@lcs.mit.edu, tim@robbins.dropbear.id.au, freebsd-standards@FreeBSD.ORG Subject: Re: standards/36783 In-Reply-To: <20020412.121645.03985114.imp@village.org> References: <200204121240.g3CCe3a52899@freefall.freebsd.org> <200204121639.g3CGdOZ90234@khavrinen.lcs.mit.edu> <20020412.121645.03985114.imp@village.org> Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG < said: > This is no longer true. Long doubles can and do give better precision > than doubles, but at a high performance cost. Is GCC now emitting code to change the rounding mode from 53-bit to 80-bit whenever it works with long doubles? -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Apr 12 11:37:42 2002 Delivered-To: freebsd-standards@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id BF82637B404 for ; Fri, 12 Apr 2002 11:37:40 -0700 (PDT) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id g3CIbdi16001; Fri, 12 Apr 2002 12:37:39 -0600 (MDT) (envelope-from imp@village.org) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id g3CIbbc53110; Fri, 12 Apr 2002 12:37:37 -0600 (MDT) (envelope-from imp@village.org) Date: Fri, 12 Apr 2002 12:37:34 -0600 (MDT) Message-Id: <20020412.123734.61861702.imp@village.org> To: wollman@lcs.mit.edu Cc: tim@robbins.dropbear.id.au, freebsd-standards@FreeBSD.ORG Subject: Re: standards/36783 From: "M. Warner Losh" In-Reply-To: <200204121822.g3CIM4491247@khavrinen.lcs.mit.edu> References: <200204121639.g3CGdOZ90234@khavrinen.lcs.mit.edu> <20020412.121645.03985114.imp@village.org> <200204121822.g3CIM4491247@khavrinen.lcs.mit.edu> X-Mailer: Mew version 2.1 on Emacs 21.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <200204121822.g3CIM4491247@khavrinen.lcs.mit.edu> Garrett Wollman writes: : < said: : : > This is no longer true. Long doubles can and do give better precision : > than doubles, but at a high performance cost. : : Is GCC now emitting code to change the rounding mode from 53-bit to : 80-bit whenever it works with long doubles? I haven't looked at the generated code, but I think so. I've been able to get better precision from long doubles than doubles in experimental code. (eg, 1 + epsilon allows me a smaller epsilon with long double than double). Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Apr 12 11:57:41 2002 Delivered-To: freebsd-standards@freebsd.org Received: from mail.tgd.net (mail.tgd.net [209.81.25.10]) by hub.freebsd.org (Postfix) with ESMTP id 8222E37B404 for ; Fri, 12 Apr 2002 11:57:39 -0700 (PDT) Received: by mail.tgd.net (Postfix, from userid 1001) id 9F48120F07; Fri, 12 Apr 2002 11:57:38 -0700 (PDT) Date: Fri, 12 Apr 2002 11:57:38 -0700 From: Sean Chittenden To: Garrett Wollman Cc: freebsd-standards@FreeBSD.ORG Subject: Re: mktime() doesn't fix deadzones... Message-ID: <20020412115738.F73286@ninja1.internal> References: <200204101233.g3ACXaOF052655@hak.lan.Awfulhak.org> <20020410125409.B34587@ninja1.internal> <200204102028.g3AKS5h68482@khavrinen.lcs.mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <200204102028.g3AKS5h68482@khavrinen.lcs.mit.edu>; from "wollman@lcs.mit.edu" on Wed, Apr 10, 2002 at = 04:28:05PM X-PGP-Key: 0x1EDDFAAD X-PGP-Fingerprint: C665 A17F 9A56 286C 5CFB 1DEA 9F4F 5CEF 1EDD FAAD X-Web-Homepage: http://sean.chittenden.org/ Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > I like that mktime() returns -1 for invalid times, but I don't > > think Apr 7th @2am-8 is an invalid time. Not correct, but not > > invalid either. > > There is no such time as 2001-04-07T0200 when US DST rules are used. > This time simply does not exist, and mktime() correctly returns an > error. It has no way of knowing that you ``really meant'' > 2001-04-07T0300. There is no February 29th most years, but if you put in Feb 29, it'll automatically figure out that you wanted March 1st. > > Sun Apr 07 02:00:00 PST 2002 =3D 1018173600 > > ...except that PST is not in effect at that time in your timezone. I'm not one to disagree, but when I get handed bogus data, it strikes me as very possible for mktime() to normalize the dates/times. Seems a tad wasteful and unnecessary to have programmers deal with this. I don't particularly want a lecture on timezones from mktime(), I just want it to parse, apply structural rules, normalize the time, and return time_t. If I get time_t, then it's right. I don't really care if my timezone offset is -48hrs or if I put in 36hrs in a day, I want time_t back. Is there another syscall that doesn't validate the data, but returns time_t? Something that more closely conformed with other OSes would be nice for code portability. Have you tried running your code fragment on Sun, Linux, or DEC? -sc -- Sean Chittenden To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Apr 12 17:22: 3 2002 Delivered-To: freebsd-standards@freebsd.org Received: from dragon.nuxi.com (trang.nuxi.com [66.92.13.169]) by hub.freebsd.org (Postfix) with ESMTP id 908D737B400 for ; Fri, 12 Apr 2002 17:22:01 -0700 (PDT) Received: from dragon.nuxi.com (obrien@localhost [127.0.0.1]) by dragon.nuxi.com (8.12.2/8.12.2) with ESMTP id g3D0LwYm032231 for ; Fri, 12 Apr 2002 17:21:58 -0700 (PDT) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.12.2/8.12.2/Submit) id g3D0KhQf032228 for standards@freebsd.org; Fri, 12 Apr 2002 17:20:43 -0700 (PDT) Date: Fri, 12 Apr 2002 17:20:42 -0700 From: "David O'Brien" To: standards@freebsd.org Subject: signbit ISO C99 macro Message-ID: <20020412172042.A32202@dragon.nuxi.com> Reply-To: obrien@freebsd.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Do we have one? GCC 3.1's libstdc++ wants one. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Apr 12 21: 4:26 2002 Delivered-To: freebsd-standards@freebsd.org Received: from treetop.robbins.dropbear.id.au (019.c.004.mel.iprimus.net.au [210.50.38.19]) by hub.freebsd.org (Postfix) with ESMTP id 6897A37B405 for ; Fri, 12 Apr 2002 21:04:11 -0700 (PDT) Received: from treetop.robbins.dropbear.id.au (localhost [127.0.0.1]) by treetop.robbins.dropbear.id.au (8.12.2/8.12.2) with ESMTP id g3D3s8ju009747; Sat, 13 Apr 2002 13:54:15 +1000 (EST) (envelope-from tim@treetop.robbins.dropbear.id.au) Received: (from tim@localhost) by treetop.robbins.dropbear.id.au (8.12.2/8.12.2/Submit) id g3D3s40G009746; Sat, 13 Apr 2002 13:54:04 +1000 (EST) Date: Sat, 13 Apr 2002 13:53:58 +1000 From: "Tim J. Robbins" To: "M. Warner Losh" Cc: freebsd-standards@FreeBSD.ORG Subject: Re: standards/36783 Message-ID: <20020413135358.A9710@treetop.robbins.dropbear.id.au> References: <200204121240.g3CCe3a52899@freefall.freebsd.org> <200204121639.g3CGdOZ90234@khavrinen.lcs.mit.edu> <20020412.121645.03985114.imp@village.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020412.121645.03985114.imp@village.org>; from imp@village.org on Fri, Apr 12, 2002 at 12:16:45PM -0600 Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Apr 12, 2002 at 12:16:45PM -0600, M. Warner Losh wrote: > This is no longer true. Long doubles can and do give better precision > than doubles, but at a high performance cost. printf can't print a > long double more precisely than what double can represent, however, > since printf casts it to a double first. This sounds like something that needs to get documented in printf(3), then eventually fixed (I can't think of an elegant way to fix it right now). What I'll do is leave the format string the same as for a double, and make a note explaining that it was working around a printf limitation. Thanks for the info. Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Apr 12 21: 8:43 2002 Delivered-To: freebsd-standards@freebsd.org Received: from rover.village.org (rover.bsdimp.com [204.144.255.66]) by hub.freebsd.org (Postfix) with ESMTP id 37FCF37B419 for ; Fri, 12 Apr 2002 21:08:40 -0700 (PDT) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.11.3/8.11.3) with ESMTP id g3D48di18120; Fri, 12 Apr 2002 22:08:39 -0600 (MDT) (envelope-from imp@village.org) Received: from localhost (warner@rover2.village.org [10.0.0.1]) by harmony.village.org (8.11.6/8.11.6) with ESMTP id g3D48Yc55724; Fri, 12 Apr 2002 22:08:34 -0600 (MDT) (envelope-from imp@village.org) Date: Fri, 12 Apr 2002 22:08:26 -0600 (MDT) Message-Id: <20020412.220826.123419371.imp@village.org> To: tim@robbins.dropbear.id.au Cc: freebsd-standards@FreeBSD.ORG Subject: Re: standards/36783 From: "M. Warner Losh" In-Reply-To: <20020413135358.A9710@treetop.robbins.dropbear.id.au> References: <200204121639.g3CGdOZ90234@khavrinen.lcs.mit.edu> <20020412.121645.03985114.imp@village.org> <20020413135358.A9710@treetop.robbins.dropbear.id.au> X-Mailer: Mew version 2.1 on Emacs 21.1 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG In message: <20020413135358.A9710@treetop.robbins.dropbear.id.au> "Tim J. Robbins" writes: : On Fri, Apr 12, 2002 at 12:16:45PM -0600, M. Warner Losh wrote: : : > This is no longer true. Long doubles can and do give better precision : > than doubles, but at a high performance cost. printf can't print a : > long double more precisely than what double can represent, however, : > since printf casts it to a double first. : : This sounds like something that needs to get documented in printf(3), then : eventually fixed (I can't think of an elegant way to fix it right now). A co-worker has fixes in his tree, but he's not happy enough with them yet to have me commit them. He got them from NetBSD. : What I'll do is leave the format string the same as for a double, and : make a note explaining that it was working around a printf limitation. : Thanks for the info. I don't understand this. You print doubles with %f and long doubles with %Lf. Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Sat Apr 13 1:15:37 2002 Delivered-To: freebsd-standards@freebsd.org Received: from treetop.robbins.dropbear.id.au (022.a.004.mel.iprimus.net.au [210.50.36.22]) by hub.freebsd.org (Postfix) with ESMTP id 9735037B400 for ; Sat, 13 Apr 2002 01:15:33 -0700 (PDT) Received: from treetop.robbins.dropbear.id.au (localhost [127.0.0.1]) by treetop.robbins.dropbear.id.au (8.12.2/8.12.2) with ESMTP id g3D8DYju009946; Sat, 13 Apr 2002 18:13:34 +1000 (EST) (envelope-from tim@treetop.robbins.dropbear.id.au) Received: (from tim@localhost) by treetop.robbins.dropbear.id.au (8.12.2/8.12.2/Submit) id g3D8DYlf009945; Sat, 13 Apr 2002 18:13:34 +1000 (EST) Date: Sat, 13 Apr 2002 18:13:33 +1000 From: "Tim J. Robbins" To: "M. Warner Losh" Cc: freebsd-standards@FreeBSD.ORG Subject: Re: standards/36783 Message-ID: <20020413181333.A9914@treetop.robbins.dropbear.id.au> References: <200204121639.g3CGdOZ90234@khavrinen.lcs.mit.edu> <20020412.121645.03985114.imp@village.org> <20020413135358.A9710@treetop.robbins.dropbear.id.au> <20020412.220826.123419371.imp@village.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020412.220826.123419371.imp@village.org>; from imp@village.org on Fri, Apr 12, 2002 at 10:08:26PM -0600 Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, Apr 12, 2002 at 10:08:26PM -0600, M. Warner Losh wrote: > : What I'll do is leave the format string the same as for a double, and > : make a note explaining that it was working around a printf limitation. > : Thanks for the info. > > I don't understand this. You print doubles with %f and long doubles > with %Lf. Sorry for being unclear, I meant the hexdump pseudo-format string, and was mainly referring to the field width & precision it used. It starts of as %e in odsyntax.c then gets changed to %Le in parse.c when it sees it needs a 12-byte data type (long double). (It may seem like a hack, but it already does similar things to convert %x to %qx). Tim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Sat Apr 13 9:22:51 2002 Delivered-To: freebsd-standards@freebsd.org Received: from espresso.q9media.com (espresso.q9media.com [216.254.138.122]) by hub.freebsd.org (Postfix) with ESMTP id 5F2EE37B416; Sat, 13 Apr 2002 09:22:48 -0700 (PDT) Received: (from mike@localhost) by espresso.q9media.com (8.11.6/8.11.6) id g3DGG7Q04964; Sat, 13 Apr 2002 12:16:07 -0400 (EDT) (envelope-from mike) Date: Sat, 13 Apr 2002 12:16:07 -0400 From: Mike Barcroft To: "David O'Brien" Cc: standards@freebsd.org Subject: Re: signbit ISO C99 macro Message-ID: <20020413121607.B2860@espresso.q9media.com> References: <20020412172042.A32202@dragon.nuxi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20020412172042.A32202@dragon.nuxi.com>; from obrien@freebsd.org on Fri, Apr 12, 2002 at 05:20:42PM -0700 Organization: The FreeBSD Project Sender: owner-freebsd-standards@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG David O'Brien writes: > Do we have one? > > GCC 3.1's libstdc++ wants one. No. I've added it as a task list item though, as well as some of the neighboring functions. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message