tech-userlevel archive

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

Re: bin/39002: harmful AWK extension: non-portable escaped character

 >> I think gawk does right thing here and I'd like to see the same in  
 >> NetBSD.
>  Gawk is sometimes a noisy pain in the butt.  :-)
>  It is long standing tradition in Unix tools and languages to ignore  
>  the backslash on non-special characters, right from C on up.
Please, do not repeat this $%^& "nawk is the only true awk...and
bla-bla-bla".  "Long standing trandition" is bad argument here. Today
is year 2008 and there is POSIX.
(I'm not big fun of GNU awk but this doesn't matter)

>  I personally don't think AWK should make any noisy warnings like this.
If you don't like noise, fix your programs. It's easy ;)

>  The fact that mawk does the wrong thing is disturbing, though I'm not  
>  sure that justifies making a noisy warning.
The real problem is not in mawk. The problem is that NetBSD code does
not conform to POSIX and is not as portable as it is claimed.


     kern/38766: breaks build if mawk is used

       Here building kernel failed under Linux and mawk is in use because
       mawk treat \$ as \$ (not as $).

     pkg/33410: pkgsrc problem with posix awk

       Here pkgsrc passed `\.' , `\$' and `\/' to awk interpreter again
       and pkgsrc might fail with mawk or other awk implementations.
       Note: that days pkgsrc used native version of awk.

I know only about these two. But I'm sure that there are others.  If
you apply the suggested patch with s/WARNING/FATAL/ you'll see
_ALL OF THEM_ ;-) Of course this is not for netbsd-5 branch.

I was asked to not make discussions in gnats, so I reply to this list.

Best regards, Aleksey Cheusov.

Home | Main Index | Thread Index | Old Index