From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: To: 9fans@cse.psu.edu Subject: Re: [9fans] ulong From: Charles Forsyth Date: Tue, 17 Jan 2006 09:59:37 +0000 In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Topicbox-Message-UUID: db2f1d7c-ead0-11e9-9d60-3106f5b1d025 > (vlong)(...|((p)[3]<<24)) sign extends. Casting the (p)[0] > to (ulong) has the effect of making the whole 32-bit expression > unsigned on 32-bit systems, but if ulong is 64 bits, then > you'll still sign-extend ((p)[3]<<24) during the convertsion > from int to ulong. i'd be careful to define ulong to be 32 bits for all plan 9 source including p9p (using `ulong == unsigned int' if necessary). otherwise quite a bit more will break. having fcall.h use u32int is fine too, of course, just to make the point clearer