guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: setgroups


From: Rob Browning
Subject: Re: setgroups
Date: Fri, 18 Apr 2003 12:01:44 -0500
User-agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu)

address@hidden (Paul Jarc) writes:

> unsigned long lgid = SCM_INUM (foo);
> GETGROUPS_T gid = lgid;
> if (gid < 0 || lgid != (unsigned long) gid) overflow;
>
> - Is SCM_INUM guaranteed to fit in unsigned long?  If not, what type
>   can we use instead?

I believe scm_t_bits (there's also scm_t_signed_bits) may be what you
want.

> - If GETGROUPS_T is signed and "gid = lgid" overflows, the C standard
>   says it's undefined behavior.  Are we worried about that, or are we
>   confident that it'll just wrap on platforms we care about?

I wondered about signed vs unsigned gid_t too...

-- 
Rob Browning
rlb @defaultvalue.org, @linuxdevel.com, and @debian.org
Previously @cs.utexas.edu
GPG starting 2002-11-03 = 14DD 432F AE39 534D B592  F9A0 25C8 D377 8C7E 73A4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]