pkgsrc-Changes archive

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

CVS commit: pkgsrc/news/trn



Module Name:    pkgsrc
Committed By:   christos
Date:           Tue Apr 14 14:26:36 UTC 2026

Modified Files:
        pkgsrc/news/trn: Makefile distinfo
        pkgsrc/news/trn/patches: patch-ac patch-parsedate.y patch-term.h
Added Files:
        pkgsrc/news/trn/patches: patch-common.h patch-myctype.h

Log Message:
Add a replacement for <ctype.h> to avoid core-dumps from electrified libc.


To generate a diff of this commit:
cvs rdiff -u -r1.55 -r1.56 pkgsrc/news/trn/Makefile
cvs rdiff -u -r1.19 -r1.20 pkgsrc/news/trn/distinfo
cvs rdiff -u -r1.10 -r1.11 pkgsrc/news/trn/patches/patch-ac
cvs rdiff -u -r0 -r1.1 pkgsrc/news/trn/patches/patch-common.h \
    pkgsrc/news/trn/patches/patch-myctype.h
cvs rdiff -u -r1.1 -r1.2 pkgsrc/news/trn/patches/patch-parsedate.y \
    pkgsrc/news/trn/patches/patch-term.h

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

Modified files:

Index: pkgsrc/news/trn/Makefile
diff -u pkgsrc/news/trn/Makefile:1.55 pkgsrc/news/trn/Makefile:1.56
--- pkgsrc/news/trn/Makefile:1.55       Sat Apr 11 17:19:21 2026
+++ pkgsrc/news/trn/Makefile    Tue Apr 14 10:26:36 2026
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.55 2026/04/11 21:19:21 christos Exp $
+# $NetBSD: Makefile,v 1.56 2026/04/14 14:26:36 christos Exp $
 
 DISTNAME=              trn-4.0-test77
 PKGNAME=               trn-4.77
-PKGREVISION=           7
+PKGREVISION=           8
 CATEGORIES=            news
 MASTER_SITES=          ${MASTER_SITE_SOURCEFORGE:=trn/}
 

Index: pkgsrc/news/trn/distinfo
diff -u pkgsrc/news/trn/distinfo:1.19 pkgsrc/news/trn/distinfo:1.20
--- pkgsrc/news/trn/distinfo:1.19       Sat Apr 11 17:19:21 2026
+++ pkgsrc/news/trn/distinfo    Tue Apr 14 10:26:36 2026
@@ -1,10 +1,12 @@
-$NetBSD: distinfo,v 1.19 2026/04/11 21:19:21 christos Exp $
+$NetBSD: distinfo,v 1.20 2026/04/14 14:26:36 christos Exp $
 
 BLAKE2s (trn-4.0-test77.tar.gz) = be296a41d6bef98afdceb1a72389f48a66d661e930c7f626f9917b8083a68d1f
 SHA512 (trn-4.0-test77.tar.gz) = 9b76ba004fb47dfd162afcfec51630431e8ad7099e5151d4a21b55c8fa670227d6e0756029e57312872c8f4ea986112af50508144caf59adb065212a661f408a
 Size (trn-4.0-test77.tar.gz) = 564694 bytes
-SHA1 (patch-ac) = b406c66669d088eb0140bf99f9589985feb4d4bf
+SHA1 (patch-ac) = 6d52e39a7eecf17a354d87b8a1c9a3c8bde7e8e9
 SHA1 (patch-ad) = f6d102af2b6e3095ea765f622085464193d94835
 SHA1 (patch-ae) = 6cc777ff94540345a433e88ab355fe18a23d60d1
-SHA1 (patch-parsedate.y) = 99213bd37f0708b65276a1f920b757a65ba29b33
-SHA1 (patch-term.h) = f6d63863327961c2e3af5d7d273c85b876406718
+SHA1 (patch-common.h) = 22cc22cddacdcd917c5bf7f16e9c6a2597726ee1
+SHA1 (patch-myctype.h) = 69e0cd3f22a4cc7e55a4613fc320a13d5c83d645
+SHA1 (patch-parsedate.y) = 152fae5b8a2c493da3e0f3812ff678b7ba916fd0
+SHA1 (patch-term.h) = f5a519c0e8f7496f44b2e170763259600846606e

Index: pkgsrc/news/trn/patches/patch-ac
diff -u pkgsrc/news/trn/patches/patch-ac:1.10 pkgsrc/news/trn/patches/patch-ac:1.11
--- pkgsrc/news/trn/patches/patch-ac:1.10       Sat Apr 11 17:19:21 2026
+++ pkgsrc/news/trn/patches/patch-ac    Tue Apr 14 10:26:36 2026
@@ -1,11 +1,11 @@
-$NetBSD: patch-ac,v 1.10 2026/04/11 21:19:21 christos Exp $
+$NetBSD: patch-ac,v 1.11 2026/04/14 14:26:36 christos Exp $
 
 - Don't belch on single quotes in uname output.
 - Dragonfly support.
 - Always use pkgsrc termcap.
 - Use assorted pkgsrc tools.
 - Don't embed the tools path of sleep into installed scripts.
-- fix compilation warnings
+- fix compilation warnings, by including the proper header files
 
 --- Configure.orig     2010-09-02 02:12:26.000000000 -0400
 +++ Configure  2026-04-11 17:13:48.980370032 -0400

Index: pkgsrc/news/trn/patches/patch-parsedate.y
diff -u pkgsrc/news/trn/patches/patch-parsedate.y:1.1 pkgsrc/news/trn/patches/patch-parsedate.y:1.2
--- pkgsrc/news/trn/patches/patch-parsedate.y:1.1       Sun Jul  5 09:35:31 2020
+++ pkgsrc/news/trn/patches/patch-parsedate.y   Tue Apr 14 10:26:36 2026
@@ -1,10 +1,21 @@
-$NetBSD: patch-parsedate.y,v 1.1 2020/07/05 13:35:31 rhialto Exp $
+$NetBSD: patch-parsedate.y,v 1.2 2026/04/14 14:26:36 christos Exp $
 
-Add date grammar rules for old articles from olduse.net.
+- Add date grammar rules for old articles from olduse.net.
+- replace ctype.h
 
---- parsedate.y.orig   2000-05-27 00:31:17.000000000 +0000
-+++ parsedate.y
-@@ -134,6 +134,10 @@ item      : time {
+
+--- parsedate.y.orig   2000-05-25 01:11:42.000000000 -0400
++++ parsedate.y        2026-04-14 10:12:10.491640369 -0400
+@@ -19,7 +19,7 @@
+ /* SUPPRESS 595 on yypvt *//* Automatic variable may be used before set */
+ #include <stdio.h>
+ #include <sys/types.h>
+-#include <ctype.h>
++#include "myctype.h"
+ #include "config.h"
+ /*#include "config2.h"*/
+ #include <time.h>
+@@ -134,6 +134,10 @@
        | rel {
            yyHaveRel = 1;
        }
@@ -15,7 +26,7 @@ Add date grammar rules for old articles 
        ;
  
  time  : tUNUMBER o_merid {
-@@ -259,6 +263,24 @@ date      : tUNUMBER '/' tUNUMBER {
+@@ -259,6 +263,24 @@
            yyMonth = $4;
            yyYear = $5;
        }
@@ -40,7 +51,7 @@ Add date grammar rules for old articles 
        ;
  
  rel   : tSNUMBER tSEC_UNIT {
-@@ -283,6 +305,21 @@ o_merid   : /* NULL */ {
+@@ -283,6 +305,21 @@
        }
        ;
  
@@ -62,7 +73,7 @@ Add date grammar rules for old articles 
  %%
  
  /* Month and day table. */
-@@ -692,6 +729,9 @@ date_lex()
+@@ -692,6 +729,9 @@
        if (isdigit(c) || c == '-' || c == '+') {
            if (c == '-' || c == '+') {
                sign = c == '-' ? -1 : 1;
@@ -72,7 +83,7 @@ Add date grammar rules for old articles 
                yyInput++;
                if (!isdigit(*yyInput))
                    /* Skip the plus or minus sign. */
-@@ -703,6 +743,9 @@ date_lex()
+@@ -703,6 +743,9 @@
                i = 10 * i + c - '0';
            yyInput--;
            yylval.Number = sign < 0 ? -i : i;
@@ -82,7 +93,7 @@ Add date grammar rules for old articles 
            return sign ? tSNUMBER : tUNUMBER;
        }
  
-@@ -713,9 +756,15 @@ date_lex()
+@@ -713,9 +756,15 @@
                    *p++ = isupper(c) ? tolower(c) : c;
            *p = '\0';
            yyInput--;
@@ -98,7 +109,7 @@ Add date grammar rules for old articles 
        return *yyInput++;
      }
  }
-@@ -799,7 +848,7 @@ main(ac, av)
+@@ -799,7 +848,7 @@
            continue;
        }
  #endif /* YYDEBUG */
Index: pkgsrc/news/trn/patches/patch-term.h
diff -u pkgsrc/news/trn/patches/patch-term.h:1.1 pkgsrc/news/trn/patches/patch-term.h:1.2
--- pkgsrc/news/trn/patches/patch-term.h:1.1    Sat Apr 11 17:19:21 2026
+++ pkgsrc/news/trn/patches/patch-term.h        Tue Apr 14 10:26:36 2026
@@ -1,4 +1,6 @@
-$NetBSD: patch-term.h,v 1.1 2026/04/11 21:19:21 christos Exp $
+$NetBSD: patch-term.h,v 1.2 2026/04/14 14:26:36 christos Exp $
+
+Include the proper files to avoid warnings
 
 --- term.h.orig        2010-09-02 02:12:26.000000000 -0400
 +++ term.h     2026-04-11 17:02:03.362870720 -0400

Added files:

Index: pkgsrc/news/trn/patches/patch-common.h
diff -u /dev/null pkgsrc/news/trn/patches/patch-common.h:1.1
--- /dev/null   Tue Apr 14 10:26:36 2026
+++ pkgsrc/news/trn/patches/patch-common.h      Tue Apr 14 10:26:36 2026
@@ -0,0 +1,15 @@
+$NetBSD: patch-common.h,v 1.1 2026/04/14 14:26:36 christos Exp $
+
+Use our hacked ctype.h
+
+--- common.h.orig      2026-04-14 10:11:39.960134314 -0400
++++ common.h   2026-04-14 10:11:57.914301169 -0400
+@@ -7,7 +7,7 @@
+ #include <sys/types.h>
+ #include <sys/stat.h>
+ 
+-#include <ctype.h>
++#include "myctype.h"
+ #include "config.h"   /* generated by installation script */
+ #include "config2.h"
+ 
Index: pkgsrc/news/trn/patches/patch-myctype.h
diff -u /dev/null pkgsrc/news/trn/patches/patch-myctype.h:1.1
--- /dev/null   Tue Apr 14 10:26:36 2026
+++ pkgsrc/news/trn/patches/patch-myctype.h     Tue Apr 14 10:26:36 2026
@@ -0,0 +1,52 @@
+$NetBSD: patch-myctype.h,v 1.1 2026/04/14 14:26:36 christos Exp $
+
+Provide a replacement ctype.h that avoids using the array macros
+and makes the argument be in the allowed range
+
+--- /dev/null  2026-04-14 10:13:22.713894271 -0400
++++ myctype.h  2026-04-14 10:13:05.352205521 -0400
+@@ -0,0 +1,44 @@
++
++/*
++ * Replace boobytrapped versions with safe ones
++ */
++#include <ctype.h>
++
++#undef        isalnum
++#undef        isalpha
++#undef        iscntrl
++#undef        isdigit
++#undef        isgraph
++#undef        islower
++#undef        isprint
++#undef        ispunct
++#undef        isspace
++#undef        isupper
++#undef        isxdigit
++#undef        tolower
++#undef        toupper
++#undef        isascii
++#undef        toascii
++#undef _tolower
++#undef _toupper
++#undef        isblank
++
++
++#define       isalnum(c)      (isalnum)((unsigned char)(c))
++#define       isalpha(c)      (isalpha)((unsigned char)(c))
++#define       iscntrl(c)      (iscntrl)((unsigned char)(c))
++#define       isdigit(c)      (isdigit)((unsigned char)(c))
++#define       isgraph(c)      (isgraph)((unsigned char)(c))
++#define       islower(c)      (islower)((unsigned char)(c))
++#define       isprint(c)      (isprint)((unsigned char)(c))
++#define       ispunct(c)      (ispunct)((unsigned char)(c))
++#define       isspace(c)      (isspace)((unsigned char)(c))
++#define       isupper(c)      (isupper)((unsigned char)(c))
++#define       isxdigit(c)     (isxdigit)((unsigned char)(c))
++#define       tolower(c)      (tolower)((unsigned char)(c))
++#define       toupper(c)      (toupper)((unsigned char)(c))
++#define       isascii(c)      (isascii)((unsigned char)(c))
++#define       toascii(c)      (toascii)((unsigned char)(c))
++#define _tolower(c)   (_tolower)((unsigned char)(c))
++#define _toupper(c)   (_toupper)((unsigned char)(c))
++#define       isblank(c)      (isblank)((unsigned char)(c))



Home | Main Index | Thread Index | Old Index