They've been provided there since forever, and that's a more appropriate header.
While it would be good to document the standard functions also as provided by <memory.h>, that's more controversial, and is still being litigated. Link: <https://lore.kernel.org/linux-man/am0RdPxvbIYUKAL-@devuan/T/#t> Cc: Sam James <[email protected]> Cc: "G. Branden Robinson" <[email protected]> Cc: Joseph Myers <[email protected]> Cc: Keith Bostic <[email protected]> Cc: Mark Harris <[email protected]> Cc: Nevin Liber <[email protected]> Cc: Collin Funk <[email protected]> Cc: JeanHeyd Meneide <[email protected]> Cc: Christopher Bazley <[email protected]> Cc: Serge Hallyn <[email protected]> Cc: Iker Pedrosa <[email protected]> Cc: Evgeny Grin <[email protected]> Cc: Kees Cook <[email protected]> Cc: [email protected] Cc: [email protected] Signed-off-by: Alejandro Colomar <[email protected]> --- Hi! Here's a less ambitious change. It's not that I don't want to pursue the other one, but that this one will likely pass more quickly. This only changes documentation for non-standard functions, where the argument that the standard says XXX is now irrelevant. Have a lovely night! Alex man/man3/memfrob.3 | 2 +- man/man3/memmem.3 | 2 +- man/man3/mempcpy.3 | 2 +- man/man3/memrchr.3 | 2 +- man/man3/strdupa.3 | 4 ++++ 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/man/man3/memfrob.3 b/man/man3/memfrob.3 index ee41da0ced7b..ad736949002c 100644 --- a/man/man3/memfrob.3 +++ b/man/man3/memfrob.3 @@ -13,7 +13,7 @@ .SH LIBRARY .SH SYNOPSIS .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" -.B #include <string.h> +.B #include <memory.h> .P .BR "void *memfrob(" "size_t n;" .BI " void " s [ n "], size_t " n ); diff --git a/man/man3/memmem.3 b/man/man3/memmem.3 index 13fd8b7cea7b..d0f99e6d577d 100644 --- a/man/man3/memmem.3 +++ b/man/man3/memmem.3 @@ -13,7 +13,7 @@ .SH LIBRARY .SH SYNOPSIS .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" -.B #include <string.h> +.B #include <memory.h> .P .BR "void *memmem(" "size_t hsize, size_t nsize;" .BI " const void " haystack [ hsize "], size_t " hsize , diff --git a/man/man3/mempcpy.3 b/man/man3/mempcpy.3 index 012e6326dd00..4598be5d7bc2 100644 --- a/man/man3/mempcpy.3 +++ b/man/man3/mempcpy.3 @@ -14,7 +14,7 @@ .SH LIBRARY .SH SYNOPSIS .nf .BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" -.B #include <string.h> +.B #include <memory.h> .P .BR "void *mempcpy(" "size_t n;" .BI " void " dest "[restrict " n "], const void " src "[restrict " n ], diff --git a/man/man3/memrchr.3 b/man/man3/memrchr.3 index 6e49defc5e4a..fe2841147f05 100644 --- a/man/man3/memrchr.3 +++ b/man/man3/memrchr.3 @@ -13,7 +13,7 @@ .SH LIBRARY .SH SYNOPSIS .nf .BR #define\~_GNU_SOURCE " // See feature_test_macros(7)" -.B #include <string.h> +.B #include <memory.h> .P .BR void\~*memrchr( size_t\~n; .BI " const void " s [ n "], int " c ", size_t " n ); diff --git a/man/man3/strdupa.3 b/man/man3/strdupa.3 index 63b12c83e9ec..412eec9f3491 100644 --- a/man/man3/strdupa.3 +++ b/man/man3/strdupa.3 @@ -16,6 +16,10 @@ .SH SYNOPSIS .B #include <string.h> .P .BI "char *strdupa(const char *" s ); +.P +.BR "#define _GNU_SOURCE" " /* See feature_test_macros(7) */" +.B #include <memory.h> +.P .BR "char *strndupa(" "size_t n;" .BI " const char " s [ n "], size_t " n ); .fi base-commit: 8152eb52d9a92f02c14e843545acec7ee1946479 -- 2.53.0
signature.asc
Description: PGP signature
