Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 Apr 2001 15:05:02 -0500
From:      "Jacques A. Vidrine" <n@nectar.com>
To:        Peter Pentchev <roam@orbitel.bg>
Cc:        arch@FreeBSD.org
Subject:   Re: gid_t vs. plain int
Message-ID:  <20010425150502.B2200@hamlet.nectar.com>
In-Reply-To: <20010425183640.C54687@ringworld.oblivion.bg>; from roam@orbitel.bg on Wed, Apr 25, 2001 at 06:36:40PM %2B0300
References:  <20010425183640.C54687@ringworld.oblivion.bg>

next in thread | previous in thread | raw e-mail | index | archive | help
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 <group.h> 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010425150502.B2200>