NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: toolchain/57519: awk syntax error in crypto/external/bsd/openssl/lib/libcrypto/gen when building on Solaris 11.4 host system
The following reply was made to PR toolchain/57519; it has been noted by GNATS.
From: Valery Ushakov <uwe%stderr.spb.ru@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc:
Subject: Re: toolchain/57519: awk syntax error in
crypto/external/bsd/openssl/lib/libcrypto/gen when building on Solaris 11.4
host system
Date: Wed, 12 Jul 2023 14:51:41 +0300
It would be helpul to have the actual error message and the version of
awk used just for the record.
Posix says:
*+?{
The <asterisk>, <plus-sign>, <question-mark>, and <left-brace>
shall be special except when used in a bracket expression (see
RE Bracket Expression). Any of the following uses produce
undefined results:
If these characters appear first in an ERE, or immediately
following an unescaped <vertical-line>, <circumflex>,
<dollar-sign>, or <left-parenthesis>
If a <left-brace> is not part of a valid interval expression
(see EREs Matching Multiple Characters)
So escaping the opening curly is the right fix.
On the other hand:
The interpretation of an ordinary character preceded by an unescaped
<backslash> ( '\\' ) is undefined
Gawk manual says:
If you place a backslash in a string constant before something
that is not one of the characters previously listed, POSIX 'awk'
purposely leaves what happens as undefined. There are two choices:
Strip the backslash out [...]
Leave the backslash alone [...]
so escaping the closing curly might be a bit too adventurous (though
in practice a chance of encountering an implementation of awk that
would treat suck backslash as literal is vanishingly small).
-uwe
Home |
Main Index |
Thread Index |
Old Index