Source-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/lang/awka lang/awka: fix build with -Werror=char-subsc...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/4c0919b3196d
branches:  trunk
changeset: 430718:4c0919b3196d
user:      rillig <rillig%pkgsrc.org@localhost>
date:      Sun May 03 15:36:20 2020 +0000

description:
lang/awka: fix build with -Werror=char-subscripts

diffstat:

 lang/awka/Makefile                |   4 ++--
 lang/awka/distinfo                |   6 ++++--
 lang/awka/patches/patch-ab        |  27 +++++++++++++++++++++++++--
 lang/awka/patches/patch-awka_da.c |  18 ++++++++++++++++++
 lang/awka/patches/patch-lib_io.c  |  22 ++++++++++++++++++++++
 5 files changed, 71 insertions(+), 6 deletions(-)

diffs (119 lines):

diff -r 8b09cbc97f09 -r 4c0919b3196d lang/awka/Makefile
--- a/lang/awka/Makefile        Sun May 03 15:08:29 2020 +0000
+++ b/lang/awka/Makefile        Sun May 03 15:36:20 2020 +0000
@@ -1,7 +1,7 @@
-# $NetBSD: Makefile,v 1.15 2020/03/20 11:57:55 nia Exp $
+# $NetBSD: Makefile,v 1.16 2020/05/03 15:36:20 rillig Exp $
 
 DISTNAME=      awka-0.7.5
-PKGREVISION=   3
+PKGREVISION=   4
 CATEGORIES=    lang devel
 MASTER_SITES=  http://awka.sourceforge.net/
 
diff -r 8b09cbc97f09 -r 4c0919b3196d lang/awka/distinfo
--- a/lang/awka/distinfo        Sun May 03 15:08:29 2020 +0000
+++ b/lang/awka/distinfo        Sun May 03 15:36:20 2020 +0000
@@ -1,11 +1,13 @@
-$NetBSD: distinfo,v 1.9 2015/12/29 23:34:43 dholland Exp $
+$NetBSD: distinfo,v 1.10 2020/05/03 15:36:20 rillig Exp $
 
 SHA1 (awka-0.7.5.tar.gz) = b626a77ee716b9218ef78bee96e6ba2533055514
 RMD160 (awka-0.7.5.tar.gz) = 74d953efd395938572317b24fc702a0646d94f10
 SHA512 (awka-0.7.5.tar.gz) = d488ed4757e142cf2baa4564f1b7d4413833e7a6ac33610e0994318dc2e113048b72aa34c8cea18dcf073cb9d4b35be5bac7ef98e43effbfcf4b77d483882851
 Size (awka-0.7.5.tar.gz) = 395499 bytes
 SHA1 (patch-aa) = e721a4513fb16ca08cbf2658d3573b8034780efb
-SHA1 (patch-ab) = c5db58909c34408d2dc984095909ecca8f95c25a
+SHA1 (patch-ab) = a9541aadcb2d063f269ea3a27b6adc1e0fe92ce1
+SHA1 (patch-awka_da.c) = b77ed00c2caa0a2036e379c57bde7aa36f6febd0
 SHA1 (patch-doc_awka-elm.5) = 3f66ed179cf25364c38862c61b4132265dda2fe4
 SHA1 (patch-doc_awka-elmref.5) = e9d80cc867172a79c5a5e2ce107d03457ae430e2
 SHA1 (patch-doc_awka.1) = a280b016190abfc8c8055c7bf69b4121b9f8d2ed
+SHA1 (patch-lib_io.c) = b259a53d83e0c97aba0ff95db6c9748bd1d9e254
diff -r 8b09cbc97f09 -r 4c0919b3196d lang/awka/patches/patch-ab
--- a/lang/awka/patches/patch-ab        Sun May 03 15:08:29 2020 +0000
+++ b/lang/awka/patches/patch-ab        Sun May 03 15:36:20 2020 +0000
@@ -1,10 +1,33 @@
-$NetBSD: patch-ab,v 1.2 2015/12/29 23:34:43 dholland Exp $
+$NetBSD: patch-ab,v 1.3 2020/05/03 15:36:20 rillig Exp $
+
+Remove one extra level of m4 quoting, so that the detection of stdio.h
+functions works again.
+
+https://sourceforge.net/p/awka/bugs/46/
 
 Disable shared library. "It's unversioned and quite primitive, and
 nothing is currently depending on it."
 
---- configure.orig     2001-07-11 02:00:52.000000000 -0400
+--- configure.orig     2001-07-11 06:00:52.000000000 +0000
 +++ configure
+@@ -2018,7 +2018,7 @@ cat > conftest.$ac_ext <<EOF
+ #include <stdio.h>
+ EOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+-  egrep "[[^v]]fprintf" >/dev/null 2>&1; then
++  egrep "[^v]fprintf" >/dev/null 2>&1; then
+   :
+ else
+   rm -rf conftest*
+@@ -2036,7 +2036,7 @@ cat > conftest.$ac_ext <<EOF
+ #include <stdio.h>
+ EOF
+ if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+-  egrep "[[^v]]sprintf" >/dev/null 2>&1; then
++  egrep "[^v]sprintf" >/dev/null 2>&1; then
+   :
+ else
+   rm -rf conftest*
 @@ -2877,8 +2877,8 @@ rm -f conftest*
      EXE=''
      if test "$GCC" = yes
diff -r 8b09cbc97f09 -r 4c0919b3196d lang/awka/patches/patch-awka_da.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/awka/patches/patch-awka_da.c Sun May 03 15:36:20 2020 +0000
@@ -0,0 +1,18 @@
+$NetBSD: patch-awka_da.c,v 1.1 2020/05/03 15:36:20 rillig Exp $
+
+Fix array-out-of-bounds access for non-ASCII characters.
+
+https://sourceforge.net/p/awka/bugs/45/
+
+--- awka/da.c.orig     2001-07-06 07:06:19.000000000 +0000
++++ awka/da.c
+@@ -140,7 +140,8 @@
+ char *
+ fixbackslashes(char *str, int which)
+ {
+-  char *p = str, *q = str, *r;
++  char *p = str, *r;
++  unsigned char *q = (unsigned char *) str;
+   size_t len;
+ 
+   /*
diff -r 8b09cbc97f09 -r 4c0919b3196d lang/awka/patches/patch-lib_io.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/lang/awka/patches/patch-lib_io.c  Sun May 03 15:36:20 2020 +0000
@@ -0,0 +1,22 @@
+$NetBSD: patch-lib_io.c,v 1.1 2020/05/03 15:36:20 rillig Exp $
+
+Prevent array-out-of-bounds access.
+
+https://sourceforge.net/p/awka/bugs/45/
+
+--- lib/io.c.orig      2001-07-11 05:17:06.000000000 +0000
++++ lib/io.c
+@@ -644,10 +644,11 @@ _awka_io_addstream( char *name, char fla
+ void
+ _awka_io_cleanbinchars(a_VAR *var)
+ {
+-  register char *r, *q;
++  register char *r;
++  unsigned char *q;
+ 
+   r = var->ptr + var->slen;
+-  q = var->ptr;
++  q = (unsigned char *) var->ptr;
+   if (var->slen >= 8)
+   while (q<=(r-8)) 
+   {



Home | Main Index | Thread Index | Old Index