From owner-freebsd-arch Wed Apr 25 13: 5: 6 2001 Delivered-To: freebsd-arch@freebsd.org Received: from gw.nectar.com (gw.nectar.com [208.42.49.153]) by hub.freebsd.org (Postfix) with ESMTP id 59D8837B422 for ; Wed, 25 Apr 2001 13:05:03 -0700 (PDT) (envelope-from nectar@nectar.com) Received: from hamlet.nectar.com (hamlet.nectar.com [10.0.1.102]) by gw.nectar.com (Postfix) with ESMTP id B1311194C7; Wed, 25 Apr 2001 15:05:02 -0500 (CDT) Received: (from nectar@localhost) by hamlet.nectar.com (8.11.3/8.9.3) id f3PK52F02351; Wed, 25 Apr 2001 15:05:02 -0500 (CDT) (envelope-from nectar@spawn.nectar.com) Date: Wed, 25 Apr 2001 15:05:02 -0500 From: "Jacques A. Vidrine" To: Peter Pentchev Cc: arch@FreeBSD.org Subject: Re: gid_t vs. plain int Message-ID: <20010425150502.B2200@hamlet.nectar.com> References: <20010425183640.C54687@ringworld.oblivion.bg> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20010425183640.C54687@ringworld.oblivion.bg>; from roam@orbitel.bg on Wed, Apr 25, 2001 at 06:36:40PM +0300 X-Url: http://www.nectar.com/ Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG On Wed, Apr 25, 2001 at 06:36:40PM +0300, Peter Pentchev wrote: > Hi, > > OK. I've (kinda) had enough. > > Is there a reason that struct group in does not define 'gr_gid' > as a gid_t value, but as a plain int? This makes all kinds of things > go berserk with gcc -Wall -W, and causes dozens of (totally unneeded) > casts. > > Is there some standard that says pw_gid is gid_t, but gr_gid is int? > If not, would anyone be interested in patches (yes, I'm prepared to sweep > the whole source tree), making gr_gid a gid_t? ISO/IEC 9945-1: 1996 (POSIX 1003.1) says that a group structure `includes the members': char * gr_name The name of the group gid_t gr_gid The numerical group ID char ** gr_mem A null-terminated vector of pointers to the individual member names Also, the getgr* functions which take a group number argument have prototypes with `gid_t'. I say go ahead and clean it up. Cheers, -- Jacques Vidrine / n@nectar.com / jvidrine@verio.net / nectar@FreeBSD.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message