Skip to content

Commit 90de19f

Browse files
omajidjanvorli
authored andcommitted
Change [:space:] to [[:space:]] in awk scripts (dotnet#25670)
During coreclr build on RHEL 7, awk prints out some warnings: awk: /builddir/build/BUILD/dotnet-v2.2.6/src/coreclr/generateredefinesfile.awk:10: warning: regexp component `[:space:]' should probably be `[[:space:]]' The awk man page says: A character class is only valid in a regular expression inside the brackets of a character list. So fix the '[:space:]' notation by replacing with the valid '[[:space:]]'. Fixing this warning doesn't actually result in a change in the generated files (dbgshim.exports, mscordbi.exports, libredefines.inc, palredefines.inc, clrjit.exports, mscordac.exports, coreclr.exports, dlltest1.exports and dlltest2.exports) on my system.
1 parent dbc0e19 commit 90de19f

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: generateexportedsymbols.awk

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
gsub(/\r/,"", $0);
55

66
# Skip empty lines and comment lines starting with semicolon
7-
if (NF && !match($0, /^[:space:]*;/))
7+
if (NF && !match($0, /^[[:space:]]*;/))
88
{
99
gsub(/^#/,"", $0);
1010
print "_" $0;

Diff for: generateredefinesfile.awk

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
gsub(/\r/,"", $0);
88

99
# Skip empty lines and comment lines starting with semicolon
10-
if (NF && !match($0, /^[:space:]*;/))
10+
if (NF && !match($0, /^[[:space:]]*;/))
1111
{
1212
# Only process the entries that begin with "#"
1313
if (match($0, /^#.*/))

0 commit comments

Comments
 (0)