[PATCH] build: Avoid length() GNU awk extension
Sebastian Huber
sebastian.huber@embedded-brains.de
Wed Mar 9 09:02:59 GMT 2022
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: sebastian.huber@embedded-brains.de
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/
More information about the Newlib
mailing list