pkgsrc-Changes archive

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

CVS commit: pkgsrc/news/nn



Module Name:    pkgsrc
Committed By:   spz
Date:           Tue May 19 18:38:11 UTC 2026

Modified Files:
        pkgsrc/news/nn: Makefile distinfo
        pkgsrc/news/nn/patches: patch-ag patch-ak patch-ao patch-ar patch-at
            patch-au patch-ax patch-az patch-ba
Added Files:
        pkgsrc/news/nn/patches: patch-active.c patch-admin.c patch-answer.c
            patch-ctypeconv.h patch-digest.c patch-folder.c patch-fullname.c
            patch-init.c patch-keymap.c patch-macro.c patch-match.c
            patch-menu.c patch-newsrc.c patch-options.c patch-pack__date.c
            patch-pack__subject.c patch-regexp.c patch-reroute.c
            patch-sequence.c patch-variable.c

Log Message:
deal with ctype functions faulting on invalid input on NetBSD 11
(by making invalid input less likely)

While at it add LICENSE


To generate a diff of this commit:
cvs rdiff -u -r1.58 -r1.59 pkgsrc/news/nn/Makefile
cvs rdiff -u -r1.20 -r1.21 pkgsrc/news/nn/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/news/nn/patches/patch-active.c \
    pkgsrc/news/nn/patches/patch-admin.c \
    pkgsrc/news/nn/patches/patch-answer.c \
    pkgsrc/news/nn/patches/patch-ctypeconv.h \
    pkgsrc/news/nn/patches/patch-digest.c \
    pkgsrc/news/nn/patches/patch-folder.c \
    pkgsrc/news/nn/patches/patch-fullname.c \
    pkgsrc/news/nn/patches/patch-init.c pkgsrc/news/nn/patches/patch-keymap.c \
    pkgsrc/news/nn/patches/patch-macro.c pkgsrc/news/nn/patches/patch-match.c \
    pkgsrc/news/nn/patches/patch-menu.c pkgsrc/news/nn/patches/patch-newsrc.c \
    pkgsrc/news/nn/patches/patch-options.c \
    pkgsrc/news/nn/patches/patch-pack__date.c \
    pkgsrc/news/nn/patches/patch-pack__subject.c \
    pkgsrc/news/nn/patches/patch-regexp.c \
    pkgsrc/news/nn/patches/patch-reroute.c \
    pkgsrc/news/nn/patches/patch-sequence.c \
    pkgsrc/news/nn/patches/patch-variable.c
cvs rdiff -u -r1.3 -r1.4 pkgsrc/news/nn/patches/patch-ag \
    pkgsrc/news/nn/patches/patch-ao pkgsrc/news/nn/patches/patch-ar \
    pkgsrc/news/nn/patches/patch-at pkgsrc/news/nn/patches/patch-au
cvs rdiff -u -r1.4 -r1.5 pkgsrc/news/nn/patches/patch-ak
cvs rdiff -u -r1.9 -r1.10 pkgsrc/news/nn/patches/patch-ax
cvs rdiff -u -r1.2 -r1.3 pkgsrc/news/nn/patches/patch-az
cvs rdiff -u -r1.5 -r1.6 pkgsrc/news/nn/patches/patch-ba

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

Modified files:

Index: pkgsrc/news/nn/Makefile
diff -u pkgsrc/news/nn/Makefile:1.58 pkgsrc/news/nn/Makefile:1.59
--- pkgsrc/news/nn/Makefile:1.58        Tue Jan 13 07:31:03 2026
+++ pkgsrc/news/nn/Makefile     Tue May 19 18:38:10 2026
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.58 2026/01/13 07:31:03 wiz Exp $
+# $NetBSD: Makefile,v 1.59 2026/05/19 18:38:10 spz Exp $
 
 DISTNAME=      nn-6.7.3
-PKGREVISION=   6
+PKGREVISION=   7
 CATEGORIES=    news
 MASTER_SITES=  http://www.nndev.org/pub/nn-6.7/
 EXTRACT_SUFX=  .tar.Z
@@ -9,6 +9,7 @@ EXTRACT_SUFX=   .tar.Z
 MAINTAINER=    pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=      https://www.nndev.org/
 COMMENT=       Text-based newsreader
+LICENSE=       nn-license
 
 PKG_SYSCONFSUBDIR=     nntp
 

Index: pkgsrc/news/nn/distinfo
diff -u pkgsrc/news/nn/distinfo:1.20 pkgsrc/news/nn/distinfo:1.21
--- pkgsrc/news/nn/distinfo:1.20        Tue Oct 26 11:09:36 2021
+++ pkgsrc/news/nn/distinfo     Tue May 19 18:38:10 2026
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.20 2021/10/26 11:09:36 nia Exp $
+$NetBSD: distinfo,v 1.21 2026/05/19 18:38:10 spz Exp $
 
 BLAKE2s (nn-6.7.3.tar.Z) = 5cfc01e150eed6926c5527207e049f7b7ee790217a377dd828e6da4df3387291
 SHA512 (nn-6.7.3.tar.Z) = 4796de52b8accc4f213276861ec03309a2d332f6640f034b0c449ae681adfd70957cf054e2023e971ed86370ddb8f94e9dd8bfdc8888d765f9843be73b1abb60
@@ -6,26 +6,46 @@ Size (nn-6.7.3.tar.Z) = 688446 bytes
 SHA1 (patch-aa) = f3d5d668f542adcdf26823d5c6d7186e4ac06a70
 SHA1 (patch-ab) = 911d5e19c352085a2a9fa715d2dee4a8ebfe7fa9
 SHA1 (patch-ac) = 6ad9ebb351c6c5e60add44ad71120dc09c16ea45
+SHA1 (patch-active.c) = 8e626177e3d440a4c78822d5d8c4ea1450aedac2
+SHA1 (patch-admin.c) = 40a3f31acfdae2bb9d4dacd79a3558a8c0753970
 SHA1 (patch-ae) = 5d9968a29408cfc753b27cba6fc48076bb849317
 SHA1 (patch-af) = 446d8359228f5afd73d9d770b78cbe573e39fac0
-SHA1 (patch-ag) = 4857f66029c77e46e1506cb33a64ec098bdaeb39
+SHA1 (patch-ag) = e0adaa1d8dd26863b5c04ce44791c6fafe4afd6c
 SHA1 (patch-ah) = d4d23e9072b473f3069218b43b8a54c9c4562c91
 SHA1 (patch-ai) = 03d4d5dbd0cc632acf23056dafc878fa7dced015
 SHA1 (patch-aj) = e7a6a94b242ae1ee652117799642b7711e049993
-SHA1 (patch-ak) = 005bf2286b0b988434d81b5c7cc5ab97e4909841
+SHA1 (patch-ak) = e11013c11966c260b2b9c24f63175874ab12ab2d
 SHA1 (patch-al) = 6bff7c2dd0739acf57db7d7694ed8cb68f1f3b3d
-SHA1 (patch-ao) = 3aaba60ab311af8e21ca8691b940eb190cc95337
+SHA1 (patch-answer.c) = 0d682c432f39499c4c3900dd5b361ca05c58d8eb
+SHA1 (patch-ao) = 1e69de04a88db61b41013c820437c4269081e818
 SHA1 (patch-aq) = fb7ce095d66e4df324b6a6116256a5a7a7239f2e
-SHA1 (patch-ar) = 8c40f584182b734348d50489ffab1a03e791ef9c
-SHA1 (patch-at) = 11541ea36bbdacfbd84af6b3be4c4dbc983ef16d
-SHA1 (patch-au) = e247b3a62b24409a04a1f1604606d6e38474af67
+SHA1 (patch-ar) = c5370debfcd4e19981ece73a33f4b5583974588c
+SHA1 (patch-at) = 918b0385fde9ce95a2ac2f62df17a22f24e5be2b
+SHA1 (patch-au) = 98744cb20859117c206e9260ff579d0e2ace7be6
 SHA1 (patch-aux.c) = 0d9104a39b9b8ae8335c52f9fe17172ef66e7052
 SHA1 (patch-av) = 4013cfa3d4dc9bba84593ce68310e7d9b75b0aa0
-SHA1 (patch-ax) = 5509d974e84f55d6fc28dd3b58ad3d94e56edec5
+SHA1 (patch-ax) = ea6885db9ca6272fa9ce3718d2e51fd841027a7d
 SHA1 (patch-ay) = d707b74d2c6d2f39b8515531cf90d435784deaf1
-SHA1 (patch-az) = 206fcead17eb09c8c019eeb78335841ff9ce9c94
-SHA1 (patch-ba) = a9c5dd3af5901d08bef80de67402b4cf82be6380
+SHA1 (patch-az) = 47a048323642fb51f5ae084804945cdfdeb4fbf9
+SHA1 (patch-ba) = eb4cb4b5cfcb6f4409c84a26a3776713462f97b6
 SHA1 (patch-bb) = af094b78b3f2fc0cdb77dea834d74a35fbb170a4
 SHA1 (patch-bc) = 981b2abf745d41f82e1dd4b77981457a5f19591c
 SHA1 (patch-be) = 207a85225b30fffbbf7cf69c8167a5e4fa0a078d
 SHA1 (patch-bf) = dd419adf7bb727e5ebd8a2cd7f3b69467bb49b44
+SHA1 (patch-ctypeconv.h) = 393eadbf46240b74a5ec4ec017cf1e3a60a23134
+SHA1 (patch-digest.c) = 42a92d7c5d96ba8b3e5b2043353281996b20838f
+SHA1 (patch-folder.c) = 615f0865deb1801f068e3281bbaffbd29e1014cf
+SHA1 (patch-fullname.c) = 1ade359d0a429c327988020e3441ec1d5b390ba0
+SHA1 (patch-init.c) = b3106f7ac288319bd9a337189e700347f214fd39
+SHA1 (patch-keymap.c) = f8a20a4d387258abd5cd7da4a17b64220783f6bf
+SHA1 (patch-macro.c) = 102277f390d6eb54e7e25beeae9db67b56b6cfca
+SHA1 (patch-match.c) = c6aa551ef1a49095472409c8552b74c567ab1c70
+SHA1 (patch-menu.c) = 689aa1f2fd8ded669db29b7e0758837955efeaa9
+SHA1 (patch-newsrc.c) = 0594da566da35e7f577f40bacac4e79ef4ee8b06
+SHA1 (patch-options.c) = e8e12b383a6befac3e53ac7a3635a1d716e91beb
+SHA1 (patch-pack__date.c) = d7713ce29e2a8746e26d3fac32f49447fd91d4d1
+SHA1 (patch-pack__subject.c) = 98545db8648add4285db2f36bae975fb6501270e
+SHA1 (patch-regexp.c) = a226440c27633e3ecbc81b02e04cfc8f005a6ec0
+SHA1 (patch-reroute.c) = 539d9a18c362d7ce4bdfe3daf87478ecc4a6a418
+SHA1 (patch-sequence.c) = c562d9109e82efa16239cffd32d04ac3e7a13ccc
+SHA1 (patch-variable.c) = 2522e56eeb2af8f8cc7edf3295bd9561022f73ae

Index: pkgsrc/news/nn/patches/patch-ag
diff -u pkgsrc/news/nn/patches/patch-ag:1.3 pkgsrc/news/nn/patches/patch-ag:1.4
--- pkgsrc/news/nn/patches/patch-ag:1.3 Sat Oct 14 19:33:45 2006
+++ pkgsrc/news/nn/patches/patch-ag     Tue May 19 18:38:10 2026
@@ -1,12 +1,37 @@
-$NetBSD: patch-ag,v 1.3 2006/10/14 19:33:45 schwarz Exp $
+$NetBSD: patch-ag,v 1.4 2026/05/19 18:38:10 spz Exp $
 
---- chset.c.orig       2005-03-30 21:34:27.000000000 +0200
-+++ chset.c    2006-10-14 19:50:17.000000000 +0200
-@@ -22,6 +22,7 @@
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+add more 8bit character encodings
+
+--- chset.c.orig       2005-03-30 19:34:27.000000000 +0000
++++ chset.c
+@@ -6,7 +6,7 @@
+  */
+ 
+ #include <string.h>
+-#include <ctype.h>
++#include "ctypeconv.h"
+ #include "config.h"
+ #include "chset.h"
+ 
+@@ -22,6 +22,8 @@ static struct chset chsets[] = {
      "iso-8859-8", 8,
      "iso-8859-9", 8,
      "iso-8859-15", 8,
 +    "koi8-r", 8,
++    "utf-8", 8,
      "unknown", 0,
      NULL, 0,
  };
+@@ -35,8 +37,8 @@ getchset(char *name)
+     char           *sp;
+ 
+     for (sp = name; *sp; sp++)
+-      if (isupper(*sp))
+-          *sp = tolower(*sp);
++      if (ISUPPER(*sp))
++          *sp = TOLOWER(*sp);
+ 
+     for (csp = chsets; csp->cs_name != NULL; csp++) {
+       if (strcmp(csp->cs_name, name) == 0)
Index: pkgsrc/news/nn/patches/patch-ao
diff -u pkgsrc/news/nn/patches/patch-ao:1.3 pkgsrc/news/nn/patches/patch-ao:1.4
--- pkgsrc/news/nn/patches/patch-ao:1.3 Sat Oct 14 19:33:45 2006
+++ pkgsrc/news/nn/patches/patch-ao     Tue May 19 18:38:11 2026
@@ -1,8 +1,30 @@
-$NetBSD: patch-ao,v 1.3 2006/10/14 19:33:45 schwarz Exp $
+$NetBSD: patch-ao,v 1.4 2026/05/19 18:38:11 spz Exp $
 
---- expire.c.orig      2005-03-31 08:52:17.000000000 +0200
-+++ expire.c   2006-10-14 20:18:42.000000000 +0200
-@@ -104,7 +104,7 @@
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+use long instead of off_t
+
+--- expire.c.orig      2005-03-31 06:52:17.000000000 +0000
++++ expire.c
+@@ -9,7 +9,7 @@
+  */
+ 
+ #include <stdlib.h>
+-#include <ctype.h>
++#include "ctypeconv.h"
+ #include "config.h"
+ #include "global.h"
+ #include "db.h"
+@@ -77,7 +77,7 @@ get_article_list(char *dir)
+ #endif
+ 
+       for (pp = cp; (c = *pp++);)
+-          if (!isascii(c) || !isdigit(c))
++          if (!ISASCII(c) || !ISDIGIT(c))
+               break;
+       if (c)
+           continue;
+@@ -104,7 +104,7 @@ static long
  expire_in_database(register group_header * gh)
  {
      FILE           *old, *data = NULL, *ix = NULL;
@@ -11,7 +33,7 @@ $NetBSD: patch-ao,v 1.3 2006/10/14 19:33
      register article_number *list;
      article_number  old_last_article;
      long            count;
-@@ -368,7 +368,7 @@
+@@ -368,7 +368,7 @@ expire_sliding(register group_header * g
       * entry in the old index file at offset 'index_offset'.
       */
  
Index: pkgsrc/news/nn/patches/patch-ar
diff -u pkgsrc/news/nn/patches/patch-ar:1.3 pkgsrc/news/nn/patches/patch-ar:1.4
--- pkgsrc/news/nn/patches/patch-ar:1.3 Sat Oct 14 19:33:45 2006
+++ pkgsrc/news/nn/patches/patch-ar     Tue May 19 18:38:11 2026
@@ -1,8 +1,21 @@
-$NetBSD: patch-ar,v 1.3 2006/10/14 19:33:45 schwarz Exp $
+$NetBSD: patch-ar,v 1.4 2026/05/19 18:38:11 spz Exp $
 
---- kill.c.orig        2005-04-20 01:53:17.000000000 +0200
-+++ kill.c     2006-10-14 20:23:09.000000000 +0200
-@@ -450,7 +450,7 @@
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+use long instead of off_t
+
+--- kill.c.orig        2005-04-19 23:53:17.000000000 +0000
++++ kill.c
+@@ -8,7 +8,7 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <string.h>
+-#include <ctype.h>
++#include "ctypeconv.h"
+ #include "config.h"
+ #include "global.h"
+ #include "db.h"
+@@ -450,7 +450,7 @@ typedef struct {
  typedef struct {
      long            ckh_magic;
      time_t          ckh_db_check;
@@ -11,3 +24,33 @@ $NetBSD: patch-ar,v 1.3 2006/10/14 19:33
      long            ckh_pattern_size;
      long            ckh_entries;
      long            ckh_regexp_size;
+@@ -581,7 +581,7 @@ kill_menu(article_header * ah)
+     } else if (*days_str == 'p' || *days_str == 'P') {
+       days_str = "perm";
+       days = -1;
+-    } else if (isdigit(*days_str)) {
++    } else if (ISDIGIT(*days_str)) {
+       days = atoi(days_str);
+       sprintf(days_str, "%d days", days);
+     } else {
+@@ -650,9 +650,9 @@ next_entry:
+           break;
+ 
+       cp = line;
+-      while (*cp && isascii(*cp) && isspace(*cp))
++      while (*cp && ISASCII(*cp) && ISSPACE(*cp))
+           cp++;
+-      if (*cp == NUL || *cp == '#' || !isascii(*cp))
++      if (*cp == NUL || *cp == '#' || !ISASCII(*cp))
+           continue;
+ 
+       if ((np = strchr(cp, ':')) == NULL)
+@@ -660,7 +660,7 @@ next_entry:
+ 
+       /* optional "age:" */
+ 
+-      if (np != cp && isdigit(*cp)) {
++      if (np != cp && ISDIGIT(*cp)) {
+           *np++ = NUL;
+           age = (time_t) atol(cp);
+           if (age < now)
Index: pkgsrc/news/nn/patches/patch-at
diff -u pkgsrc/news/nn/patches/patch-at:1.3 pkgsrc/news/nn/patches/patch-at:1.4
--- pkgsrc/news/nn/patches/patch-at:1.3 Sat Oct 14 19:33:45 2006
+++ pkgsrc/news/nn/patches/patch-at     Tue May 19 18:38:11 2026
@@ -1,8 +1,21 @@
-$NetBSD: patch-at,v 1.3 2006/10/14 19:33:45 schwarz Exp $
+$NetBSD: patch-at,v 1.4 2026/05/19 18:38:11 spz Exp $
 
---- more.c.orig        2005-04-20 01:44:29.000000000 +0200
-+++ more.c     2006-10-14 20:28:07.000000000 +0200
-@@ -380,7 +380,7 @@
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+use long instead of off_t
+
+--- more.c.orig        2005-04-19 23:44:29.000000000 +0000
++++ more.c
+@@ -7,7 +7,7 @@
+ 
+ #include <stdlib.h>
+ #include <string.h>
+-#include <ctype.h>
++#include "ctypeconv.h"
+ #include "config.h"
+ #include "global.h"
+ #include "articles.h"
+@@ -380,7 +380,7 @@ more(article_header * ah, int mode, int 
      struct digest_header digest_save;
      int             linenum, maxline, topline, print_lines, lno1;
      int             scroll_lines, scroll_from;
@@ -11,3 +24,14 @@ $NetBSD: patch-at,v 1.3 2006/10/14 19:33
      int             underline_line, fake_underline;
      int             match_lines, match_redraw, match_topline = 0, match_botline;
      int             goto_line, prev_goto, stop_line, extra_lines;
+@@ -620,8 +620,8 @@ print_header:
+                   CALL(hdrattr) (1);
+ 
+               while (*lp && c < Columns) {
+-                  if (isspace(*lp)) {
+-                      while (lp[1] && isspace(lp[1]))
++                  if (ISSPACE(*lp)) {
++                      while (lp[1] && ISSPACE(lp[1]))
+                           lp++;
+                       if (wrap_headers > 0 &&
+                           (c + wrap_headers) >= Columns &&
Index: pkgsrc/news/nn/patches/patch-au
diff -u pkgsrc/news/nn/patches/patch-au:1.3 pkgsrc/news/nn/patches/patch-au:1.4
--- pkgsrc/news/nn/patches/patch-au:1.3 Sat Oct 14 19:33:45 2006
+++ pkgsrc/news/nn/patches/patch-au     Tue May 19 18:38:11 2026
@@ -1,8 +1,67 @@
-$NetBSD: patch-au,v 1.3 2006/10/14 19:33:45 schwarz Exp $
+$NetBSD: patch-au,v 1.4 2026/05/19 18:38:11 spz Exp $
 
---- news.c.orig        2005-04-20 01:56:27.000000000 +0200
-+++ news.c     2006-10-14 20:30:52.000000000 +0200
-@@ -255,7 +255,7 @@
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+use long instead of off_t
+
+--- news.c.orig        2005-04-19 23:56:27.000000000 +0000
++++ news.c
+@@ -6,7 +6,7 @@
+  */
+ 
+ #include <stdlib.h>
+-#include <ctype.h>
++#include "ctypeconv.h"
+ #include "config.h"
+ #include "global.h"
+ #include "digest.h"
+@@ -65,11 +65,11 @@ parse_header(FILE * f, char **(*hdr_fiel
+       if (date_only && *bp != 'D')
+           fptr = NULL;
+       else if ((fptr = (*hdr_field) (bp, all))) {
+-          while (*bp && *bp != ':' && isascii(*bp) && !isspace(*bp))
++          while (*bp && *bp != ':' && ISASCII(*bp) && !ISSPACE(*bp))
+               bp++;
+           if (*bp)
+               bp++;
+-          while (*bp && isascii(*bp) && isspace(*bp) && *bp != NL)
++          while (*bp && ISASCII(*bp) && ISSPACE(*bp) && *bp != NL)
+               bp++;
+           *fptr = bp;
+       }
+@@ -77,11 +77,11 @@ parse_header(FILE * f, char **(*hdr_fiel
+ #ifdef NO_HEADER_SEPARATION_HACK
+       else {
+           for (cp = bp; *cp && *cp != ':'; cp++) {
+-              if (!isascii(*cp))
++              if (!ISASCII(*cp))
+                   break;
+               if (*cp == '_' || *cp == '-')
+                   continue;
+-              if (isalnum(*cp))
++              if (ISALNUM(*cp))
+                   continue;
+               break;
+           }
+@@ -103,7 +103,7 @@ parse_header(FILE * f, char **(*hdr_fiel
+       while (*bp) {           /* look for continued lines */
+           cp = bp + 1;
+ 
+-          if (!(*cp && isascii(*cp) && isspace(*cp) && *cp != NL)) {
++          if (!(*cp && ISASCII(*cp) && ISSPACE(*cp) && *cp != NL)) {
+               /* next line is empty or not indented */
+               *bp++ = NUL;
+               break;
+@@ -123,7 +123,7 @@ art_hdr_field(register char *lp, int all
+ {
+ 
+ #define check(name, lgt, field) \
+-    if (isascii(lp[lgt]) && isspace(lp[lgt]) \
++    if (ISASCII(lp[lgt]) && ISSPACE(lp[lgt]) \
+       && strncasecmp(name, lp, lgt) == 0)\
+       return &news.field
+ 
+@@ -255,7 +255,7 @@ open_news_article(article_header * art, 
  
  #ifndef DONT_COUNT_LINES
      int             c;
@@ -11,7 +70,7 @@ $NetBSD: patch-au,v 1.3 2006/10/14 19:33
  #endif                                /* DONT_COUNT_LINES */
  
  #ifdef NNTP
-@@ -301,9 +301,9 @@
+@@ -301,9 +301,9 @@ open_news_article(article_header * art, 
        if (fstat(fileno(f), &statb) < 0 ||
  
  #ifdef NOV

Index: pkgsrc/news/nn/patches/patch-ak
diff -u pkgsrc/news/nn/patches/patch-ak:1.4 pkgsrc/news/nn/patches/patch-ak:1.5
--- pkgsrc/news/nn/patches/patch-ak:1.4 Sat Oct 14 19:33:45 2006
+++ pkgsrc/news/nn/patches/patch-ak     Tue May 19 18:38:10 2026
@@ -1,8 +1,90 @@
-$NetBSD: patch-ak,v 1.4 2006/10/14 19:33:45 schwarz Exp $
+$NetBSD: patch-ak,v 1.5 2026/05/19 18:38:10 spz Exp $
 
---- db.c.orig  2005-04-03 06:29:15.000000000 +0200
-+++ db.c       2006-10-14 20:13:27.000000000 +0200
-@@ -1139,7 +1139,7 @@
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+use long instead of off_t
+
+--- db.c.orig  2005-04-03 04:29:15.000000000 +0000
++++ db.c
+@@ -9,7 +9,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <strings.h>
+-#include <ctype.h>
++#include "ctypeconv.h"
+ #include <errno.h>
+ #include "config.h"
+ #include "global.h"
+@@ -313,11 +313,11 @@ mk_archive_file(register group_header * 
+ {
+     char           *name;
+ 
+-    while (*cp && (*cp == '>' || isspace(*cp)))
++    while (*cp && (*cp == '>' || ISSPACE(*cp)))
+       cp++;
+ 
+     name = cp;
+-    while (*cp && !isspace(*cp))
++    while (*cp && !ISSPACE(*cp))
+       cp++;
+     if (*cp)
+       *cp++ = NUL;
+@@ -353,7 +353,7 @@ db_parse_group(register group_header * g
+     do {
+       if (fgets(line, 256, group_file) == NULL)
+           return 0;
+-      for (cp = line; *cp && isspace(*cp); cp++);
++      for (cp = line; *cp && ISSPACE(*cp); cp++);
+     } while (*cp == NUL || *cp == '#');
+ 
+     gh->archive_file = NULL;
+@@ -366,7 +366,7 @@ db_parse_group(register group_header * g
+           return 1;
+       }
+       cp = name + gh->group_name_length;
+-      if (*cp == NUL || !isspace(*cp))
++      if (*cp == NUL || !ISSPACE(*cp))
+           sys_error("MASTER/GROUPS conflict: %d/%s", gh->group_num, line);
+     } else {
+       /* parse GROUPS line */
+@@ -378,12 +378,12 @@ db_parse_group(register group_header * g
+           goto ignore_group;
+       }
+       if (gh->group_name_length == 0) {
+-          while (*cp && !isspace(*cp))
++          while (*cp && !ISSPACE(*cp))
+               cp++;
+           gh->group_name_length = cp - name;
+       } else {
+           cp = name + gh->group_name_length;
+-          if (*cp == NUL || !isspace(*cp)) {
++          if (*cp == NUL || !ISSPACE(*cp)) {
+               sys_error("MASTER/GROUPS conflict: %d/%s", gh->group_num, line);
+           }
+       }
+@@ -405,17 +405,17 @@ db_parse_group(register group_header * g
+       }
+       return 1;
+     }
+-    while (*cp && isspace(*cp))
++    while (*cp && ISSPACE(*cp))
+       cp++;
+ 
+-    if (*cp && isdigit(*cp)) {
++    if (*cp && ISDIGIT(*cp)) {
+       gh->creation_time = atol(cp);
+-      while (*cp && isdigit(*cp))
++      while (*cp && ISDIGIT(*cp))
+           cp++;
+     } else
+       gh->creation_time = 0;
+ 
+-    while (*cp && isspace(*cp))
++    while (*cp && ISSPACE(*cp))
+       cp++;
+ 
+     ignore = 0;
+@@ -1139,7 +1139,7 @@ db_read_group(register group_header * gh
  
      if (!db_sequential)
        fseek(master_file,
@@ -11,7 +93,7 @@ $NetBSD: patch-ak,v 1.4 2006/10/14 19:33
                       GROUP_FIELDS * sizeof(net_long) * gh->group_num), 0);
  
      if (fread((char *) buf, sizeof(net_long), GROUP_FIELDS, master_file) != GROUP_FIELDS)
-@@ -1181,7 +1181,7 @@
+@@ -1181,7 +1181,7 @@ db_write_group(register group_header * g
  
      if (!db_sequential)
        fseek(master_file,
@@ -20,7 +102,23 @@ $NetBSD: patch-ak,v 1.4 2006/10/14 19:33
                       GROUP_FIELDS * sizeof(net_long) * gh->group_num), 0);
  
      buf[0] = gh->first_db_article;
-@@ -1386,10 +1386,10 @@
+@@ -1335,13 +1335,13 @@ cache_purpose(void)
+     }
+     for (i = 0, plp = purp_list, stp = sthead; stp; stp = stp->n.next) {
+       p = stp->str;
+-      while (!isspace(*p)) {  /* skip newsgroup name */
++      while (!ISSPACE(*p)) {  /* skip newsgroup name */
+           if (*++p == NUL)
+               goto next;
+       }
+       *p++ = NUL;
+ 
+-      while (isspace(*p)) {   /* skip to group description */
++      while (ISSPACE(*p)) {   /* skip to group description */
+           if (*++p == NUL)
+               goto next;
+       }
+@@ -1386,10 +1386,10 @@ purp_lookup(char *group)
  
  
  #ifndef NOV
@@ -33,7 +131,16 @@ $NetBSD: patch-ak,v 1.4 2006/10/14 19:33
  
  #ifdef NETWORK_DATABASE
      net_long        buf[ARTICLE_FIELDS];
-@@ -1594,7 +1594,7 @@
+@@ -1511,7 +1511,7 @@ db_init_active(register group_header * g
+ 
+     p = actlist[gh->group_num];
+     if (p != NULL) {
+-      while (isspace(*p))
++      while (ISSPACE(*p))
+           ++p;
+       gh->last_a_article = atol(p);
+       p = strchr(p, ' ');
+@@ -1594,7 +1594,7 @@ db_read_group(register group_header * gh
   * fill in db_hdr and db_data from the overview data for the next
   * article in this group.  does weirdo nn encodings of header fields.
   */
@@ -42,7 +149,25 @@ $NetBSD: patch-ak,v 1.4 2006/10/14 19:33
  db_read_art(FILE * f)
  {
      register data_header *dhp = &db_hdr;
-@@ -1820,9 +1820,9 @@
+@@ -1617,7 +1617,7 @@ db_read_art(FILE * f)
+     dhp->dh_lpos = 1L << 30;  /* last article byte */
+     dhp->dh_fpos = 0;         /* 1st article text byte */
+     dhp->dh_lines = -1;               /* -1 == "unknown" */
+-    if (isascii(artp->a_lines[0]) && isdigit(artp->a_lines[0]))
++    if (ISASCII(artp->a_lines[0]) && ISDIGIT(artp->a_lines[0]))
+       dhp->dh_lines = atoi(artp->a_lines);
+     dhp->dh_replies = 0;      /* # of References: */
+     if (artp->a_refs != NULL) {
+@@ -1728,7 +1728,7 @@ db_fixup_cross_postings(data_header * dh
+           ddp->dh_cross[numgrps++] = gh->group_num;
+       }
+       curg = tmp + 1;
+-      while (isdigit(*curg))
++      while (ISDIGIT(*curg))
+           ++curg;             /* Skip over the article number */
+     }
+     if (numgrps > 1) {
+@@ -1820,9 +1820,9 @@ get_index_offset(group_header * gh, arti
  {
  
  #ifdef NETWORK_DATABASE
@@ -54,7 +179,7 @@ $NetBSD: patch-ak,v 1.4 2006/10/14 19:33
  #endif                                /* NETWORK_DATABASE */
  }
  
-@@ -1833,11 +1833,11 @@
+@@ -1833,11 +1833,11 @@ get_data_offset(group_header * gh, artic
      long            data_offset;
  
      if (gh->first_db_article == art_num)
@@ -68,7 +193,7 @@ $NetBSD: patch-ak,v 1.4 2006/10/14 19:33
  
      fseek(index, get_index_offset(gh, art_num), 0);
      if (!db_read_offset(index, &data_offset))
-@@ -1866,7 +1866,7 @@
+@@ -1866,7 +1866,7 @@ db_read_offset(FILE * f, long *offset)
      *offset = temp;
  #else                         /* NETWORK_DATABASE */
  
@@ -77,7 +202,7 @@ $NetBSD: patch-ak,v 1.4 2006/10/14 19:33
                        return 0;
  #endif                                /* NETWORK_DATABASE */
  
-@@ -1891,7 +1891,7 @@
+@@ -1891,7 +1891,7 @@ db_write_offset(FILE * f, long *offset)
  
  #else                         /* NETWORK_DATABASE */
  

Index: pkgsrc/news/nn/patches/patch-ax
diff -u pkgsrc/news/nn/patches/patch-ax:1.9 pkgsrc/news/nn/patches/patch-ax:1.10
--- pkgsrc/news/nn/patches/patch-ax:1.9 Fri Dec  1 13:54:27 2006
+++ pkgsrc/news/nn/patches/patch-ax     Tue May 19 18:38:11 2026
@@ -1,7 +1,20 @@
-$NetBSD: patch-ax,v 1.9 2006/12/01 13:54:27 joerg Exp $
+$NetBSD: patch-ax,v 1.10 2026/05/19 18:38:11 spz Exp $
+
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+always use NNTP
 
 --- nntp.c.orig        2005-04-19 23:06:51.000000000 +0000
 +++ nntp.c
+@@ -18,7 +18,7 @@
+ #include <unistd.h>
+ #include <stdarg.h>
+ #include <sys/param.h>
+-#include <ctype.h>
++#include "ctypeconv.h"
+ #include "config.h"
+ #include "global.h"
+ #include "fullname.h"
 @@ -57,10 +57,9 @@
  #endif
  
@@ -14,6 +27,24 @@ $NetBSD: patch-ax,v 1.9 2006/12/01 13:54
  
  #ifdef EXCELAN
  
+@@ -275,7 +274,7 @@ get_server(char *string, int size)
+     if (nntp_debug)
+       debug_msg("<<<", string);
+ 
+-    return isdigit(*string) ? atoi(string) : 0;
++    return ISDIGIT(*string) ? atoi(string) : 0;
+ }
+ 
+ /*
+@@ -861,7 +860,7 @@ set_domain(void)
+           line[MAXHOSTNAMELEN] = '\0';
+           while (fgets(line, MAXHOSTNAMELEN, resolv)) {
+               if (strncmp(line, "domain", 6) == 0) {
+-                  for (p = &line[6]; *p && isspace(*p); p++);
++                  for (p = &line[6]; *p && ISSPACE(*p); p++);
+                   (void) strncpy(domain, p, MAXHOSTNAMELEN);
+                   p = domain + strlen(domain) - 1;
+                   while ((p >= domain) && (*p == ' ' || *p == '\t' || *p == '\r' || *p == '\n'))
 @@ -915,7 +914,11 @@ nntp_check(void)
        server_real_name = hp->h_name;
      else
@@ -26,3 +57,21 @@ $NetBSD: patch-ax,v 1.9 2006/12/01 13:54
  
      if (use_nntp) {
        freeobj(news_active);
+@@ -1528,7 +1531,7 @@ gen_frompath(void)
+ static char
+ lower(register char c)
+ {
+-    if (isascii(c) && isupper(c))
++    if (ISASCII(c) && ISUPPER(c))
+       c = c - 'A' + 'a';
+     return (c);
+ }
+@@ -1591,7 +1594,7 @@ valid_header(register char *h)
+      */
+     colon = index(h, ':');
+     space = index(h, ' ');
+-    if (isalpha(h[0]) && colon && space == colon + 1)
++    if (ISALPHA(h[0]) && colon && space == colon + 1)
+       return (1);
+ 
+     /*

Index: pkgsrc/news/nn/patches/patch-az
diff -u pkgsrc/news/nn/patches/patch-az:1.2 pkgsrc/news/nn/patches/patch-az:1.3
--- pkgsrc/news/nn/patches/patch-az:1.2 Sat Oct 14 19:33:45 2006
+++ pkgsrc/news/nn/patches/patch-az     Tue May 19 18:38:11 2026
@@ -1,8 +1,21 @@
-$NetBSD: patch-az,v 1.2 2006/10/14 19:33:45 schwarz Exp $
+$NetBSD: patch-az,v 1.3 2026/05/19 18:38:11 spz Exp $
 
---- sort.c.orig        2005-03-30 21:24:35.000000000 +0200
-+++ sort.c     2006-10-14 20:38:02.000000000 +0200
-@@ -51,6 +51,29 @@
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+deal with 8bit chars
+
+--- sort.c.orig        2005-03-30 19:24:35.000000000 +0000
++++ sort.c
+@@ -7,7 +7,7 @@
+ 
+ #include <stdlib.h>
+ #include <string.h>
+-#include <ctype.h>
++#include "ctypeconv.h"
+ #include "config.h"
+ #include "global.h"
+ #include "articles.h"
+@@ -51,6 +51,29 @@ extern int      bypass_consolidation;
   *    before MATCH_?? (t, a, b) is used.
   */
  
@@ -32,7 +45,7 @@ $NetBSD: patch-az,v 1.2 2006/10/14 19:33
  #define       MATCH_DROP(table, c) ( c & 0200 || table[c] == 0 )
  #define MATCH_EQ(table, a, b) ( a == b || table[a] == table[b] )
  #define MATCH_LS_EQ(table, a, b) ( a <= b || table[a] <= table[b] )
-@@ -85,6 +108,7 @@
+@@ -85,6 +108,7 @@ static char     match_subject[128] = {
      26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 00, 00
  };
  
@@ -40,3 +53,36 @@ $NetBSD: patch-az,v 1.2 2006/10/14 19:33
  
  static int
  order_subj_date(article_header ** ah1, article_header ** ah2)
+@@ -113,9 +137,9 @@ order_subj_date(article_header ** ah1, a
+     for (len = subject_match_limit; --len >= 0; a++, b++) {
+ #endif
+ 
+-      while ((ca = *a) && MATCH_DROP(match_subject, ((int8) ca)))
++      while ((ca = *a) && MATCH_DROP(match_subject, ((int8)((unsigned char) ca))))
+           a++;
+-      while ((cb = *b) && MATCH_DROP(match_subject, ((int8) cb)))
++      while ((cb = *b) && MATCH_DROP(match_subject, ((int8)((unsigned char) cb))))
+           b++;
+ 
+       if (ca == NUL) {
+@@ -212,9 +236,9 @@ article_equal(article_header ** ah1, art
+       }
+     }
+     for (len = 0;; len++, a++, b++) {
+-      while (*a && MATCH_DROP(match_subject, (int8) * a))
++      while (*a && MATCH_DROP(match_subject, (int8)((unsigned char) *a)))
+           a++;
+-      while (*b && MATCH_DROP(match_subject, (int8) * b))
++      while (*b && MATCH_DROP(match_subject, (int8)((unsigned char) *b)))
+           b++;
+ 
+       if (*a == NUL) {
+@@ -233,7 +257,7 @@ article_equal(article_header ** ah1, art
+           if (len >= subject_match_limit)
+               return A_ALMOST_SAME;
+           if (len >= match_parts_begin && match_parts_equal &&
+-              isdigit(*a) && isdigit(*b))
++              ISDIGIT(*a) && ISDIGIT(*b))
+               return A_ALMOST_SAME;
+           return 0;
+       }

Index: pkgsrc/news/nn/patches/patch-ba
diff -u pkgsrc/news/nn/patches/patch-ba:1.5 pkgsrc/news/nn/patches/patch-ba:1.6
--- pkgsrc/news/nn/patches/patch-ba:1.5 Sun Oct 15 16:43:37 2006
+++ pkgsrc/news/nn/patches/patch-ba     Tue May 19 18:38:11 2026
@@ -1,7 +1,20 @@
-$NetBSD: patch-ba,v 1.5 2006/10/15 16:43:37 schwarz Exp $
+$NetBSD: patch-ba,v 1.6 2026/05/19 18:38:11 spz Exp $
 
---- term.c.orig        2005-06-29 23:40:27.000000000 +0200
-+++ term.c     2006-10-15 15:22:58.000000000 +0200
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+add more OS variance handling
+
+--- term.c.orig        2005-06-29 21:40:27.000000000 +0000
++++ term.c
+@@ -14,7 +14,7 @@
+ #include <sys/stat.h>
+ #include <fcntl.h>
+ #include <string.h>
+-#include <ctype.h>
++#include "ctypeconv.h"
+ #include "config.h"
+ #include "global.h"
+ #include "execute.h"
 @@ -25,7 +25,7 @@
  #include "regexp.h"
  #include "nn_term.h"
@@ -11,7 +24,7 @@ $NetBSD: patch-ba,v 1.5 2006/10/15 16:43
  #include <stropts.h>
  #else
  #include <sys/ioctl.h>
-@@ -60,7 +60,7 @@
+@@ -60,7 +60,7 @@ extern int      s_resized;
  #else
  #define USE_TERMCAP
  
@@ -20,7 +33,7 @@ $NetBSD: patch-ba,v 1.5 2006/10/15 16:43
  #include <termcap.h>
  #endif                                /* SUNOS4 */
  
-@@ -74,9 +74,9 @@
+@@ -74,9 +74,9 @@ extern int      s_resized;
  
  #else
  
@@ -32,7 +45,7 @@ $NetBSD: patch-ba,v 1.5 2006/10/15 16:43
  
  #endif
  
-@@ -456,6 +456,12 @@
+@@ -456,6 +456,12 @@ siginterrupt(signo, on)
  #endif                                /* FAKE_INTERRUPT */
  
  static unsigned sp_table[] = {

Added files:

Index: pkgsrc/news/nn/patches/patch-active.c
diff -u /dev/null pkgsrc/news/nn/patches/patch-active.c:1.1
--- /dev/null   Tue May 19 18:38:11 2026
+++ pkgsrc/news/nn/patches/patch-active.c       Tue May 19 18:38:10 2026
@@ -0,0 +1,66 @@
+$NetBSD: patch-active.c,v 1.1 2026/05/19 18:38:10 spz Exp $
+
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+--- active.c.orig      2026-05-16 21:13:32.444810676 +0000
++++ active.c
+@@ -7,7 +7,7 @@
+ 
+ #include <stdlib.h>
+ #include <string.h>
+-#include <ctype.h>
++#include "ctypeconv.h"
+ #include "config.h"
+ #include "global.h"
+ #include "active.h"
+@@ -36,7 +36,7 @@ read_active_file(FILE * act, FILE * copy
+       must_update = 0;
+ 
+       cp = line;
+-      while (*cp && isspace(*cp))
++      while (*cp && ISSPACE(*cp))
+           cp++;               /* eat blank lines */
+       if (*cp == NUL || *cp == '#')
+           continue;
+@@ -55,13 +55,13 @@ read_active_file(FILE * act, FILE * copy
+               continue;
+           must_update = 1;
+       }
+-      while (*cp && isspace(*cp))
++      while (*cp && ISSPACE(*cp))
+           cp++;
+       gh->last_a_article = atol(cp);
+ 
+-      while (*cp && isdigit(*cp))
++      while (*cp && ISDIGIT(*cp))
+           cp++;
+-      while (*cp && isspace(*cp))
++      while (*cp && ISSPACE(*cp))
+           cp++;
+ 
+       if (*cp == NUL) {
+@@ -71,9 +71,9 @@ read_active_file(FILE * act, FILE * copy
+       gh->first_a_article = atol(cp);
+       if (gh->first_a_article == 0)
+           gh->first_a_article = 1;
+-      while (*cp && isdigit(*cp))
++      while (*cp && ISDIGIT(*cp))
+           cp++;
+-      while (*cp && isspace(*cp))
++      while (*cp && ISSPACE(*cp))
+           cp++;
+ 
+       gh->master_flag |= M_VALID;
+@@ -111,10 +111,10 @@ read_active_file(FILE * act, FILE * copy
+               break;
+ 
+           case '=':
+-              while (*++cp && isspace(*cp))
++              while (*++cp && ISSPACE(*cp))
+                   cp++;
+               name = cp;
+-              while (*cp && !isspace(*cp))
++              while (*cp && !ISSPACE(*cp))
+                   cp++;
+               *cp = NUL;
+               if (old_flag & M_ALIASED) {
Index: pkgsrc/news/nn/patches/patch-admin.c
diff -u /dev/null pkgsrc/news/nn/patches/patch-admin.c:1.1
--- /dev/null   Tue May 19 18:38:11 2026
+++ pkgsrc/news/nn/patches/patch-admin.c        Tue May 19 18:38:10 2026
@@ -0,0 +1,48 @@
+$NetBSD: patch-admin.c,v 1.1 2026/05/19 18:38:10 spz Exp $
+
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+--- admin.c.orig       2026-05-16 21:15:52.974631909 +0000
++++ admin.c
+@@ -10,7 +10,7 @@
+ #include <signal.h>
+ #include <errno.h>
+ #include <string.h>
+-#include <ctype.h>
++#include "ctypeconv.h"
+ #include "config.h"
+ #include "global.h"
+ #include "admin.h"
+@@ -95,8 +95,8 @@ get_cmd(char *prompt1, char *prompt2)
+       } while (c == '!');
+     }
+ 
+-    if (islower(c))
+-      c = toupper(c);
++    if (ISLOWER(c))
++      c = TOUPPER(c);
+ 
+     return c;
+ }
+@@ -711,7 +711,7 @@ master_admin(void)
+               value = get_entry("Option value", 1L, 10000L);
+               if (value < 0)
+                   break;
+-              send_master(SM_SET_OPTION, (group_header *) NULL, tolower(c), value);
++              send_master(SM_SET_OPTION, (group_header *) NULL, TOLOWER(c), value);
+               break;
+ 
+           case 'S':
+@@ -784,10 +784,10 @@ tr_failed:
+       goto loop;
+     }
+ log_tail:
+-    if (c == '$' || c == SP || isdigit(c)) {
++    if (c == '$' || c == SP || ISDIGIT(c)) {
+       int             n;
+ 
+-      n = isdigit(c) ? 10 * (c - '0') : 10;
++      n = ISDIGIT(c) ? 10 * (c - '0') : 10;
+       sprintf(command, "tail -%d %s", n, log_file);
+       system(command);
+       goto loop;
Index: pkgsrc/news/nn/patches/patch-answer.c
diff -u /dev/null pkgsrc/news/nn/patches/patch-answer.c:1.1
--- /dev/null   Tue May 19 18:38:11 2026
+++ pkgsrc/news/nn/patches/patch-answer.c       Tue May 19 18:38:10 2026
@@ -0,0 +1,28 @@
+$NetBSD: patch-answer.c,v 1.1 2026/05/19 18:38:10 spz Exp $
+
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+--- answer.c.orig      2026-05-16 21:17:38.119293934 +0000
++++ answer.c
+@@ -8,7 +8,7 @@
+ #include <stdlib.h>
+ #include <unistd.h>
+ #include <string.h>
+-#include <ctype.h>
++#include "ctypeconv.h"
+ #include "config.h"
+ #include "global.h"
+ #include "answer.h"
+@@ -203,10 +203,10 @@ ref_line(FILE * t)
+       putc(' ', t);
+       pos++;
+       /* Skip leading white space. */
+-      while (*p && isascii(*p) && isspace(*p))
++      while (*p && ISASCII(*p) && ISSPACE(*p))
+           p++;
+       /* Output through next white space. */
+-      while (*p && !(isascii(*p) && isspace(*p))) {
++      while (*p && !(ISASCII(*p) && ISSPACE(*p))) {
+           putc(*p++, t);
+           pos++;
+       }
Index: pkgsrc/news/nn/patches/patch-ctypeconv.h
diff -u /dev/null pkgsrc/news/nn/patches/patch-ctypeconv.h:1.1
--- /dev/null   Tue May 19 18:38:11 2026
+++ pkgsrc/news/nn/patches/patch-ctypeconv.h    Tue May 19 18:38:11 2026
@@ -0,0 +1,34 @@
+$NetBSD: patch-ctypeconv.h,v 1.1 2026/05/19 18:38:11 spz Exp $
+
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+--- ctypeconv.h.orig   2026-05-17 09:34:59.950696268 +0000
++++ ctypeconv.h
+@@ -0,0 +1,27 @@
++/* use macros to make the ctype conversion less clunky */
++
++#include <ctype.h>
++
++#ifdef isascii
++#ifndef HAVE_8BIT_CTYPE
++#define ISASCII(p)    isascii((unsigned char)(p))
++#else
++#define ISASCII(p)    1
++#endif
++#endif
++#define ISALPHA(p)    isalpha((unsigned char)(p))
++#define ISUPPER(p)    isupper((unsigned char)(p))
++#define ISLOWER(p)    islower((unsigned char)(p))
++#define ISDIGIT(p)    isdigit((unsigned char)(p))
++#define ISALNUM(p)    isalnum((unsigned char)(p))
++#define ISSPACE(p)    isspace((unsigned char)(p))
++#define ISPRINT(p)    isprint((unsigned char)(p))
++#define TOLOWER(p)    tolower((unsigned char)(p))
++#define TOUPPER(p)    toupper((unsigned char)(p))
++#ifdef _tolower
++#define _TOLOWER(p)   _tolower((unsigned char)(p))
++#endif
++#ifdef _toupper
++#define _TOUPPER(p)   _toupper((unsigned char)(p))
++#endif
++
Index: pkgsrc/news/nn/patches/patch-digest.c
diff -u /dev/null pkgsrc/news/nn/patches/patch-digest.c:1.1
--- /dev/null   Tue May 19 18:38:11 2026
+++ pkgsrc/news/nn/patches/patch-digest.c       Tue May 19 18:38:11 2026
@@ -0,0 +1,96 @@
+$NetBSD: patch-digest.c,v 1.1 2026/05/19 18:38:11 spz Exp $
+
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+--- digest.c.orig      2026-05-16 21:26:10.444484589 +0000
++++ digest.c
+@@ -12,7 +12,7 @@
+ #include <stdlib.h>
+ #include <string.h>
+ #include <strings.h>
+-#include <ctype.h>
++#include "ctypeconv.h"
+ #include "config.h"
+ #include "global.h"
+ #include "debug.h"
+@@ -127,12 +127,12 @@ is_mail_from_line(char *line, char *name
+     lp = line + 5;
+     /* sender day mon dd hh:mm:ss year */
+     for (n = 0, fp = fields; n < MAX_FIELDS; n++) {
+-      while (*lp && *lp != NL && isascii(*lp) && isspace(*lp))
++      while (*lp && *lp != NL && ISASCII(*lp) && ISSPACE(*lp))
+           lp++;
+       if (*lp == NUL || *lp == NL)
+           break;
+       *fp++ = lp;
+-      while (*lp && isascii(*lp) && !isspace(*lp))
++      while (*lp && ISASCII(*lp) && !ISSPACE(*lp))
+           if (*lp++ == ':' && (n == 4 || n == 5))
+               break;
+       if (n == 0)
+@@ -144,9 +144,9 @@ is_mail_from_line(char *line, char *name
+ 
+     fp = fields;
+ 
+-    if (n > 8 && !isdigit(fp[7][0]))
++    if (n > 8 && !ISDIGIT(fp[7][0]))
+       fp[7] = fp[8];          /* ... TZ year */
+-    if (n > 9 && !isdigit(fp[7][0]))
++    if (n > 9 && !ISDIGIT(fp[7][0]))
+       fp[7] = fp[9];          /* ... TZ DST year */
+ 
+     if (namebuf != NULL) {
+@@ -174,7 +174,7 @@ is_mail_from_line(char *line, char *name
+ 
+     for (i = 0; i < 10; i += 2) {
+       lp = *++fp;
+-      if (!isdigit(*lp))
++      if (!ISDIGIT(*lp))
+           return -20 - i;
+       n = atoi(lp);
+       if (n < legal_numbers[i] || legal_numbers[i + 1] < n)
+@@ -368,7 +368,7 @@ next_possible_header_line:
+       --digest.dg_lines;
+       return (digest.dg_lines <= 0) ? -1 : 1;
+     }
+-    for (cp = line; *cp && isascii(*cp) && isspace(*cp); cp++);
++    for (cp = line; *cp && ISASCII(*cp) && ISSPACE(*cp); cp++);
+ 
+     if (*cp == NUL) {
+       TEST0("BLANK");
+@@ -393,7 +393,7 @@ next_possible_header_line:
+       while (*cp == '-')
+           cp++;
+       if (cp - line - blanks > MIN_DASHES) {
+-          while (*cp && (*cp == '-' || (isascii(*cp) && isspace(*cp))))
++          while (*cp && (*cp == '-' || (ISASCII(*cp) && ISSPACE(*cp))))
+               cp++;
+           if (*cp == NUL) {
+               TEST0("DASHED");
+@@ -410,7 +410,7 @@ next_possible_header_line:
+       while (*cp == '*')
+           cp++;
+       if (cp - line - blanks > MIN_ASTERISKS) {
+-          while (*cp && (*cp == '*' || (isascii(*cp) && isspace(*cp))))
++          while (*cp && (*cp == '*' || (ISASCII(*cp) && ISSPACE(*cp))))
+               cp++;
+           if (*cp == NUL) {
+               TEST0("ASTERISK");
+@@ -437,7 +437,7 @@ next_possible_header_line:
+       char           *colon;
+       if ((colon = strchr(line, ':'))) {
+           for (cp = line; cp < colon; cp++)
+-              if (!isascii(*cp) || isspace(*cp))
++              if (!ISASCII(*cp) || ISSPACE(*cp))
+                   break;
+           if (cp == colon) {
+               TEST0("COLON");
+@@ -514,7 +514,7 @@ dg_hdr_field(register char *lp, int all)
+     static char     namebuf[33];
+ 
+ #define check(name, lgt, field) \
+-    if (isascii(lp[lgt]) && isspace(lp[lgt]) \
++    if (ISASCII(lp[lgt]) && ISSPACE(lp[lgt]) \
+       && strncasecmp(name, lp, lgt) == 0) {\
+       TEST0("MATCH: " #field " "); \
+       return &digest.field; \
Index: pkgsrc/news/nn/patches/patch-folder.c
diff -u /dev/null pkgsrc/news/nn/patches/patch-folder.c:1.1
--- /dev/null   Tue May 19 18:38:11 2026
+++ pkgsrc/news/nn/patches/patch-folder.c       Tue May 19 18:38:11 2026
@@ -0,0 +1,42 @@
+$NetBSD: patch-folder.c,v 1.1 2026/05/19 18:38:11 spz Exp $
+
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+--- folder.c.orig      2026-05-16 21:26:49.061590925 +0000
++++ folder.c
+@@ -9,7 +9,7 @@
+ #include <unistd.h>
+ #include <pwd.h>
+ #include <string.h>
+-#include <ctype.h>
++#include "ctypeconv.h"
+ #include "config.h"
+ #include "global.h"
+ #include "articles.h"
+@@ -68,7 +68,7 @@ tilde_expansion(char **srcp, int compl)
+     register char  *tail, x;
+ 
+     tail = ++name;            /* skip ~ */
+-    while (*tail && isascii(*tail) && !isspace(*tail) && *tail != '/')
++    while (*tail && ISASCII(*tail) && !ISSPACE(*tail) && *tail != '/')
+       tail++;
+ 
+     if (compl && *tail != '/')
+@@ -157,7 +157,7 @@ expand_file_name(char *dest, char *src, 
+           }
+           goto no_parse;
+       }
+-      if ((expand_mode & 4) == 0 && c == '$' && !isalnum(src[2])) {
++      if ((expand_mode & 4) == 0 && c == '$' && !ISALNUM(src[2])) {
+           remap = 0;
+           cp = NULL;
+ 
+@@ -213,7 +213,7 @@ expand_file_name(char *dest, char *src, 
+ 
+ copy:
+       *dp++ = c;
+-      parse = isspace(c);
++      parse = ISSPACE(c);
+       continue;
+ 
+ no_parse:
Index: pkgsrc/news/nn/patches/patch-fullname.c
diff -u /dev/null pkgsrc/news/nn/patches/patch-fullname.c:1.1
--- /dev/null   Tue May 19 18:38:11 2026
+++ pkgsrc/news/nn/patches/patch-fullname.c     Tue May 19 18:38:11 2026
@@ -0,0 +1,32 @@
+$NetBSD: patch-fullname.c,v 1.1 2026/05/19 18:38:11 spz Exp $
+
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+--- fullname.c.orig    2026-05-16 21:26:57.561921842 +0000
++++ fullname.c
+@@ -32,7 +32,7 @@ static char    *SccsId = "@(#)fullname.c
+ #include <stdlib.h>
+ #include <pwd.h>
+ #include <string.h>
+-#include <ctype.h>
++#include "ctypeconv.h"
+ #include "config.h"
+ #include "global.h"
+ 
+@@ -70,13 +70,13 @@ buildfname(register char *p, char *login
+     if (*p == '*')
+       p++;
+     while (*p != '\0' && *p != ',' && *p != ';' && *p != ':' && *p != '(') {
+-      if (*p == '-' && (isdigit(p[-1]) || isspace(p[-1]))) {
++      if (*p == '-' && (ISDIGIT(p[-1]) || ISSPACE(p[-1]))) {
+           bp = buf;
+           p++;
+       } else if (*p == '&') {
+           strcpy(bp, login);
+-          if ((bp == buf || !isalpha(bp[-1])) && islower(*bp))
+-              *bp = toupper(*bp);
++          if ((bp == buf || !ISALPHA(bp[-1])) && ISLOWER(*bp))
++              *bp = TOUPPER(*bp);
+           while (*bp != '\0')
+               bp++;
+           p++;
Index: pkgsrc/news/nn/patches/patch-init.c
diff -u /dev/null pkgsrc/news/nn/patches/patch-init.c:1.1
--- /dev/null   Tue May 19 18:38:11 2026
+++ pkgsrc/news/nn/patches/patch-init.c Tue May 19 18:38:11 2026
@@ -0,0 +1,51 @@
+$NetBSD: patch-init.c,v 1.1 2026/05/19 18:38:11 spz Exp $
+
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+--- init.c.orig        2026-05-16 21:27:11.065781780 +0000
++++ init.c
+@@ -10,7 +10,7 @@
+ #include <string.h>
+ #include <sys/types.h>
+ #include <stdio.h>
+-#include <ctype.h>
++#include "ctypeconv.h"
+ #include "config.h"
+ #include "global.h"
+ #include "articles.h"
+@@ -112,7 +112,7 @@ strip_str(register char *cmd)
+     if (cmd == NULL)
+       return cmd;
+ 
+-    while (*cmd && isascii(*cmd) && isspace(*cmd))
++    while (*cmd && ISASCII(*cmd) && ISSPACE(*cmd))
+       cmd++;
+     if (*cmd == NUL || *cmd == NL)
+       return NULL;
+@@ -153,7 +153,7 @@ argv(int i)
+       if (argvec[argc]) {
+           cmd = argvec[argc];
+           while (argc <= i) {
+-              while (*cmd && (!isascii(*cmd) || !isspace(*cmd)))
++              while (*cmd && (!ISASCII(*cmd) || !ISSPACE(*cmd)))
+                   cmd++;
+               if (*cmd == NUL) {
+                   argc = MAXARG;
+@@ -768,7 +768,7 @@ do_map(FILE * initf)
+           dump_multi_keys();
+           return 1;
+       }
+-      if (isdigit(argv(1)[1]))
++      if (ISDIGIT(argv(1)[1]))
+           bind_to = K_function(argv(1)[1] - '0');
+       else {
+           bind_to = parse_key(argv(1) + 1);
+@@ -1029,7 +1029,7 @@ parse_on_to_end(FILE * f)
+ 
+ skip_to_end:
+     while (fgets_multi(buf, 1024, f)) {
+-      for (cp = buf; *cp && isascii(*cp) && isspace(*cp); cp++);
++      for (cp = buf; *cp && ISASCII(*cp) && ISSPACE(*cp); cp++);
+       if (*cp != 'e')
+           continue;
+       if (strncmp(cp, "end", 3) == 0)
Index: pkgsrc/news/nn/patches/patch-keymap.c
diff -u /dev/null pkgsrc/news/nn/patches/patch-keymap.c:1.1
--- /dev/null   Tue May 19 18:38:11 2026
+++ pkgsrc/news/nn/patches/patch-keymap.c       Tue May 19 18:38:11 2026
@@ -0,0 +1,51 @@
+$NetBSD: patch-keymap.c,v 1.1 2026/05/19 18:38:11 spz Exp $
+
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+--- keymap.c.orig      2026-05-16 21:27:20.712632233 +0000
++++ keymap.c
+@@ -6,7 +6,7 @@
+  */
+ 
+ #include <string.h>
+-#include <ctype.h>
++#include "ctypeconv.h"
+ #include "config.h"
+ #include "global.h"
+ #include "init.h"
+@@ -638,7 +638,7 @@ cmd_completion(char *path, int index)
+     if (path) {
+       head = path;
+       tail = path + index;
+-      while (*head && isspace(*head))
++      while (*head && ISSPACE(*head))
+           head++;
+       help_cmd = cmd = command_name_map;
+       len = tail - head;
+@@ -731,7 +731,7 @@ parse_key(char *str)
+           return CONTROL_(str[1]);
+     }
+ 
+-    if (isdigit(str[0])) {
++    if (ISDIGIT(str[0])) {
+       if (str[0] == '0') {
+           if (str[1] == 'x')
+               sscanf(str + 2, "%d", &x);
+@@ -743,7 +743,7 @@ parse_key(char *str)
+ 
+       return x;
+     }
+-    if (str[0] == '#' && isdigit(str[1]))
++    if (str[0] == '#' && ISDIGIT(str[1]))
+       return K_function(str[1] - '0');
+ 
+     if (str[0] == '#')
+@@ -990,7 +990,7 @@ keymap_completion(char *buf, int ix)
+     if (buf) {
+       head = buf;
+       tail = buf + ix;
+-      while (*head && isspace(*head))
++      while (*head && ISSPACE(*head))
+           head++;
+       help_map = map = keymaps;
+       len = tail - head;
Index: pkgsrc/news/nn/patches/patch-macro.c
diff -u /dev/null pkgsrc/news/nn/patches/patch-macro.c:1.1
--- /dev/null   Tue May 19 18:38:11 2026
+++ pkgsrc/news/nn/patches/patch-macro.c        Tue May 19 18:38:11 2026
@@ -0,0 +1,47 @@
+$NetBSD: patch-macro.c,v 1.1 2026/05/19 18:38:11 spz Exp $
+
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+--- macro.c.orig       2026-05-16 21:27:37.262483369 +0000
++++ macro.c
+@@ -7,7 +7,7 @@
+ 
+ #include <stdlib.h>
+ #include <string.h>
+-#include <ctype.h>
++#include "ctypeconv.h"
+ #include "config.h"
+ #include "global.h"
+ #include "db.h"
+@@ -169,7 +169,7 @@ parse_word(char *w)
+     register struct macro *m1;
+ 
+     if (m && m->m_type == M_COMMAND && m->m_int == (GETC_COMMAND | K_MACRO)) {
+-      if (isdigit(*w)) {
++      if (ISDIGIT(*w)) {
+           m->m_int |= atoi(w);
+           goto ok;
+       }
+@@ -327,11 +327,11 @@ parse_line(char *lp)
+               lp++;
+           while (*lp && *lp != '\'');
+       } else
+-          while (*lp && !isspace(*lp))
++          while (*lp && !ISSPACE(*lp))
+               lp++;
+       if (*lp) {
+           *lp++ = NUL;
+-          while (*lp && isspace(*lp))
++          while (*lp && ISSPACE(*lp))
+               lp++;
+       }
+       if (parse_word(word))
+@@ -391,7 +391,7 @@ m_define(char *id, FILE * f)
+     initial_set_commands = (cur_m == NMACRO);
+ 
+     while (fgets_multi(line, 1024, f)) {
+-      for (lp = line; *lp && isspace(*lp); lp++);
++      for (lp = line; *lp && ISSPACE(*lp); lp++);
+       if (*lp == NUL)
+           continue;
+       if (*lp == ')' || strncmp(lp, "end", 3) == 0)
Index: pkgsrc/news/nn/patches/patch-match.c
diff -u /dev/null pkgsrc/news/nn/patches/patch-match.c:1.1
--- /dev/null   Tue May 19 18:38:11 2026
+++ pkgsrc/news/nn/patches/patch-match.c        Tue May 19 18:38:11 2026
@@ -0,0 +1,71 @@
+$NetBSD: patch-match.c,v 1.1 2026/05/19 18:38:11 spz Exp $
+
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+--- match.c.orig       2026-05-16 21:27:46.850200444 +0000
++++ match.c
+@@ -5,7 +5,7 @@
+  *    String/Subject matching routines.
+  */
+ 
+-#include <ctype.h>
++#include "ctypeconv.h"
+ #include "config.h"
+ #include "global.h"
+ #include "regexp.h"
+@@ -37,11 +37,11 @@ fold_string(register char *mask)
+     for (; (c = *mask); mask++) {
+ 
+ #ifdef _tolower
+-      if (!isascii(c) || !isupper(c))
++      if (!ISASCII(c) || !ISUPPER(c))
+           continue;
+-      *mask = _tolower(c);
++      *mask = _TOLOWER(c);
+ #else
+-      *mask = tolower(c);
++      *mask = TOLOWER(c);
+ #endif
+     }
+ }
+@@ -58,10 +58,10 @@ streq_fold(register char *mask, register
+           continue;
+ 
+ #ifdef _tolower
+-      if (!isascii(c) || !isupper(c) || _tolower(c) != (unsigned) d)
++      if (!ISASCII(c) || !ISUPPER(c) || _TOLOWER(c) != (unsigned) d)
+           return 0;
+ #else
+-      if (tolower(c) != d)
++      if (TOLOWER(c) != d)
+           return 0;
+ #endif
+     }
+@@ -79,12 +79,12 @@ strmatch_fold(char *mask, register char 
+               break;
+ 
+ #ifdef _tolower
+-          if (!isascii(c) || !isupper(c))
++          if (!ISASCII(c) || !ISUPPER(c))
+               continue;
+-          if (_tolower(c) == (unsigned) m1)
++          if (_TOLOWER(c) == (unsigned) m1)
+               break;
+ #else
+-          if (tolower(c) == m1)
++          if (TOLOWER(c) == m1)
+               break;
+ #endif
+       }
+@@ -139,9 +139,9 @@ regexec_fold(register regexp * prog, cha
+     while (bp < maxb && (c = *str++) != NUL)
+ 
+ #ifdef _tolower
+-      *bp++ = (!isascii(c) || !isupper(c)) ? c : _tolower(c);
++      *bp++ = (!ISASCII(c) || !ISUPPER(c)) ? c : _TOLOWER(c);
+ #else
+-      *bp++ = tolower(c);
++      *bp++ = TOLOWER(c);
+ #endif
+ 
+     *bp = NUL;
Index: pkgsrc/news/nn/patches/patch-menu.c
diff -u /dev/null pkgsrc/news/nn/patches/patch-menu.c:1.1
--- /dev/null   Tue May 19 18:38:11 2026
+++ pkgsrc/news/nn/patches/patch-menu.c Tue May 19 18:38:11 2026
@@ -0,0 +1,30 @@
+$NetBSD: patch-menu.c,v 1.1 2026/05/19 18:38:11 spz Exp $
+
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+--- menu.c.orig        2026-05-16 21:27:55.837783975 +0000
++++ menu.c
+@@ -6,7 +6,7 @@
+  */
+ 
+ #include <string.h>
+-#include <ctype.h>
++#include "ctypeconv.h"
+ #include "config.h"
+ #include "global.h"
+ #include "articles.h"
+@@ -1025,12 +1025,12 @@ get_purpose(char *purpose)
+     len = current_group->group_name_length;
+ 
+     while (fgets(line, 256, f) != NULL) {
+-      if (!isascii(line[len]) || !isspace(line[len]))
++      if (!ISASCII(line[len]) || !ISSPACE(line[len]))
+           continue;
+       if (strncmp(line, group, len))
+           continue;
+       cp = line + len;
+-      while (*cp && isspace(*cp))
++      while (*cp && ISSPACE(*cp))
+           cp++;
+       for (pp = purpose, len = 76; --len >= 0 && *cp && *cp != NL;)
+           *pp++ = *cp++;
Index: pkgsrc/news/nn/patches/patch-newsrc.c
diff -u /dev/null pkgsrc/news/nn/patches/patch-newsrc.c:1.1
--- /dev/null   Tue May 19 18:38:11 2026
+++ pkgsrc/news/nn/patches/patch-newsrc.c       Tue May 19 18:38:11 2026
@@ -0,0 +1,51 @@
+$NetBSD: patch-newsrc.c,v 1.1 2026/05/19 18:38:11 spz Exp $
+
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+--- newsrc.c.orig      2026-05-16 21:28:19.289443231 +0000
++++ newsrc.c
+@@ -7,7 +7,7 @@
+ 
+ #include <stdlib.h>
+ #include <string.h>
+-#include <ctype.h>
++#include "ctypeconv.h"
+ #include "config.h"
+ #include "global.h"
+ #include "articles.h"
+@@ -326,7 +326,7 @@ get_last_article(group_header * gh)
+       return -1;
+ 
+     line += gh->group_name_length + 1;
+-    while (*line && isspace(*line))
++    while (*line && ISSPACE(*line))
+       line++;
+     if (*line == NUL)
+       return -1;
+@@ -334,7 +334,7 @@ get_last_article(group_header * gh)
+     if (line[0] == '1') {
+       if (line[1] == RC_RANGE)
+           return atol(line + 2);
+-      if (!isdigit(line[1]))
++      if (!ISDIGIT(line[1]))
+           return 1;
+     }
+     return 0;
+@@ -706,7 +706,7 @@ rctest(register article_header * ah, reg
+                   x = 0;
+                   continue;
+               }
+-              if (isascii(*p) && isdigit(*p))
++              if (ISASCII(*p) && ISDIGIT(*p))
+                   x = x * 10 + c - '0';
+           }
+           r->rc_max = x;
+@@ -1663,7 +1663,7 @@ opt_nngoback(int argc, char ***argvp)
+                     " days [groups]...");
+ 
+     if (goback_days < 0) {
+-      if (n == 0 || !isdigit((*argvp)[1][0])) {
++      if (n == 0 || !ISDIGIT((*argvp)[1][0])) {
+           fprintf(stderr, "usage: %s [-NQvi] days [groups]...\n", pname);
+           nn_exit(1);
+       }
Index: pkgsrc/news/nn/patches/patch-options.c
diff -u /dev/null pkgsrc/news/nn/patches/patch-options.c:1.1
--- /dev/null   Tue May 19 18:38:11 2026
+++ pkgsrc/news/nn/patches/patch-options.c      Tue May 19 18:38:11 2026
@@ -0,0 +1,72 @@
+$NetBSD: patch-options.c,v 1.1 2026/05/19 18:38:11 spz Exp $
+
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+--- options.c.orig     2026-05-16 21:28:35.620014816 +0000
++++ options.c
+@@ -7,7 +7,7 @@
+ 
+ #include <stdlib.h>
+ #include <string.h>
+-#include <ctype.h>
++#include "ctypeconv.h"
+ #include "config.h"
+ #include "global.h"
+ #include "nn.h"
+@@ -124,7 +124,7 @@ parse_options(int ac, char **av, char *e
+ next_option:
+ 
+     if (envinit) {
+-      while (*cp && isspace(*cp))
++      while (*cp && ISSPACE(*cp))
+           cp++;
+       if (*cp == '-') {
+           cp++;
+@@ -175,7 +175,7 @@ next_option:
+ 
+               /* -oSTR or -o STR */
+ 
+-              while (*cp && isspace(*cp))
++              while (*cp && ISSPACE(*cp))
+                   cp++;
+ 
+               if (*cp == NUL) {
+@@ -194,7 +194,7 @@ next_option:
+               *(od->option_address) = cp;
+ 
+               if (envinit) {
+-                  while (*cp && !isspace(*cp))
++                  while (*cp && !ISSPACE(*cp))
+                       cp++;
+                   if (*cp)
+                       *cp++ = NUL;
+@@ -212,17 +212,17 @@ next_option:
+ 
+               /* -oN or -o N */
+ 
+-              while (*cp && isspace(*cp))
++              while (*cp && ISSPACE(*cp))
+                   cp++;
+ 
+               if (*cp) {
+-                  if (!isdigit(*cp)) {
++                  if (!ISDIGIT(*cp)) {
+                       if (od->option_type == 5)
+                           goto opt_int;
+                       error("non-numeric argument to -%c", opt);
+                   }
+               } else {
+-                  if (envinit || ac == 0 || !isdigit(**av)) {
++                  if (envinit || ac == 0 || !ISDIGIT(**av)) {
+                       if (od->option_type == 5)
+                           goto opt_int;
+                       error("missing argument to -%c", opt);
+@@ -231,7 +231,7 @@ next_option:
+                   ac--;
+               }
+               *((int *) (od->option_address)) = atoi(cp);
+-              while (isdigit(*cp))
++              while (ISDIGIT(*cp))
+                   cp++;
+               goto next_option;
+ 
Index: pkgsrc/news/nn/patches/patch-pack__date.c
diff -u /dev/null pkgsrc/news/nn/patches/patch-pack__date.c:1.1
--- /dev/null   Tue May 19 18:38:11 2026
+++ pkgsrc/news/nn/patches/patch-pack__date.c   Tue May 19 18:38:11 2026
@@ -0,0 +1,83 @@
+$NetBSD: patch-pack__date.c,v 1.1 2026/05/19 18:38:11 spz Exp $
+
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+--- pack_date.c.orig   2026-05-16 21:28:43.390275606 +0000
++++ pack_date.c
+@@ -16,7 +16,7 @@
+ 
+ #include <stdlib.h>
+ #include <string.h>
+-#include <ctype.h>
++#include "ctypeconv.h"
+ #include "config.h"
+ #include "global.h"
+ 
+@@ -308,7 +308,7 @@ numeric_zone(register char *date)
+           break;
+     }
+ 
+-    for (n = 0; n < MAXZ && *date && isdigit((int) *date);)
++    for (n = 0; n < MAXZ && *date && ISDIGIT(*date);)
+       num[n++] = *date++;
+     num[n] = '\0';
+ 
+@@ -348,27 +348,27 @@ tzone(register char *date)
+     static char     zone[MAXZ];
+     register struct zonetab *z;
+ 
+-    while (*date && isspace((int) *date))
++    while (*date && ISSPACE(*date))
+       date++;
+ 
+-    if (*date == '+' || *date == '-' || isdigit((int) *date))
++    if (*date == '+' || *date == '-' || ISDIGIT(*date))
+       return numeric_zone(date);
+ 
+-    for (; *date && isascii(*date); date++) {
+-      if (isspace((int) *date))
++    for (; *date && ISASCII(*date); date++) {
++      if (ISSPACE(*date))
+           break;
+-      if (!isalnum((int) *date))
++      if (!ISALNUM(*date))
+           continue;           /* p.s.t. -> pst */
+       if (i == MAXZ)
+           continue;
+-      zone[i++] = islower((int) *date) ? toupper((int) *date) : *date;
++      zone[i++] = ISLOWER(*date) ? TOUPPER(*date) : *date;
+     }
+ 
+-    while (*date && isspace((int) *date))
++    while (*date && ISSPACE(*date))
+       date++;
+     if (i == 0)
+       return 0;
+-    if (*date == '+' || *date == '-' || isdigit((int) *date))
++    if (*date == '+' || *date == '-' || ISDIGIT(*date))
+       return numeric_zone(date);
+ 
+     zone[i] = '\0';
+@@ -400,11 +400,11 @@ next_int(char **dp)
+     register char  *str = *dp;
+     register int    i;
+ 
+-    while (*str && !isdigit((int) *str))
++    while (*str && !ISDIGIT(*str))
+       str++;
+ 
+     i = atoi(str);
+-    while (*str && isdigit((int) *str))
++    while (*str && ISDIGIT(*str))
+       str++;
+ 
+     *dp = str;
+@@ -428,7 +428,7 @@ pack_date(char *date)
+     if (date == NULL || (day = next_int(&date)) == 0)
+       return 0;
+ 
+-    while (*date && isspace((int) *date))
++    while (*date && ISSPACE(*date))
+       date++;
+ 
+     if (date[0] == '\0' || date[1] == '\0' || date[2] == '\0')
Index: pkgsrc/news/nn/patches/patch-pack__subject.c
diff -u /dev/null pkgsrc/news/nn/patches/patch-pack__subject.c:1.1
--- /dev/null   Tue May 19 18:38:11 2026
+++ pkgsrc/news/nn/patches/patch-pack__subject.c        Tue May 19 18:38:11 2026
@@ -0,0 +1,46 @@
+$NetBSD: patch-pack__subject.c,v 1.1 2026/05/19 18:38:11 spz Exp $
+
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+--- pack_subject.c.orig        2026-05-16 21:28:51.824808400 +0000
++++ pack_subject.c
+@@ -8,7 +8,7 @@
+ 
+ #include <stdlib.h>
+ #include <string.h>
+-#include <ctype.h>
++#include "ctypeconv.h"
+ #include "config.h"
+ #include "global.h"
+ 
+@@ -23,7 +23,7 @@ pack_subject(register char *dest, regist
+       max_dest = dest + max_length;
+ 
+       while (*src) {
+-          if (isspace(*src)) {
++          if (ISSPACE(*src)) {
+               src++;
+               continue;
+           }
+@@ -49,7 +49,7 @@ pack_subject(register char *dest, regist
+           src++;
+           dest = start_dest;
+ 
+-          while (isdigit(*src))
++          while (ISDIGIT(*src))
+               *dest++ = *src++;
+           if (dest == start_dest)
+               re++;
+@@ -65,10 +65,10 @@ pack_subject(register char *dest, regist
+       while (*src && dest < max_dest) {
+           if (*src == '-' && strncmp("- (nf)", src, 5) == 0)
+               break;
+-          if (isascii(*src) && isspace(*src)) {
++          if (ISASCII(*src) && ISSPACE(*src)) {
+               do
+                   src++;
+-              while (isascii(*src) && isspace(*src));
++              while (ISASCII(*src) && ISSPACE(*src));
+               *dest++ = SP;
+           } else
+               *dest++ = *src++;
Index: pkgsrc/news/nn/patches/patch-regexp.c
diff -u /dev/null pkgsrc/news/nn/patches/patch-regexp.c:1.1
--- /dev/null   Tue May 19 18:38:11 2026
+++ pkgsrc/news/nn/patches/patch-regexp.c       Tue May 19 18:38:11 2026
@@ -0,0 +1,35 @@
+$NetBSD: patch-regexp.c,v 1.1 2026/05/19 18:38:11 spz Exp $
+
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+--- regexp.c.orig      2026-05-16 21:28:59.660188282 +0000
++++ regexp.c
+@@ -33,7 +33,7 @@
+ #include <stdio.h>
+ #include <string.h>
+ #include <stdlib.h>
+-#include <ctype.h>
++#include "ctypeconv.h"
+ #include "config.h"
+ #include "global.h"
+ #include "regexp.h"
+@@ -834,15 +834,15 @@ regmatch(char *prog)
+                   return (0);
+               break;
+           case W_START:
+-              if (*reginput == '\0' || isspace(*reginput))
++              if (*reginput == '\0' || ISSPACE(*reginput))
+                   return (0);
+-              if (reginput != regbol && !isspace(*(reginput - 1)))
++              if (reginput != regbol && !ISSPACE(*(reginput - 1)))
+                   return (0);
+               break;
+           case W_END:
+-              if (*reginput != '\0' && !isspace(*reginput))
++              if (*reginput != '\0' && !ISSPACE(*reginput))
+                   return (0);
+-              if (reginput == regbol || isspace(*(reginput - 1)))
++              if (reginput == regbol || ISSPACE(*(reginput - 1)))
+                   return (0);
+               break;
+           case ANY:
Index: pkgsrc/news/nn/patches/patch-reroute.c
diff -u /dev/null pkgsrc/news/nn/patches/patch-reroute.c:1.1
--- /dev/null   Tue May 19 18:38:11 2026
+++ pkgsrc/news/nn/patches/patch-reroute.c      Tue May 19 18:38:11 2026
@@ -0,0 +1,32 @@
+$NetBSD: patch-reroute.c,v 1.1 2026/05/19 18:38:11 spz Exp $
+
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+--- reroute.c.orig     2026-05-16 21:29:09.369380690 +0000
++++ reroute.c
+@@ -6,7 +6,7 @@
+  */
+ 
+ #include <string.h>
+-#include <ctype.h>
++#include "ctypeconv.h"
+ #include "config.h"
+ #include "global.h"
+ 
+@@ -22,14 +22,14 @@ reroute(char *route, char *address)
+       name = atpos;
+ 
+       while (--name >= address)
+-          if (isspace(*name) || *name == '<') {
++          if (ISSPACE(*name) || *name == '<') {
+               name++;
+               break;
+           }
+       if (name < address)
+           name++;
+ 
+-      for (sp = atpos; (c = *sp); sp++)
++      for (sp = atpos; (c = (unsigned char)(*sp)); sp++)
+           if (isspace(c) || c == '>')
+               break;
+ 
Index: pkgsrc/news/nn/patches/patch-sequence.c
diff -u /dev/null pkgsrc/news/nn/patches/patch-sequence.c:1.1
--- /dev/null   Tue May 19 18:38:11 2026
+++ pkgsrc/news/nn/patches/patch-sequence.c     Tue May 19 18:38:11 2026
@@ -0,0 +1,24 @@
+$NetBSD: patch-sequence.c,v 1.1 2026/05/19 18:38:11 spz Exp $
+
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+--- sequence.c.orig    2026-05-16 21:29:16.870728911 +0000
++++ sequence.c
+@@ -7,7 +7,7 @@
+ 
+ #include <stdlib.h>
+ #include <string.h>
+-#include <ctype.h>
++#include "ctypeconv.h"
+ #include "config.h"
+ #include "global.h"
+ #include "db.h"
+@@ -620,7 +620,7 @@ start_group_search(char *group)
+ 
+       if (group[2] != ':')
+           return;
+-      if (isdigit(group[3]))
++      if (ISDIGIT(group[3]))
+           gs_index = atoi(group + 3);
+       else {
+           gs_group = group + 3;
Index: pkgsrc/news/nn/patches/patch-variable.c
diff -u /dev/null pkgsrc/news/nn/patches/patch-variable.c:1.1
--- /dev/null   Tue May 19 18:38:11 2026
+++ pkgsrc/news/nn/patches/patch-variable.c     Tue May 19 18:38:11 2026
@@ -0,0 +1,63 @@
+$NetBSD: patch-variable.c,v 1.1 2026/05/19 18:38:11 spz Exp $
+
+deal with ctype functions faulting on invalid input on NetBSD 11
+
+--- variable.c.orig    2026-05-16 21:29:40.872840811 +0000
++++ variable.c
+@@ -7,7 +7,7 @@
+ 
+ #include <stdlib.h>
+ #include <string.h>
+-#include <ctype.h>
++#include "ctypeconv.h"
+ #include "config.h"
+ #include "global.h"
+ #include "chset.h"
+@@ -475,9 +475,9 @@ adjust(register char *str)
+           *str++ = escaped_char(*s++);
+       } else if (str == s) {
+           str++;
+-          if (isspace(*s++))
++          if (ISSPACE(*s++))
+               continue;
+-      } else if (isspace(*str++ = *s++))
++      } else if (ISSPACE(*str++ = *s++))
+           continue;
+       t = str;
+     }
+@@ -693,12 +693,12 @@ set_variable(char *variable, int on, cha
+                   sp = codes;
+                   vs = val_string;
+                   while (*vs) {
+-                      while (*vs && (!isascii(*vs) || isspace(*vs)))
++                      while (*vs && (!ISASCII(*vs) || ISSPACE(*vs)))
+                           vs++;
+                       if (*vs == NUL)
+                           break;
+                       cp = code;
+-                      while (*vs && isascii(*vs) && !isspace(*vs))
++                      while (*vs && ISASCII(*vs) && !ISSPACE(*vs))
+                           *cp++ = *vs++;
+                       *cp = NUL;
+                       *sp++ = parse_key(code);
+@@ -864,7 +864,7 @@ var_completion(char *path, int index)
+     if (path) {
+       head = path;
+       tail = path + index;
+-      while (*head && isspace(*head))
++      while (*head && ISSPACE(*head))
+           head++;
+       if (strncmp(head, "no", 2) == 0) {
+           head += 2;
+@@ -1175,9 +1175,9 @@ var_options(char **str, register char *o
+     options = *str;
+     while (*options) {
+       for (wp = word; (c = *options) != NUL; *wp++ = c, options++)
+-          if (isascii(c) && isspace(c))
++          if (ISASCII(c) && ISSPACE(c))
+               break;
+-      while (((c = *options)) && isascii(c) && isspace(c))
++      while (((c = *options)) && ISASCII(c) && ISSPACE(c))
+           options++;
+       *wp = NUL;
+ 



Home | Main Index | Thread Index | Old Index