* Re: [PATCH] Remove any mention of feature test macro requirements for mmap()
[not found] <9514ccd17ebc5fed7b685e4e163e725148176972.camel@posteo.net>
@ 2022-10-20 12:31 ` Alejandro Colomar
0 siblings, 0 replies; only message in thread
From: Alejandro Colomar @ 2022-10-20 12:31 UTC (permalink / raw)
To: John Scott, Andreas Schwab; +Cc: linux-man, GNU C Library
[-- Attachment #1.1: Type: text/plain, Size: 2472 bytes --]
Hi John, Andreas,
On 10/19/22 14:25, John Scott wrote:
> I'm not subscribed, please CC me.
>
> glibc doesn't require_GNU_SOURCE to expose certain MAP_* constants
> anymore (MAP_ANONYMOUS being particularly noteworthy among them for
> being on track for POSIX Issue 8). See this commit:
> https://sourceware.org/git/?p=glibc.git;a=commit;h=954b8f38958de72c4712088735eb175118f17b51
>
> or my glibc bug report which triggered the change at
> https://sourceware.org/bugzilla/show_bug.cgi?id=29375
>
> This is because POSIX reserves MAP_ constants to the implementation, so
> their unconditional visibility in sys/mman.h is always allowed. This is
> also helpful for portable application writers.
>
> Other C libraries like musl already exhibit this behavior.
>
> Because mmap() is in a POSIX-specific header already, using it with any
> combination of MAP_ constants doesn't require feature test macros.
>
> Thanks for your consideration
>
>
> 0001-Remove-any-feature-test-macro-requirements-for-mmap.patch
>
> From 47632888627cac3d0547a969c55d3848b3b350b7 Mon Sep 17 00:00:00 2001
> From: John Scott<jscott@posteo.net>
> Date: Wed, 19 Oct 2022 06:25:25 -0400
> Subject: [PATCH] Remove any feature test macro requirements for mmap()
>
> No feature test macros are required anymore, not even
> to expose certain constants. See
> https://sourceware.org/bugzilla/show_bug.cgi?id=29375
> ---
> man2/mmap.2 | 35 -----------------------------------
> 1 file changed, 35 deletions(-)
>
> diff --git a/man2/mmap.2 b/man2/mmap.2
> index 9c343f2..8a2bddf 100644
> --- a/man2/mmap.2
> +++ b/man2/mmap.2
> @@ -32,8 +32,6 @@ Standard C library
> .BI " int " fd ", off_t " offset );
> .BI "int munmap(void *" addr ", size_t " length );
> .fi
> -.PP
> -See NOTES for information on feature test macro requirements.
> .SH DESCRIPTION
> .BR mmap ()
> creates a new mapping in the virtual address space of
> @@ -727,39 +725,6 @@ flag is specified, and
> .I addr
> is 0 (NULL), then the mapped address will be 0 (NULL).
> .PP
> -Certain
> -.I flags
> -constants are defined only if suitable feature test macros are defined
> -(possibly by default):
> -.B _DEFAULT_SOURCE
> -with glibc 2.19 or later;
We should keep some notice that in the past it was needed. BTW, is
glibc backporting the fix to old supported versions?
Thanks,
Alex
--
<http://www.alejandro-colomar.es/>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-10-20 12:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <9514ccd17ebc5fed7b685e4e163e725148176972.camel@posteo.net>
2022-10-20 12:31 ` [PATCH] Remove any mention of feature test macro requirements for mmap() Alejandro Colomar
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).