From owner-freebsd-standards Mon Dec 10 18:14: 5 2001 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 C25FE37B416; Mon, 10 Dec 2001 18:14:02 -0800 (PST) Received: (from mike@localhost) by espresso.q9media.com (8.11.6/8.11.6) id fBB2CeF28935; Mon, 10 Dec 2001 21:12:40 -0500 (EST) (envelope-from mike) Date: Mon, 10 Dec 2001 21:12:40 -0500 From: Mike Barcroft To: Alexey Zelkin Cc: Bill Fenner , standards@freebsd.org Subject: Re: cvs commit: src/lib/libc/stdlib strtod.c Message-ID: <20011210211240.M1956@espresso.q9media.com> References: <200111301248.fAUCmV345233@freefall.freebsd.org> <20011130145450.B68788@ark.cris.net> <200112021729.JAA08989@windsor.research.att.com> <20011210115728.A11494@ark.cris.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20011210115728.A11494@ark.cris.net>; from phantom@freebsd.org on Mon, Dec 10, 2001 at 11:57:28AM +0200 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 [Moved to -standards.] Alexey Zelkin writes: > On Sun, Dec 02, 2001 at 09:29:57AM -0800, Bill Fenner wrote: > > > > If you're interested, there's a significantly updated version of this > > code in netlib; http://netlib.bell-labs.com/netlib/fp/ . It looks like > > there's even a generalized version that can handle long double; we'd > > need that if we wanted to support %Lf or strtold(). > > Thanks for link! I've found some interesting stuff there and > will bring it in after some time. > > BTW, there's difference between old and this versions of NetLib in > license. Should I update (change AT&T -> Lucent) ? Or something other ? I would like to see these vendor imported, if at all possible. As Bruce pointed out, they usually fix problems much soon than us. 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 Tue Dec 11 1:18:34 2001 Delivered-To: freebsd-standards@freebsd.org Received: from columbus.cris.net (columbus.cris.net [212.110.128.65]) by hub.freebsd.org (Postfix) with ESMTP id 9EBCA37B41B; Tue, 11 Dec 2001 01:18:27 -0800 (PST) Received: from ark.cris.net (ark.cris.net [212.110.128.68]) by columbus.cris.net (8.9.3/8.9.3) with ESMTP id LAA29164; Tue, 11 Dec 2001 11:18:21 +0200 (EET) Received: (from phantom@localhost) by ark.cris.net (8.11.1/8.11.1) id fBB9Hoa38926; Tue, 11 Dec 2001 11:17:50 +0200 (EET) Date: Tue, 11 Dec 2001 11:17:50 +0200 From: Alexey Zelkin To: Mike Barcroft Cc: Bill Fenner , standards@FreeBSD.ORG Subject: Re: cvs commit: src/lib/libc/stdlib strtod.c Message-ID: <20011211111750.A35302@ark.cris.net> References: <200111301248.fAUCmV345233@freefall.freebsd.org> <20011130145450.B68788@ark.cris.net> <200112021729.JAA08989@windsor.research.att.com> <20011210115728.A11494@ark.cris.net> <20011210211240.M1956@espresso.q9media.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <20011210211240.M1956@espresso.q9media.com>; from mike@FreeBSD.ORG on Mon, Dec 10, 2001 at 09:12:40PM -0500 X-Operating-System: FreeBSD 3.5-STABLE i386 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, On Mon, Dec 10, 2001 at 09:12:40PM -0500, Mike Barcroft wrote: > [Moved to -standards.] > > Alexey Zelkin writes: > > On Sun, Dec 02, 2001 at 09:29:57AM -0800, Bill Fenner wrote: > > > > > > If you're interested, there's a significantly updated version of this > > > code in netlib; http://netlib.bell-labs.com/netlib/fp/ . It looks like > > > there's even a generalized version that can handle long double; we'd > > > need that if we wanted to support %Lf or strtold(). > > > > Thanks for link! I've found some interesting stuff there and > > will bring it in after some time. > > > > BTW, there's difference between old and this versions of NetLib in > > license. Should I update (change AT&T -> Lucent) ? Or something other ? > > I would like to see these vendor imported, if at all possible. As > Bruce pointed out, they usually fix problems much soon than us. I don't see a reason to get it vendor imported for few reasons: 1. it's only one file (src/lib/libc/stdlib/strtod.c). Maybe we need to think to take few more like strtof(), but I not sure in full and generalized versions compatibility. Need testing. Most of other stuff is not supposed to work on IEEE arifmetic machines or not standard (not included to POSIX, SuS or C99). Correct me if I wrong. 2. we'll have to change it (at least for adding new definitions of arches). Vendor's version is supposed to work on i8087, m86k, vax, ibm and cray arches. 3. And according of "much soon than us": All problems that Bruce mentioned are not problems, just style improvements. And last I think difference in slow reaction on addition of new features/imporovement to Netlib (merging them to FreeBSD) is more result of lack of interest to such complicated (and already working!) code. So, let me some time and then you'll see "request for review", please give comments. Even (1) is enough to understand that vendor import is just overhead because file will be taken out of vendor branch as soon as powerpc and sparc64 arches comes to "make world" as it already has been done for alpha and ia64. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Tue Dec 11 7:29:21 2001 Delivered-To: freebsd-standards@freebsd.org Received: from rwcrmhc53.attbi.com (rwcrmhc53.attbi.com [204.127.198.39]) by hub.freebsd.org (Postfix) with ESMTP id F1D3237B419 for ; Tue, 11 Dec 2001 07:29:19 -0800 (PST) Received: from attbi.com ([12.237.33.57]) by rwcrmhc53.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20011211152919.NZVX24045.rwcrmhc53.attbi.com@attbi.com> for ; Tue, 11 Dec 2001 15:29:19 +0000 Message-ID: <3C162663.FE4DDD08@attbi.com> Date: Tue, 11 Dec 2001 09:29:39 -0600 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: "standards@FreeBSD.ORG" Subject: to-do list 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 Hello, I'd like to help out if I can. I've never worked on an open-souce project before, so I'm not entirely sure how to go about it. I was looking at the to-do list at http://people.FreeBSD.org/~mike/c99/#mailinglist and see a couple things I think I could work on. Do I need to sign up with someone, or just do it and let someone know when I'm done, or what? I'm thinking specifically of the item that says "Add -r and -t options to the at utility.". Thanks Joe To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Tue Dec 11 8:17:37 2001 Delivered-To: freebsd-standards@freebsd.org Received: from straylight.ringlet.net (discworld.nanolink.com [217.75.135.248]) by hub.freebsd.org (Postfix) with SMTP id E5F3237B439 for ; Tue, 11 Dec 2001 08:17:24 -0800 (PST) Received: (qmail 3785 invoked by uid 1000); 11 Dec 2001 16:16:28 -0000 Date: Tue, 11 Dec 2001 18:16:27 +0200 From: Peter Pentchev To: Joe Halpin Cc: "standards@FreeBSD.ORG" Subject: Re: to-do list Message-ID: <20011211181627.D578@straylight.oblivion.bg> References: <3C162663.FE4DDD08@attbi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <3C162663.FE4DDD08@attbi.com>; from joe.halpin@attbi.com on Tue, Dec 11, 2001 at 09:29:39AM -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 Tue, Dec 11, 2001 at 09:29:39AM -0600, Joe Halpin wrote: > Hello, > > I'd like to help out if I can. I've never worked on an open-souce > project before, so I'm not entirely sure how to go about it. > > I was looking at the to-do list at > > http://people.FreeBSD.org/~mike/c99/#mailinglist > > and see a couple things I think I could work on. Do I need to sign up > with someone, or just do it and let someone know when I'm done, or what? > I'm thinking specifically of the item that says "Add -r and -t options > to the at utility.". Just do it, then send your patches to this list. Saying that you are going to do it might be helpful to avoid duplication of effort, but AFAIK, there is no official place to sign up - just saying so on this list would do :) G'luck, Peter -- This would easier understand fewer had omitted. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Tue Dec 11 10:12:49 2001 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 5540037B416 for ; Tue, 11 Dec 2001 10:12:47 -0800 (PST) Received: (from mike@localhost) by espresso.q9media.com (8.11.6/8.11.6) id fBBIBLZ33614; Tue, 11 Dec 2001 13:11:21 -0500 (EST) (envelope-from mike) Date: Tue, 11 Dec 2001 13:11:21 -0500 From: Mike Barcroft To: Joe Halpin Cc: "standards@FreeBSD.ORG" Subject: Re: to-do list Message-ID: <20011211131121.V1956@espresso.q9media.com> References: <3C162663.FE4DDD08@attbi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <3C162663.FE4DDD08@attbi.com>; from joe.halpin@attbi.com on Tue, Dec 11, 2001 at 09:29:39AM -0600 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 Joe Halpin writes: > I'd like to help out if I can. I've never worked on an open-souce > project before, so I'm not entirely sure how to go about it. Contacting the list is the best way to go about it. > I was looking at the to-do list at > > http://people.FreeBSD.org/~mike/c99/#mailinglist > > and see a couple things I think I could work on. Do I need to sign up > with someone, or just do it and let someone know when I'm done, or what? > I'm thinking specifically of the item that says "Add -r and -t options > to the at utility.". Consider yourself signed up for the at utility task. :) To you get started you should checkout the latest -CURRENT sources, make your changes, generate a diff, then send it to the list for review. If you need more details or help, feel free to e-mail me privately. 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 Tue Dec 11 17:28:11 2001 Delivered-To: freebsd-standards@freebsd.org Received: from theshell.com (arsenic.theshell.com [63.236.138.5]) by hub.freebsd.org (Postfix) with SMTP id 57B4B37B416 for ; Tue, 11 Dec 2001 17:28:09 -0800 (PST) Received: (qmail 50139 invoked from network); 12 Dec 2001 01:28:08 -0000 Received: from arsenic.theshell.com (HELO tequila) (root@63.236.138.5) by arsenic.theshell.com with SMTP; 12 Dec 2001 01:28:08 -0000 From: "Peter Avalos" To: Subject: renice Date: Tue, 11 Dec 2001 19:29:31 -0600 Message-ID: <001201c182ac$7357e350$0401a8c0@tequila> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal 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 was looking into adding the -n option to renice, but I got a little confused when I read about it. Is renice supposed to only accept the -n option, or is it supposed to be compatible with how it's done now, and have -n just be an additional option? Reference: http://www.opengroup.org/onlinepubs/7908799/xcu/renice.html If someone could clear that up for me, I'll go ahead and volunteer to implement it. --Pete -----BEGIN GEEK CODE BLOCK----- Version: 3.12 GCS/MU d-(+) s:+> a-- C++$ UBL++++$ P+ L- E- W+(--) N+ o? K? w(++) O M- V- PS+ PE++ Y+ PGP t+ 5 X- R- tv+ b++ DI- D---- G e++ h-- r++ y++ ------END GEEK CODE BLOCK------ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Tue Dec 11 17:44:35 2001 Delivered-To: freebsd-standards@freebsd.org Received: from ns1.infowest.com (ns1.infowest.com [204.17.177.10]) by hub.freebsd.org (Postfix) with ESMTP id 1A13537B417 for ; Tue, 11 Dec 2001 17:44:29 -0800 (PST) Received: from there (208.186.107.222.dsl.infowest.net [208.186.107.222]) by ns1.infowest.com (Postfix) with SMTP id 2775220F31; Tue, 11 Dec 2001 18:44:29 -0700 (MST) Content-Type: text/plain; charset="iso-8859-1" From: Samuel J.Greear Organization: GetMegabits, Inc. To: "Peter Avalos" , Subject: Re: renice Date: Wed, 12 Dec 2001 18:40:46 -0700 X-Mailer: KMail [version 1.3] References: <001201c182ac$7357e350$0401a8c0@tequila> In-Reply-To: <001201c182ac$7357e350$0401a8c0@tequila> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20011212014429.2775220F31@ns1.infowest.com> 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 Tuesday 11 December 2001 06:29 pm, Peter Avalos wrote: > I was looking into adding the -n option to renice, but I got a little > confused when I read about it. Is renice supposed to only accept the -n > option, or is it supposed to be compatible with how it's done now, and > have -n just be an additional option? > > Reference: > http://www.opengroup.org/onlinepubs/7908799/xcu/renice.html > > If someone could clear that up for me, I'll go ahead and volunteer to > implement it. > > --Pete > http://cvs.evilbsd.org/cgi-bin/cvsweb.cgi/evilbsd/usr.bin/renice/renice.c?rev=1.2 I've done this. It's compatible with the current behavior, as well as accepting -n (just strips the -n if it exists). I also added an -a option, which allows you to renice multiple processes matching a name, similar to killall. bash-2.05$ ./renice -n 10 [ -a ] bash 6583: old priority 0, new priority 10 4849: old priority 0, new priority 10 4145: old priority 0, new priority 10 for example... But I wanted to do a little work to the manpage yet... I've also done several others.. nice, wc, uudecode, and had planned on doing several more. Sam > > -----BEGIN GEEK CODE BLOCK----- > Version: 3.12 > GCS/MU d-(+) s:+> a-- C++$ UBL++++$ P+ L- E- W+(--) N+ o? K? w(++) O M- > V- PS+ PE++ Y+ PGP t+ 5 X- R- tv+ b++ DI- D---- G e++ h-- r++ y++ > ------END GEEK CODE BLOCK------ > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-standards" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Tue Dec 11 21:49:23 2001 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 7727C37B41D for ; Tue, 11 Dec 2001 21:49:21 -0800 (PST) Received: (from mike@localhost) by espresso.q9media.com (8.11.6/8.11.6) id fBC5lSB35738; Wed, 12 Dec 2001 00:47:28 -0500 (EST) (envelope-from mike) Date: Wed, 12 Dec 2001 00:47:28 -0500 From: Mike Barcroft To: "Samuel J . Greear" Cc: Peter Avalos , FreeBSD-standards@freebsd.org Subject: Re: renice Message-ID: <20011212004728.Y1956@espresso.q9media.com> References: <001201c182ac$7357e350$0401a8c0@tequila> <20011212014429.2775220F31@ns1.infowest.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20011212014429.2775220F31@ns1.infowest.com>; from dragonk@evilcode.net on Wed, Dec 12, 2001 at 06:40:46PM -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 Samuel J . Greear writes: > http://cvs.evilbsd.org/cgi-bin/cvsweb.cgi/evilbsd/usr.bin/renice/renice.c?rev=1.2 > > I've done this. It's compatible with the current behavior, as well as > accepting -n (just strips the -n if it exists). I also added an -a option, > which allows you to renice multiple processes matching a name, > similar to killall. It would be inadvisable to even use this as a reference. style(9) has been completely distroyed between revision 1.1 and 1.2. Added to that, the only functionality changes were combined with the destylification to culminate into one truly undesirable delta. Also, the renice.c file is missing a few revisions made in FreeBSD. It looks like NetBSD has added this functionality already, without making hundreds of style mistakes. :) If necessary, we could borrow their code, but I suspect the change will be trivial enough as to not require a reference. :) 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 Tue Dec 11 22:10: 3 2001 Delivered-To: freebsd-standards@freebsd.org Received: from ns1.infowest.com (ns1.infowest.com [204.17.177.10]) by hub.freebsd.org (Postfix) with ESMTP id BAF5037B41F; Tue, 11 Dec 2001 22:09:57 -0800 (PST) Received: from there (208.186.107.222.dsl.infowest.net [208.186.107.222]) by ns1.infowest.com (Postfix) with SMTP id 000DA20FAB; Tue, 11 Dec 2001 23:09:56 -0700 (MST) Content-Type: text/plain; charset="iso-8859-1" From: Samuel J.Greear Organization: GetMegabits, Inc. To: Mike Barcroft Subject: Re: renice Date: Wed, 12 Dec 2001 23:06:15 -0700 X-Mailer: KMail [version 1.3] Cc: FreeBSD-standards@freebsd.org References: <001201c182ac$7357e350$0401a8c0@tequila> <20011212014429.2775220F31@ns1.infowest.com> <20011212004728.Y1956@espresso.q9media.com> In-Reply-To: <20011212004728.Y1956@espresso.q9media.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <20011212060957.000DA20FAB@ns1.infowest.com> 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 Tuesday 11 December 2001 10:47 pm, Mike Barcroft wrote: > Samuel J . Greear writes: > > http://cvs.evilbsd.org/cgi-bin/cvsweb.cgi/evilbsd/usr.bin/renice/renice.c > >?rev=1.2 > > > > I've done this. It's compatible with the current behavior, as well as > > accepting -n (just strips the -n if it exists). I also added an -a > > option, which allows you to renice multiple processes matching a name, > > similar to killall. > > It would be inadvisable to even use this as a reference. style(9) has > been completely distroyed between revision 1.1 and 1.2. Added to > that, the only functionality changes were combined with the > destylification to culminate into one truly undesirable delta. Also, > the renice.c file is missing a few revisions made in FreeBSD. > > It looks like NetBSD has added this functionality already, without > making hundreds of style mistakes. :) If necessary, we could borrow > their code, but I suspect the change will be trivial enough as to not > require a reference. :) > > Best regards, > Mike Barcroft If it looked ok otherwise it would take me all of 2 minutes to re-style(9)-ize it. This was against -STABLE, so no doubt it will have missed a change or two. -n is something of a 2-line change. And this is exactly why I don't speak up very often. Sam > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-standards" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Wed Dec 12 20:30:36 2001 Delivered-To: freebsd-standards@freebsd.org Received: from theshell.com (arsenic.theshell.com [63.236.138.5]) by hub.freebsd.org (Postfix) with SMTP id DA76937B416 for ; Wed, 12 Dec 2001 20:30:33 -0800 (PST) Received: (qmail 1918 invoked from network); 13 Dec 2001 04:30:33 -0000 Received: from arsenic.theshell.com (HELO tequila) (root@63.236.138.5) by arsenic.theshell.com with SMTP; 13 Dec 2001 04:30:33 -0000 From: "Peter Avalos" To: "'Mike Barcroft'" Cc: Subject: RE: renice Date: Wed, 12 Dec 2001 22:31:58 -0600 Message-ID: <000601c1838f$1b02e0e0$0401a8c0@tequila> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2627 In-Reply-To: <20011212004728.Y1956@espresso.q9media.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal 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 > It would be inadvisable to even use this as a reference. > style(9) has been completely distroyed between revision 1.1 > and 1.2. Added to that, the only functionality changes were > combined with the destylification to culminate into one truly > undesirable delta. Also, the renice.c file is missing a few > revisions made in FreeBSD. > I took a look and it seems like he just accepts -n as a valid argument instead of actually doing something with it. I went ahead and made my own changes to the source, but I need some help with the man page. Here's my work: http://www.theshell.com/~pavalos/renice.diff -Add __FBSDID -Order #include's -accept the -n argument -interpret all arguments as id's for either -g, -p, or -u. The previous renice would accept multiple -g, -p, and -u options. I'm having a hard time explaining this, so hopefully the new usage() explains it better. > It looks like NetBSD has added this functionality already, > without making hundreds of style mistakes. :) If necessary, > we could borrow their code, but I suspect the change will be > trivial enough as to not require a reference. :) I took a look after I wrote this patch and it looks like I'm not doing anything too crazy. Please let me know if there's any questions/concerns. Thanks, Pete To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Dec 13 11:15:49 2001 Delivered-To: freebsd-standards@freebsd.org Received: from storm.FreeBSD.org.uk (storm.FreeBSD.org.uk [194.242.139.170]) by hub.freebsd.org (Postfix) with ESMTP id D41F537B41C for ; Thu, 13 Dec 2001 11:15:46 -0800 (PST) Received: (from uucp@localhost) by storm.FreeBSD.org.uk (8.11.6/8.11.6) with UUCP id fBDJFjU11408 for standards@freebsd.org; Thu, 13 Dec 2001 19:15:45 GMT (envelope-from mark@grondar.za) Received: from grondar.za (mark@localhost [127.0.0.1]) by grimreaper.grondar.org (8.11.6/8.11.6) with ESMTP id fBDJCRU79566 for ; Thu, 13 Dec 2001 19:12:27 GMT (envelope-from mark@grondar.za) Message-Id: <200112131912.fBDJCRU79566@grimreaper.grondar.org> To: standards@freebsd.org Subject: Wrong type for gid in include/gid.h? Date: Thu, 13 Dec 2001 19:12:27 +0000 From: Mark Murray 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 This patch fixes a few warnings in usr.bin and has worked fine for me for N make worlds and about a month of runtime. Any objections to me committing this? M Index: grp.h =================================================================== RCS file: /home/ncvs/src/include/grp.h,v retrieving revision 1.3 diff -u -d -r1.3 grp.h --- grp.h 7 May 1997 19:59:59 -0000 1.3 +++ grp.h 7 Dec 2001 20:48:47 -0000 @@ -48,7 +48,7 @@ struct group { char *gr_name; /* group name */ char *gr_passwd; /* group password */ - int gr_gid; /* group id */ + gid_t gr_gid; /* group id */ char **gr_mem; /* group members */ }; To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Dec 13 11:21:47 2001 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 9F0C037B416 for ; Thu, 13 Dec 2001 11:21:45 -0800 (PST) Received: (from wollman@localhost) by khavrinen.lcs.mit.edu (8.11.4/8.11.4) id fBDJLYQ84665; Thu, 13 Dec 2001 14:21:34 -0500 (EST) (envelope-from wollman) Date: Thu, 13 Dec 2001 14:21:34 -0500 (EST) From: Garrett Wollman Message-Id: <200112131921.fBDJLYQ84665@khavrinen.lcs.mit.edu> To: Mark Murray Cc: standards@FreeBSD.ORG Subject: Wrong type for gid in include/gid.h? In-Reply-To: <200112131912.fBDJCRU79566@grimreaper.grondar.org> References: <200112131912.fBDJCRU79566@grimreaper.grondar.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 patch fixes a few warnings in usr.bin and has worked > fine for me for N make worlds and about a month of runtime. > Any objections to me committing this? There was a reason not to do it, but I can't for the life of me remember what it was. That file already assumes that gid_t is declared, and I don't think that there is any architecture where making this change would affect the ABI. -GAWollman To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Thu Dec 13 11:31: 3 2001 Delivered-To: freebsd-standards@freebsd.org Received: from storm.FreeBSD.org.uk (storm.FreeBSD.org.uk [194.242.139.170]) by hub.freebsd.org (Postfix) with ESMTP id C024337B417 for ; Thu, 13 Dec 2001 11:30:59 -0800 (PST) Received: (from uucp@localhost) by storm.FreeBSD.org.uk (8.11.6/8.11.6) with UUCP id fBDJUtx11618; Thu, 13 Dec 2001 19:30:55 GMT (envelope-from mark@grondar.za) Received: from grondar.za (mark@localhost [127.0.0.1]) by grimreaper.grondar.org (8.11.6/8.11.6) with ESMTP id fBDJRgU79681; Thu, 13 Dec 2001 19:27:42 GMT (envelope-from mark@grondar.za) Message-Id: <200112131927.fBDJRgU79681@grimreaper.grondar.org> To: Garrett Wollman Cc: standards@FreeBSD.ORG Subject: Re: Wrong type for gid in include/gid.h? References: <200112131921.fBDJLYQ84665@khavrinen.lcs.mit.edu> In-Reply-To: <200112131921.fBDJLYQ84665@khavrinen.lcs.mit.edu> ; from Garrett Wollman "Thu, 13 Dec 2001 14:21:34 EST." Date: Thu, 13 Dec 2001 19:27:41 +0000 From: Mark Murray 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 patch fixes a few warnings in usr.bin and has worked > > fine for me for N make worlds and about a month of runtime. > > > Any objections to me committing this? > > There was a reason not to do it, but I can't for the life of me > remember what it was. That file already assumes that gid_t is > declared, and I don't think that there is any architecture where > making this change would affect the ABI. So is that a "go" for commit? M -- o Mark Murray \_ FreeBSD Services Limited O.\_ Warning: this .sig is umop ap!sdn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Dec 14 0:34:34 2001 Delivered-To: freebsd-standards@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 522FE37B416 for ; Fri, 14 Dec 2001 00:34:27 -0800 (PST) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.6/8.11.2) id fBE8Y5k40260; Fri, 14 Dec 2001 10:34:05 +0200 (EET) (envelope-from ru) Date: Fri, 14 Dec 2001 10:34:05 +0200 From: Ruslan Ermilov To: Mark Murray Cc: standards@FreeBSD.ORG Subject: Re: Wrong type for gid in include/gid.h? Message-ID: <20011214103405.D35094@sunbay.com> References: <200112131912.fBDJCRU79566@grimreaper.grondar.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200112131912.fBDJCRU79566@grimreaper.grondar.org> User-Agent: Mutt/1.3.23i 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, Dec 13, 2001 at 07:12:27PM +0000, Mark Murray wrote: > Hi > > This patch fixes a few warnings in usr.bin and has worked > fine for me for N make worlds and about a month of runtime. > > Any objections to me committing this? > > M > Index: grp.h > =================================================================== > RCS file: /home/ncvs/src/include/grp.h,v > retrieving revision 1.3 > diff -u -d -r1.3 grp.h > --- grp.h 7 May 1997 19:59:59 -0000 1.3 > +++ grp.h 7 Dec 2001 20:48:47 -0000 > @@ -48,7 +48,7 @@ > struct group { > char *gr_name; /* group name */ > char *gr_passwd; /* group password */ > - int gr_gid; /* group id */ > + gid_t gr_gid; /* group id */ > char **gr_mem; /* group members */ > }; > If you also going to fix initgroups(3) and friends, I'm all for that. NetBSD had this for years. Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Dec 14 2:51: 2 2001 Delivered-To: freebsd-standards@freebsd.org Received: from storm.FreeBSD.org.uk (storm.FreeBSD.org.uk [194.242.139.170]) by hub.freebsd.org (Postfix) with ESMTP id 6371637B405; Fri, 14 Dec 2001 02:51:00 -0800 (PST) Received: (from uucp@localhost) by storm.FreeBSD.org.uk (8.11.6/8.11.6) with UUCP id fBEAoxe47456; Fri, 14 Dec 2001 10:50:59 GMT (envelope-from mark@grondar.za) Received: from grondar.za (mark@localhost [127.0.0.1]) by grimreaper.grondar.org (8.11.6/8.11.6) with ESMTP id fBEAn2U84396; Fri, 14 Dec 2001 10:49:02 GMT (envelope-from mark@grondar.za) Message-Id: <200112141049.fBEAn2U84396@grimreaper.grondar.org> To: Ruslan Ermilov Cc: standards@FreeBSD.ORG Subject: Re: Wrong type for gid in include/gid.h? References: <20011214103405.D35094@sunbay.com> In-Reply-To: <20011214103405.D35094@sunbay.com> ; from Ruslan Ermilov "Fri, 14 Dec 2001 10:34:05 +0200." Date: Fri, 14 Dec 2001 10:49:02 +0000 From: Mark Murray 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 > If you also going to fix initgroups(3) and friends, I'm > all for that. NetBSD had this for years. What is wrong with initgroups? M -- o Mark Murray \_ FreeBSD Services Limited O.\_ Warning: this .sig is umop ap!sdn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Dec 14 3:51:47 2001 Delivered-To: freebsd-standards@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 6008437B419 for ; Fri, 14 Dec 2001 03:51:38 -0800 (PST) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.6/8.11.2) id fBEBoF365039; Fri, 14 Dec 2001 13:50:15 +0200 (EET) (envelope-from ru) Date: Fri, 14 Dec 2001 13:50:15 +0200 From: Ruslan Ermilov To: Mark Murray Cc: standards@FreeBSD.ORG Subject: Re: Wrong type for gid in include/gid.h? Message-ID: <20011214135015.A64853@sunbay.com> References: <20011214103405.D35094@sunbay.com> <200112141049.fBEAn2U84396@grimreaper.grondar.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200112141049.fBEAn2U84396@grimreaper.grondar.org> User-Agent: Mutt/1.3.23i 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, Dec 14, 2001 at 10:49:02AM +0000, Mark Murray wrote: > > If you also going to fix initgroups(3) and friends, I'm > > all for that. NetBSD had this for years. > > What is wrong with initgroups? > initgroups(3) and getgrouplist(3) both use `int' where they should have used `gid_t'. Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Dec 14 5:45:42 2001 Delivered-To: freebsd-standards@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id 6D1E837B41B; Fri, 14 Dec 2001 05:45:10 -0800 (PST) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.6/8.11.2) id fBEDj7H81457; Fri, 14 Dec 2001 15:45:07 +0200 (EET) (envelope-from ru) Date: Fri, 14 Dec 2001 15:45:07 +0200 From: Ruslan Ermilov To: Andrey Chernov , Guido van Rooij Cc: standards@FreeBSD.org Subject: Recent POSIX.1-2001 implementation of strtol(3) breaks POLA (was: Re: cvs commit: src/etc/periodic/security 550.ipfwlimit 650.ip6fwlimit) Message-ID: <20011214154506.A79266@sunbay.com> References: <200112140858.fBE8wL596075@freefall.freebsd.org> <20011214115711.A34932@gvr.gvr.org> <20011214135243.B64853@sunbay.com> <20011214125438.A35615@gvr.gvr.org> <20011214142928.A69958@sunbay.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20011214142928.A69958@sunbay.com> User-Agent: Mutt/1.3.23i 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, Dec 14, 2001 at 02:29:28PM +0200, Ruslan Ermilov wrote: > On Fri, Dec 14, 2001 at 12:54:38PM +0100, Guido van Rooij wrote: > > On Fri, Dec 14, 2001 at 01:52:43PM +0200, Ruslan Ermilov wrote: > > > On Fri, Dec 14, 2001 at 11:57:11AM +0100, Guido van Rooij wrote: > > > > On Fri, Dec 14, 2001 at 12:58:21AM -0800, Ruslan Ermilov wrote: > > > > > ru 2001/12/14 00:58:21 PST > > > > > > > > > > Modified files: > > > > > etc/periodic/security 550.ipfwlimit 650.ip6fwlimit > > > > > Log: > > > > > Work around the bugfeature of test(1). > > > > > > > > > > PR: bin/32822 > > > > > > > > > > > > If I run this: > > > > if [ 0 -eq 0 -a "" -ne 1 ]; > > > > then echo foo > > > > fi > > > > then it works. Isn't the real problem that "${IPFW_LOG_LIMIT}" gets lost > > > > somehow? > > > > > > > Nope, try this: > > > > > > FOO= > > > if [ 0 -eq 1 -a ${FOO} -ne 1 ]; then > > > echo OK > > > fi > > > > > > An alternate solution would be to write: > > > > > > if [ 0 -eq 1 -a "${FOO}" -ne 1 ]; then > > > > But that is what was in /etc/security.. So why did it fail? > > > Now I feel really confused. I could reproduce this at the > morning, but couldn't after reading your mail. Fortunately, > I've figured what's different: > > $ /STABLE/bin/[ "" -eq 0 ] > $ /CURRENT/bin/[ "" -eq 0 ] > [: : out of range > > I'll investigate what's wrong with -current's /bin/[ shortly > and will back my (not actually relevant) changes out. > The actual difference turned out to be in strtol(3), not test(1). The following program demonstrates the difference: #include #include #include #include int main(void) { const char *s = ""; char *p; errno = 0; (void) strtol(s, &p, 10); if (errno != 0) errx(1, "%s: out of range", s); exit(0); } In -CURRENT, Andrey Chernov recently committed his POSIX.1-2001 compliant version of strtol(). POSIX, in particular, says about strtol() and strtoll(): : First, they decompose the input string into three parts: : : 1. An initial, possibly empty, sequence of white-space characters : (as specified by isspace()) : : 2. A subject sequence interpreted as an integer represented in some : radix determined by the value of base : : 3. A final string of one or more unrecognized characters, including : the terminating null byte of the input string. And then: : If the subject sequence is empty or does not have the expected form, : no conversion is performed; the value of str is stored in the ^^^^^^^^^^^^^^^^^^^^^^^^^^ : object pointed to by endptr, provided t hat endptr is not a null : pointer. The strtol() function shall not change the setting of errno : if successful. And later: : Upon successful completion, these functions shall return the converted : value, if any. If no conversion could be performed, 0 shall be ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ : returned and errno may be set to [EINVAL]. ^^^^^^^^^^^^^^^^^^^^^^ So, it seems that the "empty subject sequence" case falls under the "if no conversion could be performed" case, and strtol() MAY set errno to [EINVAL]. Well, I've tested the behavior of strtol() in regards to this on NetBSD, OpenBSD, UnixWare, and Linux. In NetBSD and OpenBSD, strtol() doesn't set errno to EINVAL if the subject is empty. In UnixWare, it does, but atoi(3), which is implemented there using strtol() too, has a special hack to not set errno to EINVAL in this case, and this is a documented behavior. Linux's strtol() doesn't set errno to EINVAL too, but their test(1) utility works like this: $ /usr/bin/test "" -eq 0 /usr/bin/test: integer expression expected before -eq What's really broken in FreeBSD now is that the following: errno = 0; atoi(""); sets errno to [EINVAL], while it shouldn't. I think this may break many things. So while the current behavior of strtol() is accepted by POSIX, I suggest that we don't return [EINVAL] for an empty subject case, as it's not required, and as could be seen from the above in against POLA. This should fix it. --- /usr/src/lib/libc/stdlib/strtol.c Mon Dec 10 10:36:35 2001 +++ strtol.c Fri Dec 14 15:40:23 2001 @@ -87,8 +87,10 @@ strtol(nptr, endptr, base) if (base == 0) base = c == '0' ? 8 : 10; acc = any = 0; - if (base < 2 || base > 36) + if (base < 2 || base > 36) { + errno = EINVAL; goto noconv; + } /* * Compute the cutoff value between legal numbers and illegal @@ -133,11 +135,9 @@ strtol(nptr, endptr, base) if (any < 0) { acc = neg ? LONG_MIN : LONG_MAX; errno = ERANGE; - } else if (!any) { -noconv: - errno = EINVAL; - } else if (neg) + } else if (any > 0 && neg) acc = -acc; +noconv: if (endptr != NULL) *endptr = (char *)(any ? s - 1 : nptr); return (acc); Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Dec 14 5:54: 3 2001 Delivered-To: freebsd-standards@freebsd.org Received: from gvr.gvr.org (gvr.gvr.org [212.61.40.17]) by hub.freebsd.org (Postfix) with ESMTP id 4B44A37B405; Fri, 14 Dec 2001 05:53:58 -0800 (PST) Received: by gvr.gvr.org (Postfix, from userid 657) id DE44B5809; Fri, 14 Dec 2001 14:53:55 +0100 (CET) Date: Fri, 14 Dec 2001 14:53:55 +0100 From: Guido van Rooij To: Ruslan Ermilov Cc: Andrey Chernov , standards@FreeBSD.org Subject: Re: Recent POSIX.1-2001 implementation of strtol(3) breaks POLA (was: Re: cvs commit: src/etc/periodic/security 550.ipfwlimit 650.ip6fwlimit) Message-ID: <20011214145355.B36368@gvr.gvr.org> References: <200112140858.fBE8wL596075@freefall.freebsd.org> <20011214115711.A34932@gvr.gvr.org> <20011214135243.B64853@sunbay.com> <20011214125438.A35615@gvr.gvr.org> <20011214142928.A69958@sunbay.com> <20011214154506.A79266@sunbay.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20011214154506.A79266@sunbay.com>; from ru@FreeBSD.org on Fri, Dec 14, 2001 at 03:45:07PM +0200 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, Dec 14, 2001 at 03:45:07PM +0200, Ruslan Ermilov wrote: > > So while the current behavior of strtol() is accepted by > POSIX, I suggest that we don't return [EINVAL] for an > empty subject case, as it's not required, and as could > be seen from the above in against POLA. This should > fix it. Seems a good idea. Good hunting, btw! -Guido To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Dec 14 9:37:34 2001 Delivered-To: freebsd-standards@freebsd.org Received: from straylight.ringlet.net (sentinel.office1.bg [217.75.134.126]) by hub.freebsd.org (Postfix) with SMTP id 4E02337B41C for ; Fri, 14 Dec 2001 09:37:29 -0800 (PST) Received: (qmail 5302 invoked by uid 1000); 14 Dec 2001 17:36:32 -0000 Date: Fri, 14 Dec 2001 19:36:31 +0200 From: Peter Pentchev To: Ruslan Ermilov Cc: Mark Murray , standards@FreeBSD.ORG Subject: Re: Wrong type for gid in include/gid.h? Message-ID: <20011214193631.A796@straylight.oblivion.bg> References: <20011214103405.D35094@sunbay.com> <200112141049.fBEAn2U84396@grimreaper.grondar.org> <20011214135015.A64853@sunbay.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20011214135015.A64853@sunbay.com>; from ru@FreeBSD.ORG on Fri, Dec 14, 2001 at 01:50:15PM +0200 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, Dec 14, 2001 at 01:50:15PM +0200, Ruslan Ermilov wrote: > On Fri, Dec 14, 2001 at 10:49:02AM +0000, Mark Murray wrote: > > > If you also going to fix initgroups(3) and friends, I'm > > > all for that. NetBSD had this for years. > > > > What is wrong with initgroups? > > > initgroups(3) and getgrouplist(3) both use `int' where they > should have used `gid_t'. Actually, there are many places in the base system which assume that gr_gid is int. Some of them are trivial to fix, some - like amd, pw(8) and sysinstall - require a bit more thinking. G'luck, Peter -- What would this sentence be like if pi were 3? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Dec 14 10:15: 2 2001 Delivered-To: freebsd-standards@freebsd.org Received: from storm.FreeBSD.org.uk (storm.FreeBSD.org.uk [194.242.139.170]) by hub.freebsd.org (Postfix) with ESMTP id 2A8AA37B405 for ; Fri, 14 Dec 2001 10:15:00 -0800 (PST) Received: (from uucp@localhost) by storm.FreeBSD.org.uk (8.11.6/8.11.6) with UUCP id fBEIEaO01243; Fri, 14 Dec 2001 18:14:36 GMT (envelope-from mark@grondar.za) Received: from grondar.za (mark@localhost [127.0.0.1]) by grimreaper.grondar.org (8.11.6/8.11.6) with ESMTP id fBEI8EU03012; Fri, 14 Dec 2001 18:08:14 GMT (envelope-from mark@grondar.za) Message-Id: <200112141808.fBEI8EU03012@grimreaper.grondar.org> To: Peter Pentchev Cc: standards@FreeBSD.ORG Subject: Re: Wrong type for gid in include/gid.h? References: <20011214193631.A796@straylight.oblivion.bg> In-Reply-To: <20011214193631.A796@straylight.oblivion.bg> ; from Peter Pentchev "Fri, 14 Dec 2001 19:36:31 +0200." Date: Fri, 14 Dec 2001 18:08:13 +0000 From: Mark Murray 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 > Actually, there are many places in the base system which assume > that gr_gid is int. Some of them are trivial to fix, some - like > amd, pw(8) and sysinstall - require a bit more thinking. Sing them out - I'll fix them :-) M -- o Mark Murray \_ FreeBSD Services Limited O.\_ Warning: this .sig is umop ap!sdn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Dec 14 10:24: 7 2001 Delivered-To: freebsd-standards@freebsd.org Received: from straylight.ringlet.net (sentinel.office1.bg [217.75.134.126]) by hub.freebsd.org (Postfix) with SMTP id 6CE7837B416 for ; Fri, 14 Dec 2001 10:24:02 -0800 (PST) Received: (qmail 5859 invoked by uid 1000); 14 Dec 2001 18:23:05 -0000 Date: Fri, 14 Dec 2001 20:23:05 +0200 From: Peter Pentchev To: Mark Murray Cc: standards@FreeBSD.ORG Subject: Re: Wrong type for gid in include/gid.h? Message-ID: <20011214202305.B796@straylight.oblivion.bg> References: <20011214193631.A796@straylight.oblivion.bg> <200112141808.fBEI8EU03012@grimreaper.grondar.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <200112141808.fBEI8EU03012@grimreaper.grondar.org>; from mark@grondar.za on Fri, Dec 14, 2001 at 06:08:13PM +0000 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, Dec 14, 2001 at 06:08:13PM +0000, Mark Murray wrote: > > Actually, there are many places in the base system which assume > > that gr_gid is int. Some of them are trivial to fix, some - like > > amd, pw(8) and sysinstall - require a bit more thinking. > > Sing them out - I'll fix them :-) I have a RELENG_4 patch that fixes those that were present in -stable about two months ago. The way I did it was simply a find /usr/src -type f | xargs fgrep -l gr_gid and then look at the files. I could give you the patch, but it's against -stable, and it's against an old -stable (I have not checked the commits in the meantime to see if they've introduced new gr_gid misuses, but I've been updating the patch to apply properly to -stable as it evolves). A fresh new look at the whole source tree would be the best way to find them. G'luck, Peter -- If there were no counterfactuals, this sentence would not have been paradoxical. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Dec 14 10:37:31 2001 Delivered-To: freebsd-standards@freebsd.org Received: from storm.FreeBSD.org.uk (storm.FreeBSD.org.uk [194.242.139.170]) by hub.freebsd.org (Postfix) with ESMTP id D211737B420 for ; Fri, 14 Dec 2001 10:37:25 -0800 (PST) Received: (from uucp@localhost) by storm.FreeBSD.org.uk (8.11.6/8.11.6) with UUCP id fBEIbNT01527; Fri, 14 Dec 2001 18:37:23 GMT (envelope-from mark@grondar.za) Received: from grondar.za (mark@localhost [127.0.0.1]) by grimreaper.grondar.org (8.11.6/8.11.6) with ESMTP id fBEIZsU03288; Fri, 14 Dec 2001 18:35:54 GMT (envelope-from mark@grondar.za) Message-Id: <200112141835.fBEIZsU03288@grimreaper.grondar.org> To: Peter Pentchev Cc: standards@FreeBSD.ORG Subject: Re: Wrong type for gid in include/gid.h? References: <20011214202305.B796@straylight.oblivion.bg> In-Reply-To: <20011214202305.B796@straylight.oblivion.bg> ; from Peter Pentchev "Fri, 14 Dec 2001 20:23:05 +0200." Date: Fri, 14 Dec 2001 18:35:53 +0000 From: Mark Murray 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 have a RELENG_4 patch that fixes those that were present in -stable > about two months ago. The way I did it was simply a > find /usr/src -type f | xargs fgrep -l gr_gid > and then look at the files. OK - I'll do that then :-) M -- o Mark Murray \_ FreeBSD Services Limited O.\_ Warning: this .sig is umop ap!sdn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Dec 14 10:42:55 2001 Delivered-To: freebsd-standards@freebsd.org Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by hub.freebsd.org (Postfix) with ESMTP id F01BA37B41D for ; Fri, 14 Dec 2001 10:42:43 -0800 (PST) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.11.6/8.11.2) id fBEIfrL27412; Fri, 14 Dec 2001 20:41:53 +0200 (EET) (envelope-from ru) Date: Fri, 14 Dec 2001 20:41:53 +0200 From: Ruslan Ermilov To: Mark Murray Cc: Peter Pentchev , standards@FreeBSD.ORG Subject: Re: Wrong type for gid in include/gid.h? Message-ID: <20011214204153.J16945@sunbay.com> References: <20011214202305.B796@straylight.oblivion.bg> <200112141835.fBEIZsU03288@grimreaper.grondar.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200112141835.fBEIZsU03288@grimreaper.grondar.org> User-Agent: Mutt/1.3.23i 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, Dec 14, 2001 at 06:35:53PM +0000, Mark Murray wrote: > > I have a RELENG_4 patch that fixes those that were present in -stable > > about two months ago. The way I did it was simply a > > find /usr/src -type f | xargs fgrep -l gr_gid > > and then look at the files. > > OK - I'll do that then :-) > May I look at the diff before you commit it? Cheers, -- Ruslan Ermilov Oracle Developer/DBA, ru@sunbay.com Sunbay Software AG, ru@FreeBSD.org FreeBSD committer, +380.652.512.251 Simferopol, Ukraine http://www.FreeBSD.org The Power To Serve http://www.oracle.com Enabling The Information Age To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Dec 14 11: 6: 5 2001 Delivered-To: freebsd-standards@freebsd.org Received: from storm.FreeBSD.org.uk (storm.FreeBSD.org.uk [194.242.139.170]) by hub.freebsd.org (Postfix) with ESMTP id 7F63D37B405; Fri, 14 Dec 2001 11:06:02 -0800 (PST) Received: (from uucp@localhost) by storm.FreeBSD.org.uk (8.11.6/8.11.6) with UUCP id fBEJ61H01970; Fri, 14 Dec 2001 19:06:01 GMT (envelope-from mark@grondar.za) Received: from grondar.za (mark@localhost [127.0.0.1]) by grimreaper.grondar.org (8.11.6/8.11.6) with ESMTP id fBEJ3cU03676; Fri, 14 Dec 2001 19:03:38 GMT (envelope-from mark@grondar.za) Message-Id: <200112141903.fBEJ3cU03676@grimreaper.grondar.org> To: Ruslan Ermilov Cc: standards@FreeBSD.ORG Subject: Re: Wrong type for gid in include/gid.h? References: <20011214204153.J16945@sunbay.com> In-Reply-To: <20011214204153.J16945@sunbay.com> ; from Ruslan Ermilov "Fri, 14 Dec 2001 20:41:53 +0200." Date: Fri, 14 Dec 2001 19:03:38 +0000 From: Mark Murray 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, Dec 14, 2001 at 06:35:53PM +0000, Mark Murray wrote: > > > I have a RELENG_4 patch that fixes those that were present in -stable > > > about two months ago. The way I did it was simply a > > > find /usr/src -type f | xargs fgrep -l gr_gid > > > and then look at the files. > > > > OK - I'll do that then :-) > > > May I look at the diff before you commit it? Sure! It will take me a while to get to, and I'll put up a copy for general review. M -- o Mark Murray \_ FreeBSD Services Limited O.\_ Warning: this .sig is umop ap!sdn To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Dec 14 15: 2:43 2001 Delivered-To: freebsd-standards@freebsd.org Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by hub.freebsd.org (Postfix) with ESMTP id A76CE37B419; Fri, 14 Dec 2001 15:02:37 -0800 (PST) Received: (from ache@localhost) by nagual.pp.ru (8.11.6/8.11.6) id fBEN2Ye14778; Sat, 15 Dec 2001 02:02:34 +0300 (MSK) (envelope-from ache) Date: Sat, 15 Dec 2001 02:02:30 +0300 From: "Andrey A. Chernov" To: Ruslan Ermilov Cc: Guido van Rooij , standards@FreeBSD.org Subject: Re: Recent POSIX.1-2001 implementation of strtol(3) breaks POLA (was: Re: cvs commit: src/etc/periodic/security 550.ipfwlimit 650.ip6fwlimit) Message-ID: <20011214230229.GA14380@nagual.pp.ru> References: <200112140858.fBE8wL596075@freefall.freebsd.org> <20011214115711.A34932@gvr.gvr.org> <20011214135243.B64853@sunbay.com> <20011214125438.A35615@gvr.gvr.org> <20011214142928.A69958@sunbay.com> <20011214154506.A79266@sunbay.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20011214154506.A79266@sunbay.com> User-Agent: Mutt/1.3.23.2i 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, Dec 14, 2001 at 15:45:07 +0200, Ruslan Ermilov wrote: > > In NetBSD and OpenBSD, strtol() doesn't set errno to EINVAL if the > subject is empty. In UnixWare, it does, but atoi(3), which is > implemented there using strtol() too, has a special hack to not > set errno to EINVAL in this case, and this is a documented > behavior. It seems that UnixWare does it in the semi-right way, but I don't think POSIX allows special atoi() errno handling, it just say that it is fullly equivalent to strtol() call. > Linux's strtol() doesn't set errno to EINVAL too, but their > test(1) utility works like this: > > $ /usr/bin/test "" -eq 0 > /usr/bin/test: integer expression expected before -eq It seems that Linux test does it in the right way. Good news is that strtol()'s POSIX change find the bug. > What's really broken in FreeBSD now is that the following: > > errno = 0; > atoi(""); > > sets errno to [EINVAL], while it shouldn't. I think this > may break many things. I don't think so, just otherwise, it find the bugs in many things. If application is smart enough to handle errno, it MUST assume the POSIX "MAY" clause CAN happens. > So while the current behavior of strtol() is accepted by > POSIX, I suggest that we don't return [EINVAL] for an > empty subject case, as it's not required, and as could > be seen from the above in against POLA. This should > fix it. I disagree. Look at this from different perspective. F.e. 'test' will remains unfixed without strtol()'s change forever. strtol() position itself as input checking function and already does it in some ways. Adding yet one way seems logical, really " " is not "0". Moreover, if POSIX says MAY, any application which assumes otherwise is broken in portability sense and must be fixed. I mean 'test' or anything else will be found. -- Andrey A. Chernov http://ache.pp.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Dec 14 15:22:59 2001 Delivered-To: freebsd-standards@freebsd.org Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by hub.freebsd.org (Postfix) with ESMTP id A08A837B405; Fri, 14 Dec 2001 15:22:55 -0800 (PST) Received: (from ache@localhost) by nagual.pp.ru (8.11.6/8.11.6) id fBENMrF15033; Sat, 15 Dec 2001 02:22:54 +0300 (MSK) (envelope-from ache) Date: Sat, 15 Dec 2001 02:22:51 +0300 From: "Andrey A. Chernov" To: Ruslan Ermilov Cc: Guido van Rooij , standards@FreeBSD.ORG Subject: Re: Recent POSIX.1-2001 implementation of strtol(3) breaks POLA (was: Re: cvs commit: src/etc/periodic/security 550.ipfwlimit 650.ip6fwlimit) Message-ID: <20011214232251.GA14990@nagual.pp.ru> References: <200112140858.fBE8wL596075@freefall.freebsd.org> <20011214115711.A34932@gvr.gvr.org> <20011214135243.B64853@sunbay.com> <20011214125438.A35615@gvr.gvr.org> <20011214142928.A69958@sunbay.com> <20011214154506.A79266@sunbay.com> <20011214230229.GA14380@nagual.pp.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20011214230229.GA14380@nagual.pp.ru> User-Agent: Mutt/1.3.23.2i 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 Sat, Dec 15, 2001 at 02:02:30 +0300, Andrey A. Chernov wrote: > > $ /usr/bin/test "" -eq 0 > > /usr/bin/test: integer expression expected before -eq > > It seems that Linux test does it in the right way. Good news is that > strtol()'s POSIX change find the bug. See just fixed test.c v1.36 (from CVS log): POSIX strto*() functions MAY return EINVAL, so don't assume that only one errno from them allowed and it is always ERANGE -- Andrey A. Chernov http://ache.pp.ru/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message From owner-freebsd-standards Fri Dec 14 20:47:13 2001 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 DAB4937B419; Fri, 14 Dec 2001 20:47:10 -0800 (PST) Received: (from mike@localhost) by espresso.q9media.com (8.11.6/8.11.6) id fBF4jOZ77698; Fri, 14 Dec 2001 23:45:24 -0500 (EST) (envelope-from mike) Date: Fri, 14 Dec 2001 23:45:24 -0500 From: Mike Barcroft To: Alexey Zelkin Cc: Bill Fenner , standards@FreeBSD.ORG Subject: Re: cvs commit: src/lib/libc/stdlib strtod.c Message-ID: <20011214234524.J68310@espresso.q9media.com> References: <200111301248.fAUCmV345233@freefall.freebsd.org> <20011130145450.B68788@ark.cris.net> <200112021729.JAA08989@windsor.research.att.com> <20011210115728.A11494@ark.cris.net> <20011210211240.M1956@espresso.q9media.com> <20011211111750.A35302@ark.cris.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20011211111750.A35302@ark.cris.net>; from phantom@FreeBSD.ORG on Tue, Dec 11, 2001 at 11:17:50AM +0200 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 Alexey Zelkin writes: > I don't see a reason to get it vendor imported for few reasons: > > 1. it's only one file (src/lib/libc/stdlib/strtod.c). Maybe we need > to think to take few more like strtof(), but I not sure in > full and generalized versions compatibility. Need testing. Most > of other stuff is not supposed to work on IEEE arifmetic machines > or not standard (not included to POSIX, SuS or C99). Correct me > if I wrong. I think we should try to utilize as much of this code as possible. > 2. we'll have to change it (at least for adding new definitions of > arches). Vendor's version is supposed to work on i8087, m86k, > vax, ibm and cray arches. Perhaps the vendor would be willing to integrate support for FreeBSD. > 3. And according of "much soon than us": All problems that Bruce > mentioned are not problems, just style improvements. From Message-ID <20011203062435.C9600-100000@gamplex.bde.org>: : Most of our local changes were in the vendor version 3-4 years before : we made them, sigh. Summary of some relevant parts of changes.gz from : the above URL: : - Jan 21 1993: apparently the long -> Long hack to support systems with : 32 bit ints and 64 bit longs : - Jul 6 1996: unsigned long -> ULong : - Dec 17 1996: threads support None of these issues appear to be style related; care to elaborate? > And last I think difference in slow reaction on addition of new > features/imporovement to Netlib (merging them to FreeBSD) is more > result of lack of interest to such complicated (and already working!) > code. So, let me some time and then you'll see "request for review", please > give comments. Right, that's why I'm suggesting a vendor maintained source, because no one has enough interest to maintain it in FreeBSD. > Even (1) is enough to understand that vendor import is just overhead > because file will be taken out of vendor branch as soon as powerpc and sparc64 > arches comes to "make world" as it already has been done for alpha and ia64. I would hardly be suggesting a vendor import if I thought we wouldn't be able to leave it on the vendor branch. Best regards, Mike Barcroft To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-standards" in the body of the message