Re: [PATCH] build: Avoid length() GNU awk extension

Mike Frysinger <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <Yih7a51lUfz0MnGr@vapier>
On 09 Mar 2022 04:10, Mike Frysinger wrote:
> On 09 Mar 2022 03: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
> 
> sorry, i quoted length() as used to count bytes in a string, not elements
> in an array.  POSIX doesn't support that.  i would still argue that, while
> gawk supports it, it isn't a GNU extension.  bwk supported it back in 2002,
> and gawk didn't implement it until ~2005.

since it's widely supported for a long time, i sent a request to the POSIX
folks to just add it :)
https://www.austingroupbugs.net/view.php?id=1566
-mike
signature.asc (application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE-----

iQIzBAABCAAdFiEEuQK1JxMl+JKsJRrUQWM7n+g39YEFAmIoe2sACgkQQWM7n+g3
9YE+6A//bt0GgbB2plSoZb2qx3cLBl+HCmFWKGy3Whu0VRH82fZVfNJPnMoXU/QP
pDXLRY+JDXMGW7YYVlimbvAKCuSUMYTwYcqUiJwYg75MDWKJlYMwb93TJkkxmmmy
GJHztpqSexVWgcNgAhTYH/4fiRVhjessCFCpZNYmVysFbFLtW3e/DXuaJNuQg5DE
GmxaPMsn9DOXAh44gx/36syLCVSyQUI/47nT4MqHE+9Z0slcLOo7l9a2rVlGv0m/
61ul3NZq7ilTn89w4DMpf9N/ZJ0/ZSnnzgXpdjv2WlnTSNh3rleoVVCjWJW7Cpgv
Y1/IrRsvtDXl95q0oxjlF0ATDSLEtoNjxGwAONzSVimnjavsT9FbtbpOw/jJqKfP
aQ3jIHdm6T8kwuQ1C76dDQdlswcXhAS5LmFSfYiR2twxVX+XF3EQIzfQ07Z0ar44
KemlvjQGWOvrIH6/0rtd9eVSS7rSYAzZETGPVy/4Qg7bQDqcH3LN/9ISty0SzvXr
rECUzBfdzogkOJJJLWBR8G9RjyTsVafMndHC4E5SDLACdtlFt2Xy/pSNrl+topDf
LR98eshPG8FqZJWR0CAtah0bqldtOl8Clq8/VLgopOIw/LJ/kFMXI4GYVpJZl486
JBK4nWhX50v/IQypcj+Xy7tLsj+VTfZzupvoMpwdrVNcpcmjYQ0=
=j/eB
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.