From: SASANO Takayoshi Subject: Re: amd64: llvm 16 fallout (2023-11-14) To: ports@openbsd.org Date: Tue, 20 Feb 2024 20:51:41 +0900 how did it about japanese/onew,canna for llvm 16? On Sat, 18 Nov 2023 19:08:21 +0900, SASANO Takayoshi wrote: > > Hello, > > > japanese/onew,canna C integer to pointer conversion > > how about this? (I don't use onew library so I don't know this fix > works suitable or not... please help testing!) > > Index: Makefile > =================================================================== > RCS file: /cvs/ports/japanese/onew/Makefile,v > diff -u -p -r1.24 Makefile > --- Makefile 26 Sep 2023 11:46:55 -0000 1.24 > +++ Makefile 18 Nov 2023 10:01:20 -0000 > @@ -6,11 +6,10 @@ COMMENT-wnn4-canna= library for Japanese > FULLPKGNAME= ja-onew${FLAVOR_EXT}-2.2.10 > > DISTNAME= jvim2.0r+onew2.2.10 > -REVISION= 4 > +REVISION= 5 > CATEGORIES= japanese > > -SITES= ftp://ftp.lab.kdd.co.jp/Japan/onew/ \ > - ftp://ftp.leo.chubu.ac.jp/pub/editor/jvim/ > +SITES= http://tsubaki.st.ryukoku.ac.jp/pub/editor/jvim/ > > MAINTAINER= Marc Espie > > Index: patches/patch-interface_oui_c > =================================================================== > RCS file: /cvs/ports/japanese/onew/patches/patch-interface_oui_c,v > diff -u -p -r1.2 patch-interface_oui_c > --- patches/patch-interface_oui_c 11 Mar 2022 19:24:45 -0000 1.2 > +++ patches/patch-interface_oui_c 18 Nov 2023 10:01:20 -0000 > @@ -1,15 +1,39 @@ > -Index: interface/oui.c > ---- interface/oui.c.orig > -+++ interface/oui.c > -@@ -8,9 +8,10 @@ char *getenv(); > +--- interface/oui.c.orig.port Thu Jun 22 11:30:49 1995 > ++++ interface/oui.c Sat Nov 18 15:33:56 2023 > +@@ -3,15 +3,16 @@ > + ************************************************************************/ > + > + #include > ++#include > + char *getenv(); > + > static FILE *ouiFp; > static int uin; > static int uilev; > -+void > - ouiTrace(prim,fmt,a,b,c,d,e,f,g) > - char *fmt; > +-ouiTrace(prim,fmt,a,b,c,d,e,f,g) > +- char *fmt; > - FILE *prim; > -+ char *prim; > ++void > ++ouiTrace(char *prim,char *fmt,...) > { char *logf; > ++ va_list ap; > > if( ouiFp == NULL ){ > + if( logf = getenv("ONEW_UIFLOG") ) > +@@ -23,10 +24,14 @@ ouiTrace(prim,fmt,a,b,c,d,e,f,g) > + return; > + fprintf(ouiFp,"%4d ",++uin); > + fprintf(ouiFp,"%-16s ",prim); > +- if(fmt) fprintf(ouiFp,fmt,a,b,c,d,e,f,g); > ++ if(fmt){ > ++ va_start(ap,fmt); > ++ vfprintf(ouiFp,fmt,ap); > ++ va_end(ap); > ++ } > + fprintf(ouiFp,"\n"); > + } > +-Onew_ouiTrace(prim,fmt,a,b,c,d,e,f,g){ ouiTrace(prim,fmt,a,b,c,d,e,f,g); } > ++#define Onew_ouiTrace(prim,fmt,...) ouiTrace(prim,fmt,__VA_ARGS__) > + > + ouiGETCHAR() > + { int ch; > Index: patches/patch-interface_ouimessage_c > =================================================================== > RCS file: /cvs/ports/japanese/onew/patches/patch-interface_ouimessage_c,v > diff -u -p -r1.3 patch-interface_ouimessage_c > --- patches/patch-interface_ouimessage_c 11 Mar 2022 19:24:45 -0000 1.3 > +++ patches/patch-interface_ouimessage_c 18 Nov 2023 10:01:20 -0000 > @@ -1,6 +1,5 @@ > -Index: interface/ouimessage.c > ---- interface/ouimessage.c.orig > -+++ interface/ouimessage.c > +--- interface/ouimessage.c.orig.port Sat Jun 4 19:37:36 1994 > ++++ interface/ouimessage.c Sat Nov 18 15:42:41 2023 > @@ -1,6 +1,8 @@ > /* > * MESSAGE OUTPUT TO APPLICATION USER INTERFACE > @@ -18,3 +17,12 @@ Index: interface/ouimessage.c > Onew_putmode(mode,help) > char *mode,*help; > { int modeflags,xmodef; > +@@ -62,7 +65,7 @@ Onew_putmsg_retain(so,fmt,a,b,c,d,e,f,g) > + } > + > + Onew_putmodef(mode,fmt,a,b,c,d,e,f,g) > +- char *fmt,*a,*b,*c,*d,*e,*f,*g; > ++ char *mode,*fmt,*a,*b,*c,*d,*e,*f,*g; > + { char help[1024]; > + > + sprintf(help,fmt,a,b,c,d,e,f,g); > Index: patches/patch-onew_c > =================================================================== > RCS file: /cvs/ports/japanese/onew/patches/patch-onew_c,v > diff -u -p -r1.4 patch-onew_c > --- patches/patch-onew_c 11 Mar 2022 19:24:45 -0000 1.4 > +++ patches/patch-onew_c 18 Nov 2023 10:01:20 -0000 > @@ -1,17 +1,17 @@ > -Index: onew.c > ---- onew.c.orig > -+++ onew.c > -@@ -26,7 +26,8 @@ History: > +--- onew.c.orig.port Thu Jun 29 16:47:04 1995 > ++++ onew.c Sat Nov 18 17:15:13 2023 > +@@ -26,7 +26,9 @@ History: > #include > #include > #include > -extern char *getenv(); > +#include > +#include > ++#include > #include "onew.h" > > int on_via; > -@@ -35,7 +36,7 @@ int onew_client_version = 1; > +@@ -35,7 +37,7 @@ int onew_client_version = 1; > #define VER1 (onew_client_version == 1) > #define VER2 (onew_client_version == 2) > > @@ -20,7 +20,54 @@ Index: onew.c > > static Linebuff onew_buf; > static Mssgbuff onew_out; > -@@ -492,6 +493,7 @@ ONEW_BEEP(nsec){ > +@@ -49,7 +51,7 @@ static int is_tty; > + static int is_sock; > + static FILE *logfp; > + > +-static put_client(); > ++static put_client(char *command,char *form,...); > + > + > + /*######################################################################* > +@@ -217,12 +219,12 @@ ONEW_GETCHAR() > + return ch; > + } > + > +-static put_client(command,form,a,b,c,d,e,f) > +- char *command,*form; > ++static put_client(char *command,char *form,...) > + { Linebuff out,tmp; > + char *op; > + int ci,ch1,ch2; > + static int nmsg = 0; > ++ va_list ap; > + > + if( nmsg++ == 1 ) > + put_client(S_MESSAGE,":[ROMKAN & KANAKAN FILTEDR] %s", > +@@ -232,7 +234,9 @@ static put_client(command,form,a,b,c,d,e,f) > + sprintf(op,"%c%s",0xFF,command); > + op += strlen(op); > + > +- sprintf(op,form,a,b,c,d,e,f); > ++ va_start(ap,form); > ++ vsprintf(op,form,ap); > ++ va_end(ap); > + if( strcmp(command,S_INPUT) == 0 ) > + if( VER1 ) > + /* AND 1bytes character is INHIBITED */ > +@@ -245,7 +249,10 @@ static put_client(command,form,a,b,c,d,e,f) > + sprintf(op,"%c",0xFF); > + > + if( ONEW_DEBUG ){ > +- fprintf(stderr,"%s: %-10s %8x %8x ",command,form,a,b,c,d,e,f); > ++ fprintf(stderr,"%s: %-10s ",command,form); > ++ va_start(ap,form); > ++ vfprintf(stderr,"%8x %8x ",ap); > ++ va_end(ap); > + for( ci = 0; ch1 = out[ci]; ci++ ){ > + ch2 = out[ci+1]; > + if( ch1 & 0x80 && ch2 & 0x80 ){ > +@@ -492,6 +499,7 @@ ONEW_BEEP(nsec){ > fflush(stdout); > } > static int prev_modef; > Index: patches/patch-onewclient_c > =================================================================== > RCS file: /cvs/ports/japanese/onew/patches/patch-onewclient_c,v > diff -u -p -r1.3 patch-onewclient_c > --- patches/patch-onewclient_c 11 Mar 2022 19:24:45 -0000 1.3 > +++ patches/patch-onewclient_c 18 Nov 2023 10:01:20 -0000 > @@ -1,18 +1,25 @@ > -Index: onewclient.c > ---- onewclient.c.orig > -+++ onewclient.c > -@@ -21,6 +21,8 @@ History: > +--- onewclient.c.orig.port Sat Jul 1 18:59:23 1995 > ++++ onewclient.c Sat Nov 18 16:20:28 2023 > +@@ -21,6 +21,9 @@ History: > ///////////////////////////////////////////////////////////////////////*/ > > #include > +#include > +#include > ++#include > #include "onew.h" > > static int onew_DBG = 1; > -@@ -43,7 +45,7 @@ static dbg_printf(form,a,b,c,d,e,f,g){ > - Onew_message(form,a,b,c,d,e,f,g); > +@@ -38,12 +41,10 @@ onew_pipe(pipe) > + return onew_pid; > } > + > +-static dbg_printf(form,a,b,c,d,e,f,g){ > +- if( onew_DBG ) > +- Onew_message(form,a,b,c,d,e,f,g); > +-} > ++#define dbg_printf(...) \ > ++ { if( onew_DBG ) Onew_message(__VA_ARGS__); } > > -static open_onew(){ > +static void open_onew(){ > Index: patches/patch-onewlib_c > =================================================================== > RCS file: /cvs/ports/japanese/onew/patches/patch-onewlib_c,v > diff -u -p -r1.2 patch-onewlib_c > --- patches/patch-onewlib_c 11 Mar 2022 19:24:45 -0000 1.2 > +++ patches/patch-onewlib_c 18 Nov 2023 10:01:20 -0000 > @@ -1,5 +1,5 @@ > ---- onewlib.c.orig Sun Jul 2 09:55:41 1995 > -+++ onewlib.c Wed May 19 15:54:13 2010 > +--- onewlib.c.orig.port Sun Jul 2 16:55:41 1995 > ++++ onewlib.c Sat Nov 18 15:48:59 2023 > @@ -19,6 +19,7 @@ > #define STATIC static > > @@ -64,3 +64,22 @@ > > if( !Onew_RK_init() ){ > kc = OnewGetchar(); > +@@ -551,7 +553,7 @@ char *romkan_help(){ > + Onew_kanakan(com,str,start,leng) > + char *str; > + { > +- return Onew_kana_to_kanji(com,str,start,leng); > ++ return Onew_kana_to_kanji(com,str); > + } > + > + char ONEW_CurrentYomi[256]; > +@@ -740,7 +742,8 @@ kana_init(){ > + return Onew_RK_init(); > + } > + kana_to_kanji(str,start,leng) > ++ char *str; > + { > +- return Onew_kana_to_kanji(0,str,start,leng); > ++ return Onew_kana_to_kanji(0,str); > + } > + > > -- > SASANO Takayoshi (JG1UAA) >