Re: on the irresponsibility of pursuing C language reform
Alejandro Colomar <[email protected]> Sun, 2 Aug 2026 01:24:28 +0200
| Newsgroups | gmane.linux.man,gmane.comp.lib.gnulib.bugs,gmane.comp.lib.glibc.alpha |
|---|---|
| Message-ID | <am5_uA4MSujYCS9X@devuan> |
--t3w6bondjdkqh4v2 Content-Type: text/plain; protected-headers=v1; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable From: Alejandro Colomar <[email protected]> To: Keith Bostic <[email protected]> Cc: Sam James <[email protected]>, "G. Branden Robinson" <[email protected]>, Joseph Myers <[email protected]>, [email protected], Mark Harris <[email protected]>, Nevin Liber <[email protected]>, JeanHeyd Meneide <[email protected]>, Christopher Bazley <[email protected]>, "Serge E. Hallyn" <[email protected]>, Iker Pedrosa <[email protected]>, "Evgeny Grin (Karlson2k)" <[email protected]>, Kees Cook <[email protected]>, bug-gnulib-mXXj517/[email protected], libc-alpha-9JcytcrH/[email protected], Douglas McIlroy <[email protected]> Subject: Re: on the irresponsibility of pursuing C language reform Message-ID: <am5_uA4MSujYCS9X@devuan> References: <e1031c2c-37eb-3cee-8bf0-f3285803d4e3-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org> <20260731215122.4p4aepsbgeoibx74@illithid> <[email protected]> <am3XeGZyi1Pvr77-@devuan> <[email protected]> <am4GT1OkqNZD9FF9@devuan> <[email protected]> <am4jxBOh_VRvhCQw@devuan> <CAETFuj2OwoyK9J85r2f0RoXbHbXKA4gQJ=JZ-7=QoqGcMwk0+Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> <am51v4KmUmdzM-OT@devuan> MIME-Version: 1.0 In-Reply-To: <am51v4KmUmdzM-OT@devuan> Hi Keith, > Date: 2026-08-02 00:44:46+0200 > From: Alejandro Colomar <[email protected]> > [...] > > Advocating for better usage in the documentation is a different thing, = and > > a good thing. The man pages can even go pretty hard, that=E2=80=99s the= ir job: > > =E2=80=9CNotice the include file is string.h. That=E2=80=99s an histori= c accident > > maintained for compatibility reasons; don=E2=80=99t let that fool you, = this > > function doesn=E2=80=99t operate on strings.=E2=80=9D >=20 [...] > I should probably expand the NOTES a little bit, to be more clear about > why we ignore the standard in the SYNOPSIS. I've put that text in a centralized place, in the memory.h(3head) manual page: $ MANWIDTH=3D64 diffman-git HEAD --- HEAD^:man/man3head/memory.h.3 +++ HEAD:man/man3head/memory.h.3 @@ -10,6 +10,11 @@ SYNOPSIS #include <memory.h> =20 DESCRIPTION + These functions are also provided in <string.h>, as speci=E2=80=90 + fied by ISO C. This is a historic accident maintained for + compatibility reasons. Don=E2=80=99t let that fool you; these + functions don=E2=80=99t necessarily operate on strings. + Write bzero(3) memset(3) @@ -38,6 +43,19 @@ DESCRIPTION memrchr(3) memmem(3) =20 +STANDARDS + BSD. + +HISTORY + The <memory.h> header file is the original one which was + added in System V (1983), and was later adopted by 4.3BSD + (1986). It contained the original mem* functions. + + C89 didn=E2=80=99t standardize this header file, and instead + crammed all these functions in <string.h>, resulting in + confusing programmers about the real purpose of these + functions. + SEE ALSO string(3), string_copying(7) =20 Cheers, Alex --=20 <https://www.alejandro-colomar.es> --t3w6bondjdkqh4v2 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEES7Jt9u9GbmlWADAi64mZXMKQwqkFAmpugCsACgkQ64mZXMKQ wqmsRxAAop9BVkx0F7aSMM8fBE7JFeh4W5fGNOjxupaL4pQBmQCwZCMKMgnN4Cge l7Rw3z48hJMLjkKqtDZZ8X9Gti4dkMrP/keA4noSZqmD31kUlw+hRO2kK5e45GQ8 Jj+KkP1pum8XIYsNeRw1QwYdn8vGEKgItAGeNIG/4Aq3PptHL1kNDi/E4pXeMHaL 7I/MBJYMPeKpMCx6hJKk7BZsmymslD+STHo0ytkjlNYPknyXvvY0lnA4aTJ5AhSw oI2BMKQtR6gdG+0Gfff8oglJ9+7cXDkmcYf1IIrDWv6UWBz8CRmdiRkBOD9y9wzO KWXEgQLeqvp/RrLy3odYyXPy/dIZ+WijuBlyn7vnqONwiCOFeHMzGtCk7yeKl1nX aKsKX4XL1ZldUZYnzn0PiiJ+hB0y3xiF6UuLWZr5DQP+yuXSJtNXbEMUGvG5tGUp QeEiechrgi2nmiVm3NzVuicTlmnjF4otjlF1xwT1YEDo8GeBH5wxVChC4bnn6K+V vsLuQkXMu11Di4NlyFwTYUvfBlMCagdFbK4JCBUDTMgThYpn/qr79IG75AzXHIMc szL8VEvH99/2juqcDGJ7upTVpLMf2J4mPWMWSNqoHNQ5vletV6rs7ssd26pm4Dt/ RyK/xy0V3atpSarcrzkBMU8wp9JCIUMh3bQjfS1GLcRnPrP6hWk= =d3mx -----END PGP SIGNATURE----- --t3w6bondjdkqh4v2--