From mboxrd@z Thu Jan 1 00:00:00 1970 From: erik quanstrom To: 9fans@cse.psu.edu, Russ Cox References: <15577233041e4238e7a9c8e58d670ddd@terzarima.net> <20060117005616.DEFB01140E3@dexter-peak.quanstro.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 In-Reply-To: Subject: Re: [9fans] Brdline Message-Id: <20060117014256.9D9991140EA@dexter-peak.quanstro.net> Date: Mon, 16 Jan 2006 19:42:56 -0600 Cc: Topicbox-Message-UUID: daf87d26-ead0-11e9-9d60-3106f5b1d025 Russ Cox writes | but that won't actually have any effect on systems where | int is 32 bits but long is 64. the problem is that ((p)[3]<<24) | is being (correctly) treated as a signed int, and then | (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'll be wearing the dope sack over my head this week. - erik