pkgsrc-Changes archive

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

CVS commit: pkgsrc/devel/editline



Module Name:    pkgsrc
Committed By:   hauke
Date:           Thu Jun 29 17:55:29 UTC 2023

Modified Files:
        pkgsrc/devel/editline: Makefile distinfo
        pkgsrc/devel/editline/patches: patch-src_vis.c

Log Message:
vis(3): Avoid nonportable MIN in portable code.

Adopt upstream's resolution, to be dropped with the next
update. (Thanks, riastradh@)


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 pkgsrc/devel/editline/Makefile
cvs rdiff -u -r1.18 -r1.19 pkgsrc/devel/editline/distinfo
cvs rdiff -u -r1.1 -r1.2 pkgsrc/devel/editline/patches/patch-src_vis.c

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

Modified files:

Index: pkgsrc/devel/editline/Makefile
diff -u pkgsrc/devel/editline/Makefile:1.15 pkgsrc/devel/editline/Makefile:1.16
--- pkgsrc/devel/editline/Makefile:1.15 Thu Jun 29 16:18:56 2023
+++ pkgsrc/devel/editline/Makefile      Thu Jun 29 17:55:29 2023
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.15 2023/06/29 16:18:56 hauke Exp $
+# $NetBSD: Makefile,v 1.16 2023/06/29 17:55:29 hauke Exp $
 
 DISTNAME=              libedit-20221030-3.1
 PKGNAME=               editline-3.1.20221030
-PKGREVISION=           1
+PKGREVISION=           2
 CATEGORIES=            devel
 MASTER_SITES=          https://thrysoee.dk/editline/
 

Index: pkgsrc/devel/editline/distinfo
diff -u pkgsrc/devel/editline/distinfo:1.18 pkgsrc/devel/editline/distinfo:1.19
--- pkgsrc/devel/editline/distinfo:1.18 Thu Jun 29 16:18:56 2023
+++ pkgsrc/devel/editline/distinfo      Thu Jun 29 17:55:29 2023
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.18 2023/06/29 16:18:56 hauke Exp $
+$NetBSD: distinfo,v 1.19 2023/06/29 17:55:29 hauke Exp $
 
 BLAKE2s (libedit-20221030-3.1.tar.gz) = 28971f0b4661c9b400df3cfe8d82e6ef4cf7bc9a964a013671adf560aeec9488
 SHA512 (libedit-20221030-3.1.tar.gz) = 41eb46feaffa909e8790b9a9e304d5246e82ab366721196126a923d68b4d4964d0a433fe238f9d5e0a00aefb5c8cb66132150792929a793785ad091d91016f97
@@ -8,4 +8,4 @@ SHA1 (patch-ac) = 666403d5ef03fea39081d7
 SHA1 (patch-libedit.pc.in) = c2c810ab2c9c7b9d1862abc7bdca53fda5732119
 SHA1 (patch-src_sys.h) = 3c1f69b520b382e3a0308e7f8ffaddca65d91a8d
 SHA1 (patch-src_terminal.h) = 5d658f7b7c3b88c0c3122a1be740f3a72d7d2370
-SHA1 (patch-src_vis.c) = 45d0df27a3ae34c3d23eaa777d576768619d8bb6
+SHA1 (patch-src_vis.c) = eacfd6142a1dc623feac9e69f976b27eb3e5e30d

Index: pkgsrc/devel/editline/patches/patch-src_vis.c
diff -u pkgsrc/devel/editline/patches/patch-src_vis.c:1.1 pkgsrc/devel/editline/patches/patch-src_vis.c:1.2
--- pkgsrc/devel/editline/patches/patch-src_vis.c:1.1   Thu Jun 29 16:18:56 2023
+++ pkgsrc/devel/editline/patches/patch-src_vis.c       Thu Jun 29 17:55:29 2023
@@ -1,17 +1,19 @@
-$NetBSD: patch-src_vis.c,v 1.1 2023/06/29 16:18:56 hauke Exp $
+$NetBSD: patch-src_vis.c,v 1.2 2023/06/29 17:55:29 hauke Exp $
 
-OmniOS has MIN() in <utility.h>, which autoconf could check for.
+vis(3): Avoid nonportable MIN in portable code.
+Adopt upstream's resolution, to be dropped with the next update.
 
 --- src/vis.c.orig     2022-06-11 07:56:37.000000000 +0000
 +++ src/vis.c
-@@ -85,6 +85,10 @@ __weak_alias(strvisx,_strvisx)
- #include <stdio.h>
- #include <string.h>
- 
-+#ifndef MIN
-+#define MIN(a,b)        (((a)<(b))?(a):(b))
-+#endif
-+
- /*
-  * The reason for going through the trouble to deal with character encodings
-  * in vis(3), is that we use this to safe encode output of commands. This
+@@ -468,7 +468,10 @@ istrsenvisx(char **mbdstp, size_t *dlen,
+       while (mbslength > 0) {
+               /* Convert one multibyte character to wchar_t. */
+               if (!cerr)
+-                      clen = mbrtowc(src, mbsrc, MIN(mbslength, MB_LEN_MAX),
++                      clen = mbrtowc(src, mbsrc,
++                          (mbslength < MB_LEN_MAX
++                              ? mbslength
++                              : MB_LEN_MAX),
+                           &mbstate);
+               if (cerr || clen < 0) {
+                       /* Conversion error, process as a byte instead. */



Home | Main Index | Thread Index | Old Index