From: Alejandro Colomar Date: Sat, 1 Aug 2026 23:20:46 +0000 (+0200) Subject: man/man3head/memory.h.3: STANDARDS, HISTORY: Document some history about and This text is an adaptation of text suggested by Keith and Branden. Suggested-by: Keith Bostic Suggested-by: "G. Branden Robinson" Cc: Sam James Cc: Joseph Myers Cc: Mark Harris Cc: Nevin Liber Cc: Collin Funk Cc: JeanHeyd Meneide Cc: Christopher Bazley Cc: Bruno Haible Cc: Paul Eggert Cc: Serge Hallyn Cc: Iker Pedrosa Cc: Evgeny Grin Cc: Kees Cook Cc: Steve Summit Cc: "Maciej W. Rozycki" Cc: Arsen Arsenović Cc: bug-gnulib@gnu.org Cc: libc-alpha@sourceware.org Signed-off-by: Alejandro Colomar --- diff --git a/man/man3head/memory.h.3head b/man/man3head/memory.h.3head index 786da968f..a702873ec 100644 --- a/man/man3head/memory.h.3head +++ b/man/man3head/memory.h.3head @@ -52,6 +52,43 @@ Standard C library .BR memrchr (3) .TQ .BR memmem (3) +.SH STANDARDS +BSD. +.P +These functions are also provided in +.IR , +as specified by ISO C. +This is a historic mistake maintained for compatibility reasons. +Don't let that fool you; +these functions don't necessarily operate on strings. +.SH HISTORY +SVr1, 4.3BSD. +.P +System V (1983) +introduced an initial set of mem* functions +in a +.I +header file. +4.3BSD (1986) +adopted them. +.P +C89 didn't standardize this header file +(without providing any motivation or mentions in the +.UR https://\:www.open\-std.org/\:jtc1/\:sc22/\:wg14/\:www/\:C89Rationale.pdf +documented rationale +.UE ), +and instead crammed all these functions in +.IR , +resulting in confusing programmers +about the real purpose of these functions. +.P +Most C libraries, including the BSDs, glibc, and musl, +provide +.I . +.P +Illumos and gnulib don't provide it, though, +and instead use +.IR . .SH SEE ALSO .BR string (3), .BR string_copying (7)