From owner-freebsd-current Sun Mar 12 17:51:21 2000 Delivered-To: freebsd-current@freebsd.org Received: from wall.polstra.com (rtrwan160.accessone.com [206.213.115.74]) by hub.freebsd.org (Postfix) with ESMTP id BE5AB37BE61 for ; Sun, 12 Mar 2000 17:51:18 -0800 (PST) (envelope-from jdp@polstra.com) Received: from vashon.polstra.com (vashon.polstra.com [206.213.73.13]) by wall.polstra.com (8.9.3/8.9.3) with ESMTP id RAA07115; Sun, 12 Mar 2000 17:51:18 -0800 (PST) (envelope-from jdp@polstra.com) From: John Polstra Received: (from jdp@localhost) by vashon.polstra.com (8.9.3/8.9.1) id RAA51453; Sun, 12 Mar 2000 17:51:17 -0800 (PST) (envelope-from jdp@polstra.com) Date: Sun, 12 Mar 2000 17:51:17 -0800 (PST) Message-Id: <200003130151.RAA51453@vashon.polstra.com> To: keramida@ceid.upatras.gr Subject: Re: MAX_UID ? In-Reply-To: <20000313015009.A5653@hades.hell.gr> References: <38CAD957.3C839375@originative.co.uk> <200003120430.UAA49807@vashon.polstra.com> <38CB322D.D12ED0B0@originative.co.uk> <20000313015009.A5653@hades.hell.gr> Organization: Polstra & Co., Seattle, WA Cc: current@freebsd.org Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In article <20000313015009.A5653@hades.hell.gr>, Giorgos Keramidas 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 . John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Disappointment is a good sign of basic intelligence." -- Chögyam Trungpa To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message