pkgsrc-Changes archive

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

CVS commit: pkgsrc/textproc/eb



Module Name:    pkgsrc
Committed By:   nia
Date:           Thu Jun 18 14:36:49 UTC 2026

Modified Files:
        pkgsrc/textproc/eb: distinfo
Added Files:
        pkgsrc/textproc/eb/patches: patch-libebutils_puts__eucjp.c

Log Message:
eb: Improve portability of iconv handling.

Older NetBSD and SunOS have the traditional iconv prototype with a const
char * argument, while other operating systems are using a char *
argument due to historical accidents in the POSIX standard.

Newer C compiler versions (e.g. GCC 14) have strict enforcement of
pointer type compatibility. Thus a const char * cannot be converted
easily back into a non-const char *. So we need to match the prototype
of the iconv function carefully.


To generate a diff of this commit:
cvs rdiff -u -r1.19 -r1.20 pkgsrc/textproc/eb/distinfo
cvs rdiff -u -r0 -r1.1 \
    pkgsrc/textproc/eb/patches/patch-libebutils_puts__eucjp.c

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

Modified files:

Index: pkgsrc/textproc/eb/distinfo
diff -u pkgsrc/textproc/eb/distinfo:1.19 pkgsrc/textproc/eb/distinfo:1.20
--- pkgsrc/textproc/eb/distinfo:1.19    Tue Oct 26 11:21:51 2021
+++ pkgsrc/textproc/eb/distinfo Thu Jun 18 14:36:49 2026
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.19 2021/10/26 11:21:51 nia Exp $
+$NetBSD: distinfo,v 1.20 2026/06/18 14:36:49 nia Exp $
 
 BLAKE2s (eb-4.3/cencro-1.0.tar.gz) = d98301ff88c13b584c87350ae234e367cf4c86d634b62b2b72b1fc3cba908cb3
 SHA512 (eb-4.3/cencro-1.0.tar.gz) = 8474bdce42237b03cf9bedc625d169ed43bd536f49abf1d470239d302ae7cc52a239178a6706dd64d114c26c1797f9b06445a10ee2e0d29e070c0e27692047be
@@ -97,3 +97,4 @@ BLAKE2s (eb-4.3/superdic98-1.0.tar.gz) =
 SHA512 (eb-4.3/superdic98-1.0.tar.gz) = 62156597e4399bc36bf8fe8f1fe2483106715a0954db0a3528a9a8f96ef2abce71c0f2bf2f84ff1d3a5d5a99ce5c08e8ecbeb07f99bf6faa8bf21c97ebc9260f
 Size (eb-4.3/superdic98-1.0.tar.gz) = 5252 bytes
 SHA1 (patch-aa) = a0d822612c29aa3964eaa8b6ccee4028926bb4c7
+SHA1 (patch-libebutils_puts__eucjp.c) = b997336e2a333246f9fa6c9fa7b6215e7445e819

Added files:

Index: pkgsrc/textproc/eb/patches/patch-libebutils_puts__eucjp.c
diff -u /dev/null pkgsrc/textproc/eb/patches/patch-libebutils_puts__eucjp.c:1.1
--- /dev/null   Thu Jun 18 14:36:50 2026
+++ pkgsrc/textproc/eb/patches/patch-libebutils_puts__eucjp.c   Thu Jun 18 14:36:49 2026
@@ -0,0 +1,39 @@
+$NetBSD: patch-libebutils_puts__eucjp.c,v 1.1 2026/06/18 14:36:49 nia Exp $
+
+Older NetBSD and SunOS have the traditional iconv prototype with a const
+char * argument, while other operating systems are using a char *
+argument due to historical accidents in the POSIX standard.
+
+Newer C compiler versions (e.g. GCC 14) have strict enforcement of
+pointer type compatibility. Thus a const char * cannot be converted
+easily back into a non-const char *. So we need to match the prototype
+of the iconv function carefully.
+
+--- libebutils/puts_eucjp.c.orig       2026-06-18 14:30:09.401447683 +0000
++++ libebutils/puts_eucjp.c
+@@ -46,6 +46,13 @@
+ #include <langinfo.h>
+ #endif
+ 
++#if defined(__NetBSD__)
++#include <sys/param.h>
++#if __NetBSD_Prereq__(9,99,17)
++#define NETBSD_POSIX_ICONV 1
++#endif
++#endif
++
+ /*
+  * Convert `string' from EUC-JP to the current locale encoding, and
+  * then write it to `stream'.
+@@ -59,7 +66,11 @@ fputs_eucjp_to_locale(const char *string, FILE *stream
+     char *buffer = NULL;
+     size_t buffer_size;
+     iconv_t cd = (iconv_t)-1;
++#if (defined(__sun) || defined(__NetBSD__)) && !defined(NETBSD_POSIX_ICONV) && !defined(_LIBICONV_VERSION)
+     const char *in_p;
++#else
++    char *in_p;
++#endif
+     char *out_p;
+     size_t in_left;
+     size_t out_left;



Home | Main Index | Thread Index | Old Index