pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/pkgtools/check-portability
Module Name: pkgsrc
Committed By: rillig
Date: Sun Apr 19 12:05:14 UTC 2020
Modified Files:
pkgsrc/pkgtools/check-portability: Makefile
pkgsrc/pkgtools/check-portability/files: check-portability.c
pkgsrc/pkgtools/check-portability/files/testdata: random
Log Message:
pkgtools/check-portability: update to 20.1.0
Changes since 19.4.3:
The variable name RANDOM_FILE is ok since it doesn't have a special
meaning to some shell implementations. Seen in www/curl.
To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 pkgsrc/pkgtools/check-portability/Makefile
cvs rdiff -u -r1.12 -r1.13 \
pkgsrc/pkgtools/check-portability/files/check-portability.c
cvs rdiff -u -r1.2 -r1.3 \
pkgsrc/pkgtools/check-portability/files/testdata/random
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: pkgsrc/pkgtools/check-portability/Makefile
diff -u pkgsrc/pkgtools/check-portability/Makefile:1.8 pkgsrc/pkgtools/check-portability/Makefile:1.9
--- pkgsrc/pkgtools/check-portability/Makefile:1.8 Sat Mar 21 15:02:20 2020
+++ pkgsrc/pkgtools/check-portability/Makefile Sun Apr 19 12:05:14 2020
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.8 2020/03/21 15:02:20 rillig Exp $
+# $NetBSD: Makefile,v 1.9 2020/04/19 12:05:14 rillig Exp $
-PKGNAME= check-portability-19.4.3
+PKGNAME= check-portability-20.1.0
CATEGORIES= pkgtools
DISTFILES= # none
Index: pkgsrc/pkgtools/check-portability/files/check-portability.c
diff -u pkgsrc/pkgtools/check-portability/files/check-portability.c:1.12 pkgsrc/pkgtools/check-portability/files/check-portability.c:1.13
--- pkgsrc/pkgtools/check-portability/files/check-portability.c:1.12 Sat Mar 21 15:02:20 2020
+++ pkgsrc/pkgtools/check-portability/files/check-portability.c Sun Apr 19 12:05:14 2020
@@ -1,4 +1,4 @@
-/* $NetBSD: check-portability.c,v 1.12 2020/03/21 15:02:20 rillig Exp $ */
+/* $NetBSD: check-portability.c,v 1.13 2020/04/19 12:05:14 rillig Exp $ */
/*
Copyright (c) 2020 Roland Illig
@@ -39,9 +39,9 @@
static const size_t npos = -1;
static bool
-is_alnum(char c)
+is_alnumu(char c)
{
- return isalnum((unsigned char) c) != 0;
+ return isalnum((unsigned char) c) != 0 || c == '_';
}
static bool
@@ -160,12 +160,12 @@ cstr_right_of_last(cstr s, cstr delimite
}
static bool
-cstr_has_word_boundary(cstr s, size_t idx)
+cstr_has_varname_boundary(cstr s, size_t idx)
{
assert(idx <= s.len);
if (idx == 0 || idx == s.len)
return true;
- return is_alnum(s.data[idx - 1]) != is_alnum(s.data[idx]);
+ return is_alnumu(s.data[idx - 1]) != is_alnumu(s.data[idx]);
}
// str is a modifiable string buffer.
@@ -376,7 +376,7 @@ checkline_sh_dollar_random(cstr filename
size_t idx = cstr_index(line, CSTR("$RANDOM"));
// Variable names that only start with RANDOM are not special.
- if (idx == npos || !cstr_has_word_boundary(line, idx + 7))
+ if (idx == npos || !cstr_has_varname_boundary(line, idx + 7))
return;
// $RANDOM together with the PID is often found in GNU-style
Index: pkgsrc/pkgtools/check-portability/files/testdata/random
diff -u pkgsrc/pkgtools/check-portability/files/testdata/random:1.2 pkgsrc/pkgtools/check-portability/files/testdata/random:1.3
--- pkgsrc/pkgtools/check-portability/files/testdata/random:1.2 Sat Mar 21 15:02:20 2020
+++ pkgsrc/pkgtools/check-portability/files/testdata/random Sun Apr 19 12:05:14 2020
@@ -16,3 +16,6 @@ ${RANDOM}
# This is not a special variable.
$RANDOMNESS
+
+# This is not a special variable as well.
+$RANDOM_FILE
Home |
Main Index |
Thread Index |
Old Index