i've seen code that uses 53 where i suspect it means 54.
rarely does any "fancy casting stuff" work on more than
one platform.

brucee

On 1/17/06, Russ Cox <[EMAIL PROTECTED]> wrote:
> > > (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
>
> I started out doing ulong==unsigned int (cf. drawterm),
> but that implies long==int, and I just couldn't bear to do
> that for p9p.  I've been fixing problems as they come up.
> Libmemdraw needed changes (which I expected), and
> libmp did too (which I didn't).  Do you know of other code?
>
> Russ
>

Reply via email to