the Linux man-pages as an educational tool

Alejandro Colomar alx@kernel.org
Sun Aug 2 11:47:50 GMT 2026


Hi Collin,

> > Date: 2026-08-01 18:49:03-0700
> > From: Collin Funk <collin.funk1@gmail.com>
> >
> > But myself and likely many others who have commented on this thread do
> > not agree that strings.h is a bad name. Or that general memory related
> > functions, which are used on strings a large portion of the time, need a
> > separate header.

BTW, this typo reminds me that we have some more evidence.  <strings.h>
has existed for a long time in parallel to <string.h>, and some
functions are documented as being provided by it instead of by
<string.h>.  An example is strcasecmp(3).

In practice, both <string.h> and <strings.h> provide strcasecmp(3):

	alx@devuan:~/tmp$ cat s.c 
	#include <string.h>

	int
	main(void)
	{
		void *p = strcasecmp;
	}
	alx@devuan:~/tmp$ gcc -Wall -Wextra -Wno-unused s.c 
	alx@devuan:~/tmp$ 

Every now and then, people wonder about this non-standard header file,
but no cats were harmed by that.  Claiming that <memory.h> would be much
different is unreasonable, IMO.


Cheers,
Alex

-- 
<https://www.alejandro-colomar.es>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20260802/7edfc033/attachment.sig>


More information about the Libc-alpha mailing list