pkgsrc-Changes archive

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

CVS commit: pkgsrc/inputmethod



Module Name:    pkgsrc
Committed By:   tsutsui
Date:           Sun Jun 28 06:16:28 UTC 2026

Modified Files:
        pkgsrc/inputmethod/ja-freewnn-lib: Makefile Makefile.common distinfo
        pkgsrc/inputmethod/ja-freewnn-server: Makefile
Added Files:
        pkgsrc/inputmethod/ja-freewnn-lib/patches: patch-PubdicPlus_pod.c
            patch-Wnn_etc_sstrings.c patch-Wnn_include_jllib.h
            patch-Wnn_include_jutil.h patch-Wnn_jlib_jl.c
            patch-Wnn_jserver_de__header.h patch-Wnn_jserver_jikouho.c
            patch-Wnn_jserver_jikouho__d.c patch-Wnn_jserver_jishoop.c
            patch-Wnn_jserver_snd__rcv.c patch-Wnn_jutil_atod.c
            patch-Wnn_jutil_atof.c patch-Wnn_jutil_atorev.c
            patch-Wnn_jutil_ujisf.c patch-Wnn_romkan_rk__main.c
            patch-Xwnmo_romkan__m_rk__main.c patch-Xwnmo_romkan__m_rk__multi.h
            patch-Xwnmo_xjutil_kensaku.c patch-configure

Log Message:
ja-freewnn-{lib,server}: fix builds with gcc 14 and later

- Add necessary standard headers to pull proper prototypes in test
  programs in the generated configure script to avoid errors caused
  by -Wimplicit-function-declaration (which is fatal on -std=gnu23)
- Use proper qsort(3)-compatible comparator prototypes
- Add missing prototypes for several function pointer arguments
- Fix other -Wimcompatiple-pointer-types warnings
- Appease several -Wpointer-compare and -Wpointer-sign warnings
- Move -Wchar-subscripts fixes from SUBST to explicit patch files
- Also fix wnn_sStrncpy() to use the correct conversion direction
  (found during -Wincompatiple-pointer-types cleanup)

While here, take MAINTAINERship.

Bump PKGREVISIONs.


To generate a diff of this commit:
cvs rdiff -u -r1.13 -r1.14 pkgsrc/inputmethod/ja-freewnn-lib/Makefile
cvs rdiff -u -r1.26 -r1.27 pkgsrc/inputmethod/ja-freewnn-lib/Makefile.common
cvs rdiff -u -r1.16 -r1.17 pkgsrc/inputmethod/ja-freewnn-lib/distinfo
cvs rdiff -u -r0 -r1.3 \
    pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-PubdicPlus_pod.c \
    pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_include_jllib.h \
    pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jserver_de__header.h \
    pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jutil_ujisf.c \
    pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-configure
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_etc_sstrings.c \
    pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_include_jutil.h \
    pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jlib_jl.c \
    pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jserver_jikouho.c \
    pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jserver_jikouho__d.c \
    pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jserver_jishoop.c \
    pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jserver_snd__rcv.c \
    pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jutil_atod.c \
    pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jutil_atof.c \
    pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jutil_atorev.c \
    pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_romkan_rk__main.c \
    pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Xwnmo_romkan__m_rk__main.c \
    pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Xwnmo_romkan__m_rk__multi.h \
    pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Xwnmo_xjutil_kensaku.c
cvs rdiff -u -r1.13 -r1.14 pkgsrc/inputmethod/ja-freewnn-server/Makefile

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

Modified files:

Index: pkgsrc/inputmethod/ja-freewnn-lib/Makefile
diff -u pkgsrc/inputmethod/ja-freewnn-lib/Makefile:1.13 pkgsrc/inputmethod/ja-freewnn-lib/Makefile:1.14
--- pkgsrc/inputmethod/ja-freewnn-lib/Makefile:1.13     Sat Jun 13 20:40:30 2015
+++ pkgsrc/inputmethod/ja-freewnn-lib/Makefile  Sun Jun 28 06:16:27 2026
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile,v 1.13 2015/06/13 20:40:30 tsutsui Exp $
+# $NetBSD: Makefile,v 1.14 2026/06/28 06:16:27 tsutsui Exp $
 
 .include "Makefile.common"
 
 PKGNAME=       ja-FreeWnn-lib-1.11alpha23
+PKGREVISION=   1
 
 COMMENT+=      (Japanese client library)
 

Index: pkgsrc/inputmethod/ja-freewnn-lib/Makefile.common
diff -u pkgsrc/inputmethod/ja-freewnn-lib/Makefile.common:1.26 pkgsrc/inputmethod/ja-freewnn-lib/Makefile.common:1.27
--- pkgsrc/inputmethod/ja-freewnn-lib/Makefile.common:1.26      Thu Jan  1 09:24:22 2026
+++ pkgsrc/inputmethod/ja-freewnn-lib/Makefile.common   Sun Jun 28 06:16:27 2026
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.common,v 1.26 2026/01/01 09:24:22 wiz Exp $
+# $NetBSD: Makefile.common,v 1.27 2026/06/28 06:16:27 tsutsui Exp $
 # used by inputmethod/ja-freewnn-server/Makefile
 # used by inputmethod/ja-freewnn-lib/Makefile
 
@@ -7,7 +7,7 @@ MASTER_SITES=   ${MASTER_SITE_OSDN:=freewn
 MASTER_SITES+= ftp://ftp.st.ryukoku.ac.jp/pub/japanese-im/FreeWnn/
 CATEGORIES=    inputmethod
 
-MAINTAINER=    tech-pkg-ja%jp.NetBSD.org@localhost
+MAINTAINER=    tsutsui%NetBSD.org@localhost
 #HOMEPAGE=     https://freewnn.osdn.jp/
 COMMENT=       Japanese/Chinese/Korean input method
 LICENSE=       gnu-gpl-v2
@@ -30,16 +30,3 @@ SUBST_CLASSES+=              imdictdir
 SUBST_STAGE.imdictdir= post-extract
 SUBST_SED.imdictdir=   -e 's|@LIBDIR/@LANG/dic|${WNNDICTDIR}/@LANG|'
 SUBST_FILES.imdictdir= Wnn/jd/jserverrc
-
-# Fix GCC warnings:
-# rk_main.c:1441:41: error: array subscript has type 'char'
-# rk_main.c:1453:24: error: array subscript has type 'char'
-# rk_main.c:1454:26: error: array subscript has type 'char'
-# rk_main.c:1505:36: error: array subscript has type 'char'
-#
-# The variable ebf_sw should really be a boolean, not an int.
-#
-SUBST_CLASSES+=                char
-SUBST_STAGE.char=      pre-configure
-SUBST_FILES.char=      Wnn/romkan/rk_main.c
-SUBST_SED.char=                -e 's,char ebf_sw = 0,int ebf_sw = 0,'

Index: pkgsrc/inputmethod/ja-freewnn-lib/distinfo
diff -u pkgsrc/inputmethod/ja-freewnn-lib/distinfo:1.16 pkgsrc/inputmethod/ja-freewnn-lib/distinfo:1.17
--- pkgsrc/inputmethod/ja-freewnn-lib/distinfo:1.16     Tue Oct 26 10:49:36 2021
+++ pkgsrc/inputmethod/ja-freewnn-lib/distinfo  Sun Jun 28 06:16:27 2026
@@ -1,6 +1,25 @@
-$NetBSD: distinfo,v 1.16 2021/10/26 10:49:36 nia Exp $
+$NetBSD: distinfo,v 1.17 2026/06/28 06:16:27 tsutsui Exp $
 
 BLAKE2s (FreeWnn-1.1.1-a023.tar.gz) = a7ff74d8d90a273e6e6a3b84494a1d175bcb43e58db41f4870f35ef43ec6f4e3
 SHA512 (FreeWnn-1.1.1-a023.tar.gz) = e5255fe17dd6099cb9a33453d279f9fb64312ad1401ee6e77e5d39151d7a34636372fe48631be95a75b26400aa1204204e9aa88b5b50eb7be02bcbb5b93c76a2
 Size (FreeWnn-1.1.1-a023.tar.gz) = 3712238 bytes
+SHA1 (patch-PubdicPlus_pod.c) = 04975cc2552b0f4ec25a8be74dc070d0b3036e7c
+SHA1 (patch-Wnn_etc_sstrings.c) = e28bdd74a5d9b257b5554af33865c37a0e63061f
+SHA1 (patch-Wnn_include_jllib.h) = 7bac52f7b8a1b9a63d4b06921d1b19aa4c58d250
+SHA1 (patch-Wnn_include_jutil.h) = 2806768f73a98404fd3f218c5897a647f69964c8
+SHA1 (patch-Wnn_jlib_jl.c) = ad70af217328876e100f0ba9b824d12346b5bf0a
+SHA1 (patch-Wnn_jserver_de__header.h) = 705688990d8e9bd8519f9bb0157dda049e8ecb77
+SHA1 (patch-Wnn_jserver_jikouho.c) = a945e6f83b4fdfc4bf30813ca01dc6a3789b4275
+SHA1 (patch-Wnn_jserver_jikouho__d.c) = aed041017ac96df4b99860f0fcccaa18f08eb42a
+SHA1 (patch-Wnn_jserver_jishoop.c) = 5a27dba4fe5bad38826b7585b554bdcd7cf243ae
+SHA1 (patch-Wnn_jserver_snd__rcv.c) = db73d401160e04582ccff2f969d9b57d68894b12
+SHA1 (patch-Wnn_jutil_atod.c) = a0fa823064f4629fc733d07316df85f588b9de75
+SHA1 (patch-Wnn_jutil_atof.c) = 5883beb71a21dce01456284d1fe8ea6a10d6bb62
+SHA1 (patch-Wnn_jutil_atorev.c) = f4c0ea91e6024b9bb3a2bec8473a6e11a7cb838f
+SHA1 (patch-Wnn_jutil_ujisf.c) = d72a767ae3cd7ad48dc24ddb7aeb8d62047b6c7d
+SHA1 (patch-Wnn_romkan_rk__main.c) = 1ab3251a15a616ef35ba0927fb3956a17e49eab6
+SHA1 (patch-Xwnmo_romkan__m_rk__main.c) = 1b474482e28814e555452c6e95ed8a4ddbf8bb36
+SHA1 (patch-Xwnmo_romkan__m_rk__multi.h) = 8c6af6d5744a20c00a9e202d92d64bb24a96e0b2
+SHA1 (patch-Xwnmo_xjutil_kensaku.c) = 8b977992dbebcd58e249c2cc341bba6814f29389
+SHA1 (patch-configure) = a12abeef3eb73abe5facc655ccce9cdc77a414d5
 SHA1 (patch-makerule.mk.in) = 3c27d57081ac5937bb280c1b8cdaf12e489d2384

Index: pkgsrc/inputmethod/ja-freewnn-server/Makefile
diff -u pkgsrc/inputmethod/ja-freewnn-server/Makefile:1.13 pkgsrc/inputmethod/ja-freewnn-server/Makefile:1.14
--- pkgsrc/inputmethod/ja-freewnn-server/Makefile:1.13  Sat Nov  2 22:56:54 2019
+++ pkgsrc/inputmethod/ja-freewnn-server/Makefile       Sun Jun 28 06:16:28 2026
@@ -1,9 +1,9 @@
-# $NetBSD: Makefile,v 1.13 2019/11/02 22:56:54 rillig Exp $
+# $NetBSD: Makefile,v 1.14 2026/06/28 06:16:28 tsutsui Exp $
 
 .include "../../inputmethod/ja-freewnn-lib/Makefile.common"
 
 PKGNAME=       ja-FreeWnn-server-1.11alpha23
-PKGREVISION=   1
+PKGREVISION=   2
 
 COMMENT+=      (Japanese server)
 

Added files:

Index: pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-PubdicPlus_pod.c
diff -u /dev/null pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-PubdicPlus_pod.c:1.3
--- /dev/null   Sun Jun 28 06:16:28 2026
+++ pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-PubdicPlus_pod.c    Sun Jun 28 06:16:27 2026
@@ -0,0 +1,95 @@
+$NetBSD: patch-PubdicPlus_pod.c,v 1.3 2026/06/28 06:16:27 tsutsui Exp $
+
+- Fix build with -std=gnu23 (i.e. gcc14 and later)
+
+--- PubdicPlus/pod.c.orig      2026-06-24 03:14:59.387777641 +0000
++++ PubdicPlus/pod.c
+@@ -154,7 +154,7 @@ static struct descpack *searchdesc (Wcha
+ static void store_description (void);
+ static long internkind (Wchar *s);
+ static void listkinds (void);
+-static int kindcompar (struct kindpack *k1, struct kindpack *k2);
++static int kindcompar (const void *k1, const void *k2);
+ static void sortkind (void);
+ static struct dicpack *intern (int key, Wchar *yomi, Wchar *kouho, Wchar *hinshi, int hindo, long kind, int *stat, long flags);
+ static void storepd (FILE *file);
+@@ -163,8 +163,8 @@ static void canna_output (FILE *cf, stru
+ static void entry_out (FILE *cf, struct dicpack *p, Wchar *h, int n, Wchar *ex);
+ static void printentry (FILE *cf, struct dicpack *p);
+ static void showentry (struct dicpack **pd, int n);
+-static int diccompar (struct dicpack **p1, struct dicpack **p2);
+-static int dichindocompar (struct dicpack **p1, struct dicpack **p2);
++static int diccompar (const void *p1, const void *p2);
++static int dichindocompar (const void *p1, const void *p2);
+ void shrinkargs (char **argv, int n, int count);
+ static void parseargs (int argc, char *argv[]);
+ #endif
+@@ -823,9 +823,11 @@ listkinds ()
+ 
+ static int
+ kindcompar (k1, k2)
+-     struct kindpack *k1, *k2;
++     const void *k1, *k2;
+ {
+-  return Wscmp (k1->kind, k2->kind);
++  const struct kindpack *kp1 = k1;
++  const struct kindpack *kp2 = k2;
++  return Wscmp (kp1->kind, kp2->kind);
+ }
+ 
+ static void
+@@ -1365,18 +1367,20 @@ showentry (pd, n)
+ 
+ static int
+ diccompar (p1, p2)
+-     struct dicpack **p1, **p2;
++     const void *p1, *p2;
+ {
+   int n;
+-  if (n = Wscmp ((*p1)->yomi, (*p2)->yomi))
++  const struct dicpack * const *dp1 = p1;
++  const struct dicpack * const *dp2 = p2;
++  if (n = Wscmp ((*dp1)->yomi, (*dp2)->yomi))
+     {
+       return n;
+     }
+-  else if (n = Wscmp ((*p1)->tango, (*p2)->tango))
++  else if (n = Wscmp ((*dp1)->tango, (*dp2)->tango))
+     {
+       return n;
+     }
+-  else if (n = Wscmp ((*p1)->hinshi->hinshi, (*p2)->hinshi->hinshi))
++  else if (n = Wscmp ((*dp1)->hinshi->hinshi, (*dp2)->hinshi->hinshi))
+     {
+       return n;
+     }
+@@ -1388,22 +1392,24 @@ diccompar (p1, p2)
+ 
+ static int
+ dichindocompar (p1, p2)
+-     struct dicpack **p1, **p2;
++     const void *p1, *p2;
+ {
+   int n;
+-  if (n = Wscmp ((*p1)->yomi, (*p2)->yomi))
++  const struct dicpack * const *dp1 = p1;
++  const struct dicpack * const *dp2 = p2;
++  if (n = Wscmp ((*dp1)->yomi, (*dp2)->yomi))
+     {
+       return n;
+     }
+-  else if (n = ((*p2)->hindo - (*p1)->hindo))
++  else if (n = ((*dp2)->hindo - (*dp1)->hindo))
+     {
+       return n;
+     }
+-  else if (n = Wscmp ((*p1)->tango, (*p2)->tango))
++  else if (n = Wscmp ((*dp1)->tango, (*dp2)->tango))
+     {
+       return n;
+     }
+-  else if (n = Wscmp ((*p1)->hinshi->hinshi, (*p2)->hinshi->hinshi))
++  else if (n = Wscmp ((*dp1)->hinshi->hinshi, (*dp2)->hinshi->hinshi))
+     {
+       return n;
+     }
Index: pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_include_jllib.h
diff -u /dev/null pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_include_jllib.h:1.3
--- /dev/null   Sun Jun 28 06:16:28 2026
+++ pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_include_jllib.h Sun Jun 28 06:16:27 2026
@@ -0,0 +1,15 @@
+$NetBSD: patch-Wnn_include_jllib.h,v 1.3 2026/06/28 06:16:27 tsutsui Exp $
+
+- Fix build with -std=gnu23 (i.e. gcc14 and later)
+
+--- Wnn/include/jllib.h.orig   2015-05-10 01:39:27.000000000 +0000
++++ Wnn/include/jllib.h
+@@ -260,7 +260,7 @@ extern struct wnn_jdata *jl_word_info_e 
+ extern w_char *jl_hinsi_name_e FRWNN_PARAMS((register struct wnn_env *env, register int no));
+ 
+ extern void jl_close FRWNN_PARAMS((register struct wnn_buf *buf));
+-extern int jl_dic_add_e FRWNN_PARAMS((register struct wnn_env *env, char *dic_name, char *hindo_name, int rev, int prio, int rw, int hrw, char *pwd_dic, char *pwd_hindo, int (*error_handler) (), 
int (*message_handler) () ));
++extern int jl_dic_add_e FRWNN_PARAMS((register struct wnn_env *env, char *dic_name, char *hindo_name, int rev, int prio, int rw, int hrw, char *pwd_dic, char *pwd_hindo, int (*error_handler) (const 
char *), int (*message_handler) (const char *)));
+ extern int jl_dic_comment_set_e FRWNN_PARAMS((register struct wnn_env *env, int dic_no, w_char *comment));
+ extern int jl_dic_delete_e FRWNN_PARAMS((register struct wnn_env *env, register int dic_no));
+ extern int jl_dic_list_e   FRWNN_PARAMS((struct wnn_env *env, WNN_DIC_INFO **dicinfo));
Index: pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jserver_de__header.h
diff -u /dev/null pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jserver_de__header.h:1.3
--- /dev/null   Sun Jun 28 06:16:28 2026
+++ pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jserver_de__header.h    Sun Jun 28 06:16:27 2026
@@ -0,0 +1,15 @@
+$NetBSD: patch-Wnn_jserver_de__header.h,v 1.3 2026/06/28 06:16:27 tsutsui Exp $
+
+- Appease -Wincompatible-pointer-types warning
+
+--- Wnn/jserver/de_header.h.orig       2013-09-02 11:01:39.000000000 +0000
++++ Wnn/jserver/de_header.h
+@@ -546,7 +546,7 @@ extern unsigned int diff_sisheng (int, i
+ /* snd_rcv.c */
+ extern int fopen_read_cur (char *);
+ extern int fopen_write_cur (char *);
+-extern int fread_cur (char *, register int, register int);
++extern int fread_cur (void *, register int, register int);
+ extern int xgetc_cur ();
+ extern void xungetc_cur (int);
+ extern void fwrite_cur (unsigned char *, int, int);
Index: pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jutil_ujisf.c
diff -u /dev/null pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jutil_ujisf.c:1.3
--- /dev/null   Sun Jun 28 06:16:28 2026
+++ pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jutil_ujisf.c   Sun Jun 28 06:16:28 2026
@@ -0,0 +1,101 @@
+$NetBSD: patch-Wnn_jutil_ujisf.c,v 1.3 2026/06/28 06:16:28 tsutsui Exp $
+
+- Fix build with -std=gnu23 (i.e. gcc14 and later)
+
+--- Wnn/jutil/ujisf.c.orig     2013-09-02 11:01:39.000000000 +0000
++++ Wnn/jutil/ujisf.c
+@@ -716,27 +716,27 @@ sisheng_num (a, p)
+ 
+ int
+ sort_func_je (a, b)
+-     char *a, *b;
++     const void *a, *b;
+ {
+   return (sort_func (a, b, D_YOMI));
+ }
+ 
+ int
+ sort_func_je_kanji (a, b)
+-     char *a, *b;
++     const void *a, *b;
+ {
+   return (sort_func (a, b, D_KANJI));
+ }
+ 
+ int
+ sort_func (a, b, which)
+-     register char *a, *b;
++     const void *a, *b;
+      int which;
+ {
+   register int tmp;
+   register struct je *pa, *pb;
+-  pa = *((struct je **) a);
+-  pb = *((struct je **) b);
++  pa = *((struct je * const *) a);
++  pb = *((struct je * const *) b);
+   if (pa->hinsi == SAKUJO_HINSI)
+     {
+       if (pb->hinsi == SAKUJO_HINSI)
+@@ -808,13 +808,13 @@ sort_func (a, b, which)
+ void
+ sort ()
+ {
+-  qsort ((char *) jeary, jt.maxserial, sizeof (struct je *), sort_func_je);
++  qsort (jeary, jt.maxserial, sizeof (struct je *), sort_func_je);
+ }
+ 
+ void
+ sort_if_not_sorted ()
+ {
+-  if (!Sorted ((char *) jeary, jt.maxserial, sizeof (struct je *), sort_func_je))
++  if (!Sorted (jeary, jt.maxserial, sizeof (struct je *), sort_func_je))
+     {
+       sort ();
+     }
+@@ -823,12 +823,12 @@ sort_if_not_sorted ()
+ void
+ sort_kanji ()
+ {
+-  qsort ((char *) jeary, jt.maxserial, sizeof (struct je *), sort_func_je_kanji);
++  qsort (jeary, jt.maxserial, sizeof (struct je *), sort_func_je_kanji);
+ }
+ 
+ void
+ uniq_je (func)
+-     int (*func) ();
++     WNN_CompareFunc func;
+ {
+   int k;
+   struct je **prev, **jep;
+@@ -839,7 +839,7 @@ uniq_je (func)
+   for (k = 1; k < jt.maxserial; k++)
+     {
+       jep = &jeary[k];
+-      if (func ((char *) jep, (char *) prev) == 0)
++      if (func (jep, prev) == 0)
+         {
+           w_char tmp[LENGTHYOMI];
+           char tmp1[LENGTHYOMI];
+@@ -990,15 +990,16 @@ read_kanji_str_w (c, o)
+ 
+ int
+ Sorted (st, lc, size, sort_fun)
+-     register char *st;
++     const void *st;
+      register int lc;
+      int size;
+-     int (*sort_fun) ();
++     WNN_CompareFunc sort_fun;
+ {
+-  char *dst = st + size;
+-  for (lc--; lc > 0; lc--, st = dst, dst += size)
++  const char *src = st;
++  const char *dst = st + size;
++  for (lc--; lc > 0; lc--, src = dst, dst += size)
+     {
+-      if (sort_fun (st, dst) > 0)
++      if (sort_fun (src, dst) > 0)
+         {
+           return (0);
+         }
Index: pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-configure
diff -u /dev/null pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-configure:1.3
--- /dev/null   Sun Jun 28 06:16:28 2026
+++ pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-configure   Sun Jun 28 06:16:28 2026
@@ -0,0 +1,96 @@
+$NetBSD: patch-configure,v 1.3 2026/06/28 06:16:28 tsutsui Exp $
+
+- Add necessary headers to test programs to avoid configure tests from
+  failing unintentionally on -std=gnu23
+  (mostly due to missing prototypes of exit(3) etc.)
+
+--- configure.orig     2015-05-17 17:24:58.000000000 +0000
++++ configure
+@@ -2680,6 +2680,7 @@ rm -f conftest.$ac_objext conftest.$ac_e
+   cat >conftest.$ac_ext <<_ACEOF
+ #line $LINENO "configure"
+ #include "confdefs.h"
++#include <stdlib.h>
+ $ac_declaration
+ #ifdef F77_DUMMY_MAIN
+ #  ifdef __cplusplus
+@@ -3961,6 +3962,7 @@ else
+ #line $LINENO "configure"
+ #include "confdefs.h"
+ #include <ctype.h>
++#include <stdlib.h>
+ #if ((' ' & 0x0FF) == 0x020)
+ # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+ # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+@@ -4465,6 +4467,7 @@ rm -f conftest.$ac_objext conftest.$ac_e
+   cat >conftest.$ac_ext <<_ACEOF
+ #line $LINENO "configure"
+ #include "confdefs.h"
++#include <stdlib.h>
+ $ac_declaration
+ #ifdef F77_DUMMY_MAIN
+ #  ifdef __cplusplus
+@@ -18826,6 +18829,7 @@ else
+ #line $LINENO "configure"
+ #include "confdefs.h"
+ #include <ctype.h>
++#include <stdlib.h>
+ #if ((' ' & 0x0FF) == 0x020)
+ # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+ # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+@@ -19230,10 +19234,13 @@ else
+ #line $LINENO "configure"
+ #include "confdefs.h"
+ 
++#if HAVE_STDLIB_H
++# include <stdlib.h>
++#endif
+ #ifdef HAVE_TERMCAP_H
+ # include <termcap.h>
+ #endif
+-main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }
++int main() {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(0); }
+ _ACEOF
+ rm -f conftest$ac_exeext
+ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+@@ -19281,10 +19288,16 @@ else
+ #line $LINENO "configure"
+ #include "confdefs.h"
+ 
++#if HAVE_STRING_H
++# include <string.h>
++#endif
++#if HAVE_STDLIB_H
++# include <stdlib.h>
++#endif
+ #ifdef HAVE_TERMCAP_H
+ # include <termcap.h>
+ #endif
+-main()
++int main()
+ {char *s; s=(char *)tgoto("%p1%d", 0, 1); exit(!strcmp(s==0 ? "" : s, "1")); }
+ _ACEOF
+ rm -f conftest$ac_exeext
+@@ -19827,6 +19840,12 @@ else
+   cat >conftest.$ac_ext <<_ACEOF
+ #line $LINENO "configure"
+ #include "confdefs.h"
++#if HAVE_STRING_H
++# include <string.h>
++#endif
++#if HAVE_STDLIB_H
++# include <stdlib.h>
++#endif
+ 
+ #ifdef F77_DUMMY_MAIN
+ #  ifdef __cplusplus
+@@ -20042,6 +20061,9 @@ else
+ #if HAVE_UNISTD_H
+ # include <unistd.h>
+ #endif
++#if HAVE_STDLIB_H
++# include <stdlib.h>
++#endif
+ 
+ #ifdef F77_DUMMY_MAIN
+ #  ifdef __cplusplus

Index: pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_etc_sstrings.c
diff -u /dev/null pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_etc_sstrings.c:1.1
--- /dev/null   Sun Jun 28 06:16:28 2026
+++ pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_etc_sstrings.c  Sun Jun 28 06:16:27 2026
@@ -0,0 +1,28 @@
+$NetBSD: patch-Wnn_etc_sstrings.c,v 1.1 2026/06/28 06:16:27 tsutsui Exp $
+
+- Fix wnn_sStrncpy() to use the correct conversion direction.
+  The function converts from the internal w_char representation to an
+  external EUC char buffer, as wnn_sStrcpy() does. Calling eeuc_to_ieuc()
+  was backwards and also triggers GCC 14 incompatible-pointer-types errors.
+- Also appease possible signedness warnings
+
+--- Wnn/etc/sstrings.c.orig    2026-06-23 18:52:06.978018310 +0000
++++ Wnn/etc/sstrings.c
+@@ -54,7 +54,7 @@ wnn_sStrcpy (c, w)
+ {
+   register int ret;
+ 
+-  ret = ieuc_to_eeuc (c, w, -1);
++  ret = ieuc_to_eeuc ((unsigned char *) c, w, -1);
+   c[ret] = '\0';
+   return (ret);
+ }
+@@ -100,7 +100,7 @@ wnn_sStrncpy (s1, s2, n)
+      register w_char *s2;
+      register int n;
+ {
+-  eeuc_to_ieuc (s1, s2, n / sizeof (w_char));
++  ieuc_to_eeuc ((unsigned char *) s1, s2, n);
+   return s1;
+ }
+ 
Index: pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_include_jutil.h
diff -u /dev/null pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_include_jutil.h:1.1
--- /dev/null   Sun Jun 28 06:16:28 2026
+++ pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_include_jutil.h Sun Jun 28 06:16:27 2026
@@ -0,0 +1,38 @@
+$NetBSD: patch-Wnn_include_jutil.h,v 1.1 2026/06/28 06:16:27 tsutsui Exp $
+
+- Fix build with -std=gnu23 (i.e. gcc14 and later)
+
+--- Wnn/include/jutil.h.orig   2014-08-01 22:04:26.000000000 +0000
++++ Wnn/include/jutil.h
+@@ -40,6 +40,8 @@
+ #define FRWNN_PARAMS(paramlist)       ()
+ #endif        /* __STDC__ */
+ 
++typedef int (*WNN_CompareFunc)(const void *, const void *);
++
+ /* -- macro  -- */
+ /* ujisf.c  */
+ #define WNN_HINSI_LEN 4096
+@@ -86,17 +88,17 @@ extern void output_ujis FRWNN_PARAMS((re
+ extern int init_heap FRWNN_PARAMS((int, int, int, int, FILE *));
+ extern void init_jeary FRWNN_PARAMS((void));
+ extern void exit1 FRWNN_PARAMS((void));
+-extern int sort_func_je FRWNN_PARAMS((char *, char *));
+-extern int sort_func_je_kanji FRWNN_PARAMS((char *, char *));
+-extern int sort_func FRWNN_PARAMS((register char *, register char *, int));
++extern int sort_func_je FRWNN_PARAMS((const void *, const void *));
++extern int sort_func_je_kanji FRWNN_PARAMS((const void *, const void *));
++extern int sort_func FRWNN_PARAMS((const void *, const void *, int));
+ extern void sort FRWNN_PARAMS((void));
+ extern void sort_if_not_sorted FRWNN_PARAMS((void));
+ extern void sort_kanji FRWNN_PARAMS((void));
+-extern void uniq_je FRWNN_PARAMS((int (*) ()));
++extern void uniq_je FRWNN_PARAMS((WNN_CompareFunc));
+ #ifdef nodef
+ extern int make_kanji_str FRWNN_PARAMS((register UCHAR *, register UCHAR *));
+ #endif        /* nodef  */
+-extern int Sorted FRWNN_PARAMS((register char *, register int, int, int (*) ()));
++extern int Sorted FRWNN_PARAMS((const void *, register int, int, WNN_CompareFunc));
+ extern int is_katakana FRWNN_PARAMS((register char *, register char *));
+ 
+ /* dic_head.c */
Index: pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jlib_jl.c
diff -u /dev/null pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jlib_jl.c:1.1
--- /dev/null   Sun Jun 28 06:16:28 2026
+++ pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jlib_jl.c       Sun Jun 28 06:16:27 2026
@@ -0,0 +1,53 @@
+$NetBSD: patch-Wnn_jlib_jl.c,v 1.1 2026/06/28 06:16:27 tsutsui Exp $
+
+- Fix build with -std=gnu23 (i.e. gcc14 and later)
+
+--- Wnn/jlib/jl.c.orig 2026-06-25 14:24:34.268341077 +0000
++++ Wnn/jlib/jl.c
+@@ -2623,17 +2623,19 @@ jl_dic_list_e (env, dicinfo)
+ 
+ static int
+ sort_func_ws (a, b)
+-     register char *a, *b;
++     const void *a, *b;
+ {
+   int ah, bh, ai, bi, iah, ibh, iai, ibi;
+-  ah = ((struct wnn_jdata *) a)->hindo;
+-  bh = ((struct wnn_jdata *) b)->hindo;
+-  iah = ((struct wnn_jdata *) a)->int_hindo;
+-  ibh = ((struct wnn_jdata *) b)->int_hindo;
+-  ai = ((struct wnn_jdata *) a)->ima;
+-  bi = ((struct wnn_jdata *) b)->ima;
+-  iai = ((struct wnn_jdata *) a)->int_ima;
+-  ibi = ((struct wnn_jdata *) b)->int_ima;
++  const struct wnn_jdata *ja = a;
++  const struct wnn_jdata *jb = b;
++  ah = ja->hindo;
++  bh = jb->hindo;
++  iah = ja->int_hindo;
++  ibh = jb->int_hindo;
++  ai = ja->ima;
++  bi = jb->ima;
++  iai = ja->int_ima;
++  ibi = jb->int_ima;
+ 
+   if (ai == WNN_IMA_OFF && ah == WNN_ENTRY_NO_USE)
+     return (1);
+@@ -2677,7 +2679,7 @@ jl_word_search_e (env, dic_no, yomi, jdp
+     if_dead_disconnect (env, -1);
+   jd = (struct wnn_jdata *) wordrb.buf;
+ /*    for(cnt = 0 ; jd[cnt].dic_no != -1; cnt++); */
+-  qsort ((char *) jd, cnt, sizeof (struct wnn_jdata), sort_func_ws);
++  qsort (jd, cnt, sizeof (struct wnn_jdata), sort_func_ws);
+   *jdp = jd;
+   return (cnt);
+ }
+@@ -2696,7 +2698,7 @@ jl_word_search_by_env_e (env, yomi, jdp)
+     if_dead_disconnect (env, -1);
+   jd = (struct wnn_jdata *) wordrb.buf;
+ /*    for(cnt = 0 ; jd[cnt].dic_no != -1; cnt++); */
+-  qsort ((char *) jd, cnt, sizeof (struct wnn_jdata), sort_func_ws);
++  qsort (jd, cnt, sizeof (struct wnn_jdata), sort_func_ws);
+   *jdp = jd;
+   return (cnt);
+ }
Index: pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jserver_jikouho.c
diff -u /dev/null pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jserver_jikouho.c:1.1
--- /dev/null   Sun Jun 28 06:16:28 2026
+++ pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jserver_jikouho.c       Sun Jun 28 06:16:27 2026
@@ -0,0 +1,38 @@
+$NetBSD: patch-Wnn_jserver_jikouho.c,v 1.1 2026/06/28 06:16:27 tsutsui Exp $
+
+- Fix build with -std=gnu23 (i.e. gcc14 and later)
+
+--- Wnn/jserver/jikouho.c.orig 2013-09-02 11:01:39.000000000 +0000
++++ Wnn/jserver/jikouho.c
+@@ -49,7 +49,7 @@
+ #include        "kaiseki.h"
+ 
+ static struct JKT_SBN *find_jktsbn (struct JKT_SBN **, struct JKT_SONE *, int, int j_c);
+-static int cmp_dsd_sbn (struct DSD_SBN *, struct DSD_SBN *);
++static int cmp_dsd_sbn (const void *, const void *);
+ static int cnt_jkt_sbn (register struct JKT_SBN *sbn);
+ static int get_suuji_kouho (register struct JKT_SBN *);
+ static int get_eisuu_kouho (struct JKT_SBN *);
+@@ -471,16 +471,18 @@ jkt_get_syo (yomi_sno, yomi_eno, beginve
+       freejktsbn (jktsbn);
+       jktsbn = next_sbn;
+     }
+-  qsort ((char *) *dsd_sbn, cnt, sizeof (struct DSD_SBN), cmp_dsd_sbn);
++  qsort (*dsd_sbn, cnt, sizeof (struct DSD_SBN), cmp_dsd_sbn);
+   return (cnt);
+ }
+ 
+ static int
+ cmp_dsd_sbn (sbn1, sbn2)
+-     struct DSD_SBN *sbn1;
+-     struct DSD_SBN *sbn2;
++     const void *sbn1;
++     const void *sbn2;
+ {
+-  return (sbn2->v_jc - sbn1->v_jc);
++  const struct DSD_SBN *p1 = sbn1;
++  const struct DSD_SBN *p2 = sbn2;
++  return (p2->v_jc - p1->v_jc);
+ }
+ 
+ static int
Index: pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jserver_jikouho__d.c
diff -u /dev/null pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jserver_jikouho__d.c:1.1
--- /dev/null   Sun Jun 28 06:16:28 2026
+++ pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jserver_jikouho__d.c    Sun Jun 28 06:16:27 2026
@@ -0,0 +1,38 @@
+$NetBSD: patch-Wnn_jserver_jikouho__d.c,v 1.1 2026/06/28 06:16:27 tsutsui Exp $
+
+- Fix build with -std=gnu23 (i.e. gcc14 and later)
+
+--- Wnn/jserver/jikouho_d.c.orig       2013-09-02 11:01:39.000000000 +0000
++++ Wnn/jserver/jikouho_d.c
+@@ -60,7 +60,7 @@ static void sons_set (register struct JK
+ static void dsd_hyouka (struct DSD_DBN *);
+ static void cnt_sbn (register struct JKT_SBN *, register int *, register int *);
+ static void cnt_dbn (register struct JKT_DBN *, register int *dbn_cnt, register int *sbn_cnt);
+-static int cmp_dsd_dbn (struct DSD_DBN *, struct DSD_DBN *);
++static int cmp_dsd_dbn (const void *, const void *);
+ static int jkt_dbn (int, int, int,
+ #ifndef NO_FZK
+                   w_char *,
+@@ -136,16 +136,18 @@ jkt_get_dai (yomi_sno, yomi_eno, beginve
+         dbn->v_jc = DIVID_HYOUKA (dbn->v_jc, divid);
+     }
+   /* SORT */
+-  qsort ((char *) *dsd_dbn, cnt, sizeof (struct DSD_DBN), cmp_dsd_dbn);
++  qsort (*dsd_dbn, cnt, sizeof (struct DSD_DBN), cmp_dsd_dbn);
+   return (cnt);
+ }
+ 
+ static int
+ cmp_dsd_dbn (dbn1, dbn2)
+-     struct DSD_DBN *dbn1;
+-     struct DSD_DBN *dbn2;
++     const void *dbn1;
++     const void *dbn2;
+ {
+-  return (dbn2->v_jc - dbn1->v_jc);
++  const struct DSD_DBN *p1 = dbn1;
++  const struct DSD_DBN *p2 = dbn2;
++  return (p2->v_jc - p1->v_jc);
+ }
+ 
+ static void
Index: pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jserver_jishoop.c
diff -u /dev/null pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jserver_jishoop.c:1.1
--- /dev/null   Sun Jun 28 06:16:28 2026
+++ pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jserver_jishoop.c       Sun Jun 28 06:16:27 2026
@@ -0,0 +1,15 @@
+$NetBSD: patch-Wnn_jserver_jishoop.c,v 1.1 2026/06/28 06:16:27 tsutsui Exp $
+
+- Appease "comparison between pointer and integer" warning
+
+--- Wnn/jserver/jishoop.c.orig 2013-09-02 11:01:39.000000000 +0000
++++ Wnn/jserver/jishoop.c
+@@ -531,7 +531,7 @@ found_it:
+   if (p->kosuu == 1)
+     {
+       *next_pter = p->next;
+-      if (tary[ind1].pter == NULL)
++      if (tary[ind1].pter == ENDPTR)
+         remove_space (tary, ind1, jtl, tary[ind1].pter1);
+       if (p->serial == jtl->maxserial - 1)
+         {
Index: pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jserver_snd__rcv.c
diff -u /dev/null pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jserver_snd__rcv.c:1.1
--- /dev/null   Sun Jun 28 06:16:28 2026
+++ pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jserver_snd__rcv.c      Sun Jun 28 06:16:28 2026
@@ -0,0 +1,25 @@
+$NetBSD: patch-Wnn_jserver_snd__rcv.c,v 1.1 2026/06/28 06:16:28 tsutsui Exp $
+
+- Appease -Wincompatible-pointer-types warning
+
+--- Wnn/jserver/snd_rcv.c.orig 2003-05-11 18:43:16.000000000 +0000
++++ Wnn/jserver/snd_rcv.c
+@@ -54,15 +54,16 @@ fopen_write_cur (fn)
+ /* JS_FILE_SEND (server recieves) */
+ int
+ fread_cur (p, size, nitems)
+-     char *p;
++     void *p;
+      register int size, nitems;
+ {
++  char *cp = p;
+   register int i, j, xx;
+   for (i = 0; i < nitems; i++)
+     {
+       for (j = 0; j < size; j++)
+         {
+-          *p++ = xx = xgetc_cur ();
++          *cp++ = xx = xgetc_cur ();
+           if (xx == -1)
+             return i;
+         }
Index: pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jutil_atod.c
diff -u /dev/null pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jutil_atod.c:1.1
--- /dev/null   Sun Jun 28 06:16:28 2026
+++ pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jutil_atod.c    Sun Jun 28 06:16:28 2026
@@ -0,0 +1,63 @@
+$NetBSD: patch-Wnn_jutil_atod.c,v 1.1 2026/06/28 06:16:28 tsutsui Exp $
+
+- Fix build with -std=gnu23 (i.e. gcc14 and later)
+
+--- Wnn/jutil/atod.c.orig      2013-09-02 11:01:39.000000000 +0000
++++ Wnn/jutil/atod.c
+@@ -76,7 +76,7 @@ static char *rcs_id = "$Id: atod.c,v 1.1
+ extern int wnn_loadhinsi FRWNN_PARAMS((unsigned char*)),
+   init_heap FRWNN_PARAMS((int,int,int,int,FILE*)),
+   little_endian FRWNN_PARAMS(()),
+-  Sorted FRWNN_PARAMS((register char*,register int,int,int (*sort_fun)(char*,char*))),
++  Sorted FRWNN_PARAMS((const void*,register int,int,WNN_CompareFunc)),
+   asshuku FRWNN_PARAMS((int)),
+   revdic FRWNN_PARAMS((struct JT *,int));
+ #ifdef CHINESE
+@@ -87,7 +87,7 @@ extern void ujis_header FRWNN_PARAMS((vo
+ extern void read_ujis FRWNN_PARAMS((int,int,int)),
+   reverse_yomi FRWNN_PARAMS((void)),
+   create_rev_dict FRWNN_PARAMS((void)),
+-  uniq_je FRWNN_PARAMS((int(*func)(char*,char*))),
++  uniq_je FRWNN_PARAMS((WNN_CompareFunc)),
+   sort_if_not_sorted FRWNN_PARAMS((void)),
+   output_header FRWNN_PARAMS((FILE*,struct JT*,struct wnn_file_head*)),
+   udytoS FRWNN_PARAMS((w_char*,int,char*,struct uind1*)),
+@@ -97,8 +97,8 @@ extern void read_ujis FRWNN_PARAMS((int,
+   rev_short_fun FRWNN_PARAMS((w_char*)),
+   rev_w_char FRWNN_PARAMS((w_char*,int));
+ 
+-extern int sort_func_sdic FRWNN_PARAMS((char*,char*));
+-extern int sort_func_je FRWNN_PARAMS((char*,char*));
++extern int sort_func_sdic FRWNN_PARAMS((const void*,const void*));
++extern int sort_func_je FRWNN_PARAMS((const void*,const void*));
+ extern void set_cswidth FRWNN_PARAMS((register unsigned int));
+ 
+ static void ujistoud FRWNN_PARAMS((void)),
+@@ -573,12 +573,12 @@ yStrcmp (w_char* a, w_char*b)
+ }
+ 
+ int
+-sort_func_sdic (char* a, char* b)
++sort_func_sdic (const void* a, const void* b)
+ {
+   int tmp;
+   struct je *pa, *pb;
+-  pa = *((struct je **) a);
+-  pb = *((struct je **) b);
++  pa = *((struct je * const *) a);
++  pb = *((struct je * const *) b);
+   tmp = yStrcmp (pa->yomi, pb->yomi);
+   if (tmp)
+     return (tmp);
+@@ -595,9 +595,9 @@ sort_func_sdic (char* a, char* b)
+ static void
+ sdic_sort (void)
+ {
+-  if (!Sorted ((char *) jeary, (int) jt.maxserial, sizeof (struct je *), sort_func_sdic))
++  if (!Sorted (jeary, (int) jt.maxserial, sizeof (struct je *), sort_func_sdic))
+     {
+-      qsort ((char *) jeary, (int) jt.maxserial, sizeof (struct je *), sort_func_sdic);
++      qsort (jeary, (int) jt.maxserial, sizeof (struct je *), sort_func_sdic);
+     }
+ }
+ 
Index: pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jutil_atof.c
diff -u /dev/null pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jutil_atof.c:1.1
--- /dev/null   Sun Jun 28 06:16:28 2026
+++ pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jutil_atof.c    Sun Jun 28 06:16:28 2026
@@ -0,0 +1,62 @@
+$NetBSD: patch-Wnn_jutil_atof.c,v 1.1 2026/06/28 06:16:28 tsutsui Exp $
+
+- Fix build with -std=gnu23 (i.e. gcc14 and later)
+
+--- Wnn/jutil/atof.c.orig      2013-09-02 11:01:39.000000000 +0000
++++ Wnn/jutil/atof.c
+@@ -596,15 +596,18 @@ read_id ()
+ 
+ static int
+ sort_func_id (a, b)
+-     char *a, *b;
++     const void *a, *b;
+ {
+-  return (strcmp (((struct id_struct *) a)->str, ((struct id_struct *) b)->str));
++  const struct id_struct *ia = a;
++  const struct id_struct *ib = b;
++
++  return (strcmp (ia->str, ib->str));
+ }
+ 
+ static void
+ sort_id ()
+ {
+-  qsort ((char *) &id[0], id_num, sizeof (struct id_struct), sort_func_id);
++  qsort (&id[0], id_num, sizeof (struct id_struct), sort_func_id);
+ }
+ 
+ #ifdef nodef
+@@ -741,17 +744,20 @@ bsch (c, st, end)
+ #ifndef NO_FZK
+ static int
+ sort_func_fz (a, b)
+-     char *a, *b;
++     const void *a, *b;
+ {
+   int c;
++  /* XXX may cause -Wcast-qual but wnn_Strcmp() should be fixed to take const */
++  struct fuzokugo *fa = (struct fuzokugo *)a;
++  struct fuzokugo *fb = (struct fuzokugo *)b;
+ 
+-  if ((c = wnn_Strcmp (((struct fuzokugo *) a)->y, ((struct fuzokugo *) b)->y)) == 0)
++  if ((c = wnn_Strcmp (fa->y, fb->y)) == 0)
+     {
+-      if (((struct fuzokugo *) a)->hinsi > ((struct fuzokugo *) b)->hinsi)
++      if (fa->hinsi > fb->hinsi)
+         {
+           return (1);
+         }
+-      else if (((struct fuzokugo *) a)->hinsi < ((struct fuzokugo *) b)->hinsi)
++      else if (fa->hinsi < fb->hinsi)
+         {
+           return (-1);
+         }
+@@ -763,7 +769,7 @@ sort_func_fz (a, b)
+ static void
+ sort ()
+ {
+-  qsort ((char *) &fz[0], fz_num, sizeof (struct fuzokugo), sort_func_fz);
++  qsort (&fz[0], fz_num, sizeof (struct fuzokugo), sort_func_fz);
+ }
+ #endif /* NO_FZK */
+ 
Index: pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jutil_atorev.c
diff -u /dev/null pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jutil_atorev.c:1.1
--- /dev/null   Sun Jun 28 06:16:28 2026
+++ pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_jutil_atorev.c  Sun Jun 28 06:16:28 2026
@@ -0,0 +1,16 @@
+$NetBSD: patch-Wnn_jutil_atorev.c,v 1.1 2026/06/28 06:16:28 tsutsui Exp $
+
+- Fix build with -std=gnu23 (i.e. gcc14 and later)
+
+--- Wnn/jutil/atorev.c.orig    2026-06-23 14:01:43.991289584 +0000
++++ Wnn/jutil/atorev.c
+@@ -64,9 +64,6 @@ static void make_ri2 FRWNN_PARAMS((void)
+ static void make_ri1 FRWNN_PARAMS((int));
+ static void set_rpter1 FRWNN_PARAMS((int));
+ 
+-extern int sort_func_je ();
+-extern void sort_kanji ();
+-
+ struct je **ptmp;
+ 
+ void
Index: pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_romkan_rk__main.c
diff -u /dev/null pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_romkan_rk__main.c:1.1
--- /dev/null   Sun Jun 28 06:16:28 2026
+++ pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Wnn_romkan_rk__main.c       Sun Jun 28 06:16:28 2026
@@ -0,0 +1,15 @@
+$NetBSD: patch-Wnn_romkan_rk__main.c,v 1.1 2026/06/28 06:16:28 tsutsui Exp $
+
+- Appease -Wchar-subscripts warnings/errors
+
+--- Wnn/romkan/rk_main.c.orig  2026-06-23 18:35:34.977127060 +0000
++++ Wnn/romkan/rk_main.c
+@@ -88,7 +88,7 @@ char eofflg;                    /* romka
+                                    �������eofflg��2�� */
+ 
+ letter evalbuf[2][2][OUTSIZ];
+-char ebf_sw = 0;
++int ebf_sw = 0;
+ letter saishu_out[OUTSIZ];
+ letter delchr, delchr2 = EOLTTR, nisedl;        /* DEL���饯������Ĥޤǻ�Ƥ� */
+ 
Index: pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Xwnmo_romkan__m_rk__main.c
diff -u /dev/null pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Xwnmo_romkan__m_rk__main.c:1.1
--- /dev/null   Sun Jun 28 06:16:28 2026
+++ pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Xwnmo_romkan__m_rk__main.c  Sun Jun 28 06:16:28 2026
@@ -0,0 +1,25 @@
+$NetBSD: patch-Xwnmo_romkan__m_rk__main.c,v 1.1 2026/06/28 06:16:28 tsutsui Exp $
+
+- Appease "comparison between pointer and integer" warning
+- Appease -Wchar-subscripts warnings/errors
+
+--- Xwnmo/romkan_m/rk_main.c.orig      2026-06-23 18:36:18.699420637 +0000
++++ Xwnmo/romkan_m/rk_main.c
+@@ -452,7 +452,7 @@ rk_buf_init ()
+   p->ungetc_buf = EOLTTR;
+   p->unnext_buf = EOLTTR;
+   p->delchr2 = EOLTTR;
+-  p->ebf_sw = NULL;
++  p->ebf_sw = 0;
+   p->oneletter[0] = p->oneletter[1] = EOLTTR;
+   p->keybuf[0] = p->urabuf[0] = p->disout[0] = p->rk_output[0] = EOLTTR;
+   p->rk_table = (RomkanTable *) NULL;
+@@ -1753,7 +1753,7 @@ henkan_ok ()
+                                    match()��urabuf�ʤɤ�Ĵ��� */
+   fast letter *p;               /* V3.1 */
+ #ifndef MULTI
+-  static char ebf_sw = 0;       /* V3.1 */
++  static int ebf_sw = 0;        /* V3.1 */
+   static letter oneletter[2] = { EOLTTR, EOLTTR };      /* V3.1 */
+ #endif /*!MULTI */
+ 
Index: pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Xwnmo_romkan__m_rk__multi.h
diff -u /dev/null pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Xwnmo_romkan__m_rk__multi.h:1.1
--- /dev/null   Sun Jun 28 06:16:28 2026
+++ pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Xwnmo_romkan__m_rk__multi.h Sun Jun 28 06:16:28 2026
@@ -0,0 +1,15 @@
+$NetBSD: patch-Xwnmo_romkan__m_rk__multi.h,v 1.1 2026/06/28 06:16:28 tsutsui Exp $
+
+- Appease -Wchar-subscripts warnings/errors
+
+--- Xwnmo/romkan_m/rk_multi.h.orig     2026-06-23 18:36:03.780858234 +0000
++++ Xwnmo/romkan_m/rk_multi.h
+@@ -272,7 +272,7 @@ typedef struct _Romkan
+   int lastoutlen, lastkbflen;
+   int hyonum;
+ 
+-  char ebf_sw;
++  int ebf_sw;
+   letter oneletter[2];
+ 
+   modeswtable rk_modesw;
Index: pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Xwnmo_xjutil_kensaku.c
diff -u /dev/null pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Xwnmo_xjutil_kensaku.c:1.1
--- /dev/null   Sun Jun 28 06:16:28 2026
+++ pkgsrc/inputmethod/ja-freewnn-lib/patches/patch-Xwnmo_xjutil_kensaku.c      Sun Jun 28 06:16:28 2026
@@ -0,0 +1,44 @@
+$NetBSD: patch-Xwnmo_xjutil_kensaku.c,v 1.1 2026/06/28 06:16:28 tsutsui Exp $
+
+- Fix build with -std=gnu23 (i.e. gcc14 and later)
+
+--- Xwnmo/xjutil/kensaku.c.orig        2026-06-25 14:34:37.374657174 +0000
++++ Xwnmo/xjutil/kensaku.c
+@@ -57,17 +57,19 @@ int del_point, ima_point, hindo_point, c
+ 
+ static int
+ sort_func_ws (a, b)
+-     register char *a, *b;
++     const void *a, *b;
+ {
+   int ah, bh, ai, bi, iah, ibh, iai, ibi;
+-  ah = ((struct wnn_jdata *) a)->hindo;
+-  bh = ((struct wnn_jdata *) b)->hindo;
+-  iah = ((struct wnn_jdata *) a)->int_hindo;
+-  ibh = ((struct wnn_jdata *) b)->int_hindo;
+-  ai = ((struct wnn_jdata *) a)->ima;
+-  bi = ((struct wnn_jdata *) b)->ima;
+-  iai = ((struct wnn_jdata *) a)->int_ima;
+-  ibi = ((struct wnn_jdata *) b)->int_ima;
++  const struct wnn_jdata *ja = a;
++  const struct wnn_jdata *jb = b;
++  ah = ja->hindo;
++  bh = jb->hindo;
++  iah = ja->int_hindo;
++  ibh = jb->int_hindo;
++  ai = ja->ima;
++  bi = jb->ima;
++  iai = ja->int_ima;
++  ibi = jb->int_ima;
+ 
+   if (ai == WNN_IMA_OFF && ah == WNN_ENTRY_NO_USE)
+     return (1);
+@@ -160,7 +162,7 @@ retry:
+       return (NULL);
+     }
+   word_searched = (struct wnn_jdata *) wordrb.buf;
+-  qsort ((char *) word_searched, cnt, sizeof (struct wnn_jdata), sort_func_ws);
++  qsort (word_searched, cnt, sizeof (struct wnn_jdata), sort_func_ws);
+ 
+   update_dic_list ();
+ 



Home | Main Index | Thread Index | Old Index