pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/inputmethod/uim



Module Name:    pkgsrc
Committed By:   pho
Date:           Sun Apr  7 04:24:24 UTC 2024

Modified Files:
        pkgsrc/inputmethod/uim: distinfo
Added Files:
        pkgsrc/inputmethod/uim/patches: patch-xim_connection.cpp
            patch-xim_ximic.cpp patch-xim_ximim.cpp patch-xim_ximtrans.cpp

Log Message:
inputmethod/uim: Fix build on NetBSD 10


To generate a diff of this commit:
cvs rdiff -u -r1.38 -r1.39 pkgsrc/inputmethod/uim/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/inputmethod/uim/patches/patch-xim_connection.cpp \
    pkgsrc/inputmethod/uim/patches/patch-xim_ximic.cpp \
    pkgsrc/inputmethod/uim/patches/patch-xim_ximim.cpp \
    pkgsrc/inputmethod/uim/patches/patch-xim_ximtrans.cpp

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/inputmethod/uim/distinfo
diff -u pkgsrc/inputmethod/uim/distinfo:1.38 pkgsrc/inputmethod/uim/distinfo:1.39
--- pkgsrc/inputmethod/uim/distinfo:1.38        Sat Feb 25 17:42:43 2023
+++ pkgsrc/inputmethod/uim/distinfo     Sun Apr  7 04:24:23 2024
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.38 2023/02/25 17:42:43 ryoon Exp $
+$NetBSD: distinfo,v 1.39 2024/04/07 04:24:23 pho Exp $
 
 BLAKE2s (uim-1.8.9.tar.gz) = 21175907f7ff2bbfb508e32b98d72fa63767a10591b067c809828aec25312845
 SHA512 (uim-1.8.9.tar.gz) = ef731d255259b00e41a96e325cfa001579f14b98329d1882508190b8f2a9552ba4165572a7faf865b58bf392b69de2933e6ff13174941b5313ad690fbc36e337
@@ -16,3 +16,7 @@ SHA1 (patch-sigscheme_include_sigscheme_
 SHA1 (patch-uim_Makefile.am) = e3a9e4dc99965c271fd6e783d42a6a136bf904b2
 SHA1 (patch-uim_skk.c) = 0d0bcf3c996ab5a4351e30cdf0f6f1fdc6faf5ad
 SHA1 (patch-uim_uim-module-manager.c) = 345b09a209fc1ccc9ba96aa50a5adac1f2ef35ee
+SHA1 (patch-xim_connection.cpp) = d3a34c533e99c6d6991093761ed7dcc40773520b
+SHA1 (patch-xim_ximic.cpp) = 8c19425ef926c384028db1edbb39a8a81dfd4ade
+SHA1 (patch-xim_ximim.cpp) = 5e3f36136af16b59504b722863bf0b588773cd3a
+SHA1 (patch-xim_ximtrans.cpp) = 3a99700f124b72e2d67e3a4227b41949e6a96069

Added files:

Index: pkgsrc/inputmethod/uim/patches/patch-xim_connection.cpp
diff -u /dev/null pkgsrc/inputmethod/uim/patches/patch-xim_connection.cpp:1.1
--- /dev/null   Sun Apr  7 04:24:24 2024
+++ pkgsrc/inputmethod/uim/patches/patch-xim_connection.cpp     Sun Apr  7 04:24:23 2024
@@ -0,0 +1,29 @@
+$NetBSD: patch-xim_connection.cpp,v 1.1 2024/04/07 04:24:23 pho Exp $
+
+Don't use alloca(3). It's non-standard and is easily avoidable these days.
+TODO: Upstream this.
+
+--- xim/connection.cpp.orig    2024-04-07 04:05:48.893877145 +0000
++++ xim/connection.cpp
+@@ -45,9 +45,6 @@
+ #include <map>
+ #include <unistd.h>
+ #include <X11/Xatom.h>
+-#ifdef HAVE_ALLOCA_H
+-# include <alloca.h>
+-#endif
+ 
+ #define INIT_BUF_SIZE 1024
+ #define TRANSPORT_UNIT 20
+@@ -436,10 +433,9 @@ void XConnection::doSend(TxPacket *t, bo
+ 
+     XClientMessageEvent r;
+     int buflen;
+-    char *buf;
+ 
+     buflen = t->get_length();
+-    buf = (char *)alloca(buflen);
++    char buf[buflen];
+     t->write_to_buf((unsigned char *)buf, buflen, mByteorder);
+     if (buflen < TRANSPORT_MAX) {
+       // via event
Index: pkgsrc/inputmethod/uim/patches/patch-xim_ximic.cpp
diff -u /dev/null pkgsrc/inputmethod/uim/patches/patch-xim_ximic.cpp:1.1
--- /dev/null   Sun Apr  7 04:24:24 2024
+++ pkgsrc/inputmethod/uim/patches/patch-xim_ximic.cpp  Sun Apr  7 04:24:23 2024
@@ -0,0 +1,47 @@
+$NetBSD: patch-xim_ximic.cpp,v 1.1 2024/04/07 04:24:23 pho Exp $
+
+Don't use alloca(3). It's non-standard and is easily avoidable these days.
+TODO: Upstream this.
+
+--- xim/ximic.cpp.orig 2024-04-07 04:12:30.183013562 +0000
++++ xim/ximic.cpp
+@@ -49,10 +49,6 @@
+ #include "util.h"
+ 
+ #include "uim/uim-scm.h"
+- 
+-#ifdef HAVE_ALLOCA_H
+-# include <alloca.h>
+-#endif
+ 
+ char invalid_style_msg[]=
+ "Client requested unsupported input style";
+@@ -214,7 +210,7 @@ void icxatr::set_atr(C16 id, C8 *val, in
+     case ICA_FontSet:
+     {
+       int len = readC16(val, o);
+-      char *new_fsn = (char *)alloca(len + 1);
++      char new_fsn[len + 1];
+       new_fsn[len] = '\0';
+       memcpy(new_fsn, &val[2], len);
+       if (font_set_name && !strcmp(font_set_name, new_fsn))
+@@ -497,8 +493,7 @@ void XimIC::setICAttrs(void *val, int le
+       atr_len = readC16(&p[i], byte_order);
+       i += 2;
+ 
+-      unsigned char *q;
+-      q = (unsigned char *)alloca(atr_len + pad4(atr_len));
++      unsigned char q[atr_len + pad4(atr_len)];
+ 
+       int j;
+       for (j = 0; j < atr_len + pad4(atr_len); j++, i++) {
+@@ -691,8 +686,7 @@ XimIC *create_ic(Connection *c, RxPacket
+     p->rewind();
+     p->getC16(); // discard
+     int atr_len = p->getC16();
+-    unsigned char *v;
+-    v = (unsigned char *)alloca(atr_len);
++    unsigned char v[atr_len];
+     int i;
+     for (i = 0; i < atr_len; i++) {
+       v[i] = p->getC8();
Index: pkgsrc/inputmethod/uim/patches/patch-xim_ximim.cpp
diff -u /dev/null pkgsrc/inputmethod/uim/patches/patch-xim_ximim.cpp:1.1
--- /dev/null   Sun Apr  7 04:24:24 2024
+++ pkgsrc/inputmethod/uim/patches/patch-xim_ximim.cpp  Sun Apr  7 04:24:23 2024
@@ -0,0 +1,28 @@
+$NetBSD: patch-xim_ximim.cpp,v 1.1 2024/04/07 04:24:23 pho Exp $
+
+Don't use alloca(3). It's non-standard and is easily avoidable these days.
+TODO: Upstream this.
+
+--- xim/ximim.cpp.orig 2024-04-07 04:15:45.715921186 +0000
++++ xim/ximim.cpp
+@@ -46,10 +46,6 @@
+ #define NEED_EVENTS   // for declaration of xEvent
+ #include <X11/Xproto.h>
+ 
+-#ifdef HAVE_ALLOCA_H
+-# include <alloca.h>
+-#endif
+-
+ static std::map<C16, XimIM *> g_ims;
+ 
+ // tables
+@@ -174,8 +170,7 @@ void XimIM_impl::set_ic_values(RxPacket 
+     atr_len = p->getC16();
+     p->getC16();
+ 
+-    unsigned char *v;
+-    v = (unsigned char *)alloca(atr_len);
++    unsigned char v[atr_len];
+ 
+     int i;
+     for (i = 0; i < atr_len; i++) {
Index: pkgsrc/inputmethod/uim/patches/patch-xim_ximtrans.cpp
diff -u /dev/null pkgsrc/inputmethod/uim/patches/patch-xim_ximtrans.cpp:1.1
--- /dev/null   Sun Apr  7 04:24:24 2024
+++ pkgsrc/inputmethod/uim/patches/patch-xim_ximtrans.cpp       Sun Apr  7 04:24:23 2024
@@ -0,0 +1,43 @@
+$NetBSD: patch-xim_ximtrans.cpp,v 1.1 2024/04/07 04:24:23 pho Exp $
+
+Don't use alloca(3). It's non-standard and is easily avoidable these days.
+TODO: Upstream this.
+
+--- xim/ximtrans.cpp.orig      2024-04-07 04:14:35.459868020 +0000
++++ xim/ximtrans.cpp
+@@ -42,10 +42,6 @@
+ #include "xim.h"
+ #include "util.h"
+ 
+-#ifdef HAVE_ALLOCA_H
+-# include <alloca.h>
+-#endif
+-
+ // XIM Error Code
+ #define XIM_BadSomething      999
+ 
+@@ -608,7 +604,7 @@ void Connection::xim_get_im_values(RxPac
+     imid = p->getC16(); // input-method id
+     l = p->getC16() / 2; // number
+ 
+-    int *ra = (int *)alloca(sizeof(int) * l);
++    int ra[l];
+     int rlen = 0;
+     for (i = 0; i < l; i++) {
+       ra[i] = p->getC16();
+@@ -744,14 +740,13 @@ void Connection::xim_error(RxPacket *p)
+ {
+     C16 imid, icid, mask, ecode;
+     int len;
+-    char *buf;
+ 
+     imid = p->getC16();
+     icid = p->getC16();
+     mask = p->getC16();
+     ecode = p->getC16();
+     len = p->getStrLen();
+-    buf = (char *)alloca(len + 1);
++    char buf[len + 1];
+     buf[len] = 0;
+     p->getStr(buf);
+   



Home | Main Index | Thread Index | Old Index