[AC21.5R21.4] Patch: fix cut & past problem on 64 bit platforms
Stephen J. Turnbull
stephen at xemacs.org
Sun Feb 18 10:08:01 EST 2007
Hi Martin! Good to hear from you, even if I have to respectfully
disagree with your suggestion.
Martin Buchholz writes:
> >>>>> "SJT" == Stephen J Turnbull <stephen at xemacs.org> writes:
> SJT> + safe. (We could replace the factor 2 with (sizeof(long)*8/32.)
>
> Instead of "we could" why not actually use the more meaningful
> symbolic expression?
Because it needs to be done *throughout*, rather than just fixing it
once here. And it's begging to be a constant named FORMAT32_ITEM_SIZE,
don't you think? I want to leave that reminder for the benefit of
whoever fixes this thoroughly.
> Make sure there's enough configury infrastructure to define the
> stdint.h types
>
> uint16_t
> uint32_t
> uint64_t
We already have this for Berkeley DB, but it's not appropriate for use
here:
> and then in x-select.c one should have code more like
>
> (code sketch only)
>
> Lisp_Object uint32_t_to_lisp (uint32_t x)
This is conceptually wrong, isn't it? Between the CARD32 in the X
protocol and the buffer in x-select.c the gods have chosen to
interpose Xlib. According to the interface defined by Xlib, it's not
a uint32_t, it's a long. Ie, it might be an int32_t or an int64_t (or
possibly something else ;-) depending on the platform or even the
library we link to.
> Yes, it's a fair amount of work to do this right.
Yup. That's why I didn't try at this point, I don't have the Joules
to spare.
More information about the XEmacs-Beta
mailing list