pkgsrc/x11/rxvt/patches/patch-al
martin 8cc6ca7e8f In XChangeProperty(), format = 32 means long - no matter how many bits
long has. The format value furthermore is not arbitrary, but needs to
be 8, 16 or 32. So don't pass Atom32 instead of long, or some sizeof()
calculation as format, hardcode the value and make sure the arg is
properly aligned.
Fixes PR 33680 (old problem), and an alignement related crash with gcc4
on sparc64.
2006-06-20 13:07:20 +00:00

40 lines
1.5 KiB
Text

$NetBSD: patch-al,v 1.1 2006/06/20 13:07:20 martin Exp $
--- src/screen.c.orig 2003-03-23 17:56:06.000000000 +0100
+++ src/screen.c 2006-06-20 14:52:21.000000000 +0200
@@ -3515,11 +3515,12 @@ rxvt_selection_send(rxvt_t *r, const XSe
{
XSelectionEvent ev;
#ifdef USE_XIM
- Atom32 target_list[4];
+ long target_list[4];
#else
- Atom32 target_list[3];
+ long target_list[3];
#endif
Atom target;
+ long time;
XTextProperty ct;
XICCEncodingStyle style;
char *cl[2], dummy[1];
@@ -3540,16 +3541,17 @@ rxvt_selection_send(rxvt_t *r, const XSe
target_list[3] = (Atom32) r->h->xa[XA_COMPOUND_TEXT];
#endif
XChangeProperty(r->Xdisplay, rq->requestor, rq->property, XA_ATOM,
- (8 * sizeof(target_list[0])), PropModeReplace,
+ 32, PropModeReplace,
(unsigned char *)target_list,
(sizeof(target_list) / sizeof(target_list[0])));
ev.property = rq->property;
} else if (rq->target == r->h->xa[XA_MULTIPLE]) {
/* TODO: Handle MULTIPLE */
} else if (rq->target == r->h->xa[XA_TIMESTAMP] && r->selection.text) {
+ time = r->h->selection_time;
XChangeProperty(r->Xdisplay, rq->requestor, rq->property, XA_INTEGER,
- (8 * sizeof(Time)), PropModeReplace,
- (unsigned char *)&r->h->selection_time, 1);
+ 32, PropModeReplace,
+ (unsigned char *)&time, 1);
ev.property = rq->property;
} else if (rq->target == XA_STRING
|| rq->target == r->h->xa[XA_COMPOUND_TEXT]