tech-kern archive

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

Re: rfc: fix makesyscalls.sh



Ok. There is mawk related issue:

andy@~/prj/netbsd/netbsd.se-local$ echo | awk '{ print "\$NetBSD\$\n" }'
\$NetBSD\$

andy@~/prj/netbsd/netbsd.se-local$ awk -W version
mawk 1.3.3 Nov 1996, Copyright (C) Michael D. Brennan

compiled limits:
max NF             32767
sprintf buffer      2040

After gawk has been installed the test line works like following:

andy@~/prj/netbsd/netbsd.se-local$ echo | awk '{ print "\$NetBSD\$\n" }'
awk: warning: escape sequence `\$' treated as plain `$'
$NetBSD$

andy@~/prj/netbsd/netbsd.se-local$ awk -W version
GNU Awk 3.1.5
Copyright (C) 1989, 1991-2005 Free Software Foundation.
...

So. the issue is depend to awk implementation. My opinion is to fix
NetBSD to be more interportability.

On Tue, May 27, 2008 at 11:24 AM, Martin Husemann 
<martin%duskware.de@localhost> wrote:
>> I have the strings like
>> __KERNEL_RCSID(0, "\$NetBSD\$");
>
> That is wrong, and we should find a way to fix that. Can you please file
> a PR? Which version of awk is used there? The following test outputs the
> expected result both with gawk and the NetBSD in-tree awk:
>
>  echo | awk '{ print "\$NetBSD\$\n" }'
>
> though gawk warns: awk: warning: escape sequence `\$' treated as plain `$'
>
> Maybe there is a better way to fix it, like:
>
>   print "$" "NetBSD" "$\n"

-- 
With Best Regards,
Andy Shevchenko


Home | Main Index | Thread Index | Old Index