summaryrefslogtreecommitdiff
path: root/x11/rxvt
diff options
context:
space:
mode:
authormartin <martin>2006-06-20 13:07:20 +0000
committermartin <martin>2006-06-20 13:07:20 +0000
commitc3e44ccc704f3ac8416b6faa26116450a736e5b9 (patch)
treeb1cc5c237d6615a80825798f9dce35866bdd66ef /x11/rxvt
parent91e074afc0835d144deb8020af294a33cdaf6a21 (diff)
downloadpkgsrc-c3e44ccc704f3ac8416b6faa26116450a736e5b9.tar.gz
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.
Diffstat (limited to 'x11/rxvt')
-rw-r--r--x11/rxvt/distinfo3
-rw-r--r--x11/rxvt/patches/patch-al40
2 files changed, 42 insertions, 1 deletions
diff --git a/x11/rxvt/distinfo b/x11/rxvt/distinfo
index 8433e1635f7..c8ecdb372a7 100644
--- a/x11/rxvt/distinfo
+++ b/x11/rxvt/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.19 2005/06/16 13:19:17 hira Exp $
+$NetBSD: distinfo,v 1.20 2006/06/20 13:07:20 martin Exp $
SHA1 (rxvt-2.7.10.tar.bz2) = 16eae23c3227e28e5e7a53a58eaa3226affe65f9
RMD160 (rxvt-2.7.10.tar.bz2) = 83fab8df589e2413ba820d04bafb069e6af8c445
@@ -14,3 +14,4 @@ SHA1 (patch-ah) = 5e6fcf6b4b4fe1111b97d0b916501ab5855a755a
SHA1 (patch-ai) = 0f3e800efc5b87243208de9fb9fafe9abde73201
SHA1 (patch-aj) = 43ca25f034e6160f3a3dabbf1488df31cdecf95b
SHA1 (patch-ak) = 960d0bd263a6b8776df93603dc5322b685a6afae
+SHA1 (patch-al) = 7107ec12205d0a5011a5828f8d30fbd577de41b7
diff --git a/x11/rxvt/patches/patch-al b/x11/rxvt/patches/patch-al
new file mode 100644
index 00000000000..92384a63afa
--- /dev/null
+++ b/x11/rxvt/patches/patch-al
@@ -0,0 +1,40 @@
+$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]