Re: [PATCH] build: Avoid length() GNU awk extension
Sebastian Huber <[email protected]>
| Newsgroups | gmane.comp.lib.newlib |
|---|---|
| Message-ID | <[email protected]> |
On 09/03/2022 09:54, Mike Frysinger wrote: > On 09 Mar 2022 08:31, Sebastian Huber wrote: >> Other awk implementations such as mawk do not support the length() function. > those awk implementations are not POSIX compliant. length() is > *not* a GNU extension. you can see it clearly defined in POSIX: > https://pubs.opengroup.org/onlinepubs/9699919799/utilities/awk.html#tag_20_06_13_13 Ok, it is defined by POSIX, I will adjust the commit message. > > that said, mawk does support length(), and has since at least 2008 in > the 1.3.3 release. i stopped looking back further in the history. > > so you're going to have to provide a bit more info as to what you're > trying to do here, and what tools & versions exactly you're using. I received an error report from someone else which regularly builds Newlib and this use of awk broke the build. I don't know the exact version of mawk which was used. Independent of the POSIX compliance of the existing code I think the change to use the return value of split() doesn't hurt? -- embedded brains GmbH Herr Sebastian HUBER Dornierstr. 4 82178 Puchheim Germany email: [email protected] phone: +49-89-18 94 741 - 16 fax: +49-89-18 94 741 - 08 Registergericht: Amtsgericht München Registernummer: HRB 157899 Vertretungsberechtigte Geschäftsführer: Peter Rasmussen, Thomas Dörfler Unsere Datenschutzerklärung finden Sie hier: https://embedded-brains.de/datenschutzerklaerung/