pkgsrc-Changes archive

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

CVS commit: pkgsrc/textproc/nbsed



Module Name:    pkgsrc
Committed By:   gutteridge
Date:           Wed Mar 20 20:37:28 UTC 2024

Modified Files:
        pkgsrc/textproc/nbsed: Makefile
        pkgsrc/textproc/nbsed/files: compile.c

Log Message:
nbsed: fix building on operating systems that don't have errc(3)

One of the simplest ways of addressing this is to switch to errx(3). It
seems unclear what the absolute minimums are for C compilers required
for bootstrap, and EILSEQ wasn't codified until the 1994 Normative
Amendment 1 to C89, so its value (per NetBSD) is hard-coded here, too.

This introduces a small diff to upstream, but seems safer than altering
libnbcompat this close to a quarterly branch freeze. (There are also
some questions about libnbcompat's current state to be added to a PR.)

Relates to PR pkg/57970.

Tested on Fedora Linux 39, which was previously broken.


To generate a diff of this commit:
cvs rdiff -u -r1.27 -r1.28 pkgsrc/textproc/nbsed/Makefile
cvs rdiff -u -r1.8 -r1.9 pkgsrc/textproc/nbsed/files/compile.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/nbsed/Makefile
diff -u pkgsrc/textproc/nbsed/Makefile:1.27 pkgsrc/textproc/nbsed/Makefile:1.28
--- pkgsrc/textproc/nbsed/Makefile:1.27 Wed Mar 13 13:38:18 2024
+++ pkgsrc/textproc/nbsed/Makefile      Wed Mar 20 20:37:27 2024
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.27 2024/03/13 13:38:18 gutteridge Exp $
+# $NetBSD: Makefile,v 1.28 2024/03/20 20:37:27 gutteridge Exp $
 
 DISTNAME=              nbsed-20240312
-PKGREVISION=           1
+PKGREVISION=           2
 CATEGORIES=            textproc pkgtools
 MASTER_SITES=          # empty
 DISTFILES=             # empty

Index: pkgsrc/textproc/nbsed/files/compile.c
diff -u pkgsrc/textproc/nbsed/files/compile.c:1.8 pkgsrc/textproc/nbsed/files/compile.c:1.9
--- pkgsrc/textproc/nbsed/files/compile.c:1.8   Tue Mar 12 16:45:07 2024
+++ pkgsrc/textproc/nbsed/files/compile.c       Wed Mar 20 20:37:27 2024
@@ -1,4 +1,4 @@
-/*     $NetBSD: compile.c,v 1.8 2024/03/12 16:45:07 christos Exp $     */
+/*     $NetBSD: compile.c,v 1.9 2024/03/20 20:37:27 gutteridge Exp $   */
 
 /*-
  * Copyright (c) 1992 Diomidis Spinellis.
@@ -44,7 +44,7 @@
 #if HAVE_SYS_CDEFS_H
 #include <sys/cdefs.h>
 #endif
-__RCSID("$NetBSD: compile.c,v 1.8 2024/03/12 16:45:07 christos Exp $");
+__RCSID("$NetBSD: compile.c,v 1.9 2024/03/20 20:37:27 gutteridge Exp $");
 #ifdef __FBSDID
 __FBSDID("$FreeBSD: head/usr.bin/sed/compile.c 259132 2013-12-09 18:57:20Z eadler $");
 #endif
@@ -880,10 +880,10 @@ compile_tr(char *p, struct s_tr **py)
                while (*op != '\0') {
                        oclen = mbrlen(op, MB_LEN_MAX, &mbs1);
                        if (oclen == (size_t)-1 || oclen == (size_t)-2)
-                               errc(1, EILSEQ, NULL);
+                               errx(1, "Illegal byte sequence");
                        nclen = mbrlen(np, MB_LEN_MAX, &mbs2);
                        if (nclen == (size_t)-1 || nclen == (size_t)-2)
-                               errc(1, EILSEQ, NULL);
+                               errx(1, "Illegal byte sequence");
                        if (oclen == 1 && nclen == 1)
                                y->bytetab[(u_char)*op] = (u_char)*np;
                        else {



Home | Main Index | Thread Index | Old Index