In article <[EMAIL PROTECTED]>,
Giorgos Keramidas  <[EMAIL PROTECTED]> wrote:
> On Sun, Mar 12, 2000 at 05:59:09AM +0000, Paul Richards wrote:
> > 
> > Are expressions like ((uid_t)0-1) portable/safe ? Maybe that's a better
> > way of approaching this.
> 
> To get the all-1's number, maybe it's better to use ((uid_t)~0), but
> that is a rather controversial topic anyway.

That works, but on machines like the Alpha where longs are bigger
than ints it only works by virtue of sign extension.  Our existing
headers seem to prefer ((uid_t)0-1).  That's what is used in the
i386's <machine/limits.h>.

John
-- 
  John Polstra                                               [EMAIL PROTECTED]
  John D. Polstra & Co., Inc.                        Seattle, Washington USA
  "Disappointment is a good sign of basic intelligence."  -- Chögyam Trungpa



To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to