Re: pkg/60017: textproc/uni2ascii: update to 4.20

Bartosz Kuźma <[email protected]>
Newsgroups gmane.os.netbsd.devel.pkgsrc.bugs
Message-ID <CAJTHwcDMBvQo2=_oBn3QRE4yksaSg2xZraSpmKcT9tLs5FtG8w@mail.gmail.com>
Please add these two patches to solve this issue.

On Thu, Feb 19, 2026 at 12:05 AM Thomas Klausner via gnats <
[email protected]> wrote:

> The following reply was made to PR pkg/60017; it has been noted by GNATS.
>
> From: Thomas Klausner <[email protected]>
> To: NetBSD bugtracking <[email protected]>
> Cc:
> Subject: Re: pkg/60017: textproc/uni2ascii: update to 4.20
> Date: Thu, 19 Feb 2026 00:01:24 +0100
>
>  On Wed, Feb 18, 2026 at 03:30:01AM +0100, [email protected] via
> gnats wrote:
>  > >Synopsis:       textproc/uni2ascii: update to 4.20
>
>  I tried this on NetBSD 11.99.5 with gcc 14, and the build fails for me
>  with:
>
>  --- enttbl.o ---
>  enttbl.c: In function 'LookupCodeForEntity':
>  enttbl.c:560:8: error: implicit declaration of function 'strcmp'
> [-Wimplicit-function-declaration]
>    560 |     c =strcmp(s,EntityCodeTable[m].name);
>        |        ^~~~~~
>  enttbl.c:24:1: note: include '<string.h>' or provide a declaration of
> 'strcmp'
>     23 | #include "unicode.h"
>    +++ |+#include <string.h>
>     24 |
>  *** [enttbl.o] Error code 1
>
>  make[1]: stopped making "all-am" in
> /tmp/textproc/uni2ascii/work/uni2ascii-4.20
>  --- endian.o ---
>  mv -f .deps/endian.Tpo .deps/endian.Po
>  --- uni2ascii.o ---
>  uni2ascii.c:2692:1: error: return type defaults to 'int' [-Wimplicit-int]
>   2692 | SubstituteChar(UTF32 c) {
>        | ^~~~~~~~~~~~~~
>  uni2ascii.c:2706:1: error: return type defaults to 'int' [-Wimplicit-int]
>   2706 | AddCustomSubstitution(char *str){
>        | ^~~~~~~~~~~~~~~~~~~~~
>  uni2ascii.c: In function 'main':
>  uni2ascii.c:3189:24: error: implicit declaration of function 'putu8'
> [-Wimplicit-function-declaration]
>   3189 |       if(PassThroughP) putu8(c);
>        |                        ^~~~~
>  *** [uni2ascii.o] Error code 1
>
>  I also tried adding
>  CFLAGS+=        -Wno-implicit-function-declaration
>  CFLAGS+=        -Wno-implicit-int
>  to the pkgsrc Makefile, but the pkgsrc CFLAGS are ignored.
>
>  Can you please take a look at this?
>
>  Thanks,
>   Thomas
>
>

-- 
Pozdrawiam, Bartosz Kuźma
patch-enttbl.c (application/octet-stream, 211 B)
$NetBSD$

--- enttbl.c.orig	2026-02-19 15:02:51.405490605 +0000
+++ enttbl.c
@@ -21,6 +21,7 @@
 #include "config.h"
 #include <stdlib.h>
 #include "unicode.h"
+#include <string.h>
 
 struct ent {
   char *name;
patch-uni2ascii.c (application/octet-stream, 846 B)
$NetBSD$

--- uni2ascii.c.orig	2026-02-19 15:03:42.107970203 +0000
+++ uni2ascii.c
@@ -2689,7 +2689,7 @@ int SubsAvailable = 0;
  * search may be advisable. For the time being we just do a linear search.
  */
 
-SubstituteChar(UTF32 c) {
+int SubstituteChar(UTF32 c) {
   int i;
   for(i = 0; i < SubCnt; i++) {
     if(c == SubList[i].u) {
@@ -2703,7 +2703,7 @@ SubstituteChar(UTF32 c) {
   return 0;
 }
 
-AddCustomSubstitution(char *str){
+void AddCustomSubstitution(char *str){
   char *Left;
   char *Right;
   char *Delim;
@@ -2798,6 +2798,7 @@ int main (int ac, char *av[])
   extern int optopt;
   extern UTF32 UTF8in(int,int *,unsigned char **);
 
+  extern void putu8 (unsigned long);
   extern int CountSlots(char *);
   extern void ListFormatArguments(short);
   extern void SetFormat(char *, int *, short *,int *, short *, short *);
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.