All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: mmap(2): MAP_ANON
       [not found] <90ecc432-951f-b83b-e5cb-487fa871a1ec@gmx.de>
@ 2020-04-14 11:23 ` Michael Kerrisk (man-pages)
  2020-04-14 16:01   ` Heinrich Schuchardt
  0 siblings, 1 reply; 3+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-04-14 11:23 UTC (permalink / raw)
  To: Heinrich Schuchardt, linux-man; +Cc: mtk.manpages

On 5/24/18 9:03 PM, Heinrich Schuchardt wrote:
> Hello Michael,
> 
> in the mmap(2) man page MAP_ANON is described as deprecated.
> 
> When I look at the NetBSD manpage
> http://netbsd.gw.com/cgi-bin/man-cgi?mmap+2+NetBSD-current
> I found that MAP_ANONYMOUS is not defined.
> 
> https://www.dragonflybsd.org/cgi/web-man?command=mmap&section=2
> indicates MAP_ANONYMOUS is an alias for MAP_ANON and is provided for
> compatibility.
> 
> https://man.openbsd.org/mmap.2 also knows MAP_ANONYMOUS as a synonym.
> 
> https://www.unix.com/man-page/osx/2/mmap/ does not know MAP_ANONYMOUS.
> 
> So shouldn't the man page indicate that MAP_ANON is to be favored to
> write portable code? And correspondingly mark MAP_ANONYMOUS as synonym
> only kept for compatibility.
> 
> The Open Group Base Specifications Issue 7, 2018 Edition does not
> reference either of both. So both values are not POSIX but it is not
> correct to describe them as Linux only.

The text saying that MAP_ANON is deprecated is ancient (at least
20 years old). I don't know why that text was added.

Things are not simple though: it looks like there's at least
one historical implementation (HP-US) that defines MAP_ANONYMOUS
but not MAP_ANON.

I've applied the patch below.

Thanks,

Michael




-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mmap(2): MAP_ANON
  2020-04-14 11:23 ` mmap(2): MAP_ANON Michael Kerrisk (man-pages)
@ 2020-04-14 16:01   ` Heinrich Schuchardt
  2020-04-14 19:10     ` Michael Kerrisk (man-pages)
  0 siblings, 1 reply; 3+ messages in thread
From: Heinrich Schuchardt @ 2020-04-14 16:01 UTC (permalink / raw)
  To: Michael Kerrisk (man-pages), linux-man

On 2020-04-14 13:23, Michael Kerrisk (man-pages) wrote:
> On 5/24/18 9:03 PM, Heinrich Schuchardt wrote:
>> Hello Michael,
>>
>> in the mmap(2) man page MAP_ANON is described as deprecated.
>>
>> When I look at the NetBSD manpage
>> http://netbsd.gw.com/cgi-bin/man-cgi?mmap+2+NetBSD-current
>> I found that MAP_ANONYMOUS is not defined.
>>
>> https://www.dragonflybsd.org/cgi/web-man?command=mmap&section=2
>> indicates MAP_ANONYMOUS is an alias for MAP_ANON and is provided for
>> compatibility.
>>
>> https://man.openbsd.org/mmap.2 also knows MAP_ANONYMOUS as a synonym.
>>
>> https://www.unix.com/man-page/osx/2/mmap/ does not know MAP_ANONYMOUS.
>>
>> So shouldn't the man page indicate that MAP_ANON is to be favored to
>> write portable code? And correspondingly mark MAP_ANONYMOUS as synonym
>> only kept for compatibility.
>>
>> The Open Group Base Specifications Issue 7, 2018 Edition does not
>> reference either of both. So both values are not POSIX but it is not
>> correct to describe them as Linux only.
>
> The text saying that MAP_ANON is deprecated is ancient (at least
> 20 years old). I don't know why that text was added.
>
> Things are not simple though: it looks like there's at least
> one historical implementation (HP-US) that defines MAP_ANONYMOUS
> but not MAP_ANON.
>
> I've applied the patch below.

Somehow the patch got lost in the mail. Couldn't identify it upstream
(https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git) either.

Best regards

Heinrich

>
> Thanks,
>
> Michael



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: mmap(2): MAP_ANON
  2020-04-14 16:01   ` Heinrich Schuchardt
@ 2020-04-14 19:10     ` Michael Kerrisk (man-pages)
  0 siblings, 0 replies; 3+ messages in thread
From: Michael Kerrisk (man-pages) @ 2020-04-14 19:10 UTC (permalink / raw)
  To: Heinrich Schuchardt; +Cc: linux-man

> > I've applied the patch below.
>
> Somehow the patch got lost in the mail. Couldn't identify it upstream
> (https://git.kernel.org/pub/scm/docs/man-pages/man-pages.git) either.

Ooops. This time...

Cheers,

Michael

diff --git a/man2/mmap.2 b/man2/mmap.2
index 963776e80..667cf311d 100644
--- a/man2/mmap.2
+++ b/man2/mmap.2
@@ -193,8 +193,8 @@ is set.
 .TP
 .B MAP_ANON
 Synonym for
-.BR MAP_ANONYMOUS .
-Deprecated.
+.BR MAP_ANONYMOUS ;
+provided for compatibility with other implementations.
 .TP
 .B MAP_ANONYMOUS
 The mapping is not backed by any file;

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-04-14 19:30 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <90ecc432-951f-b83b-e5cb-487fa871a1ec@gmx.de>
2020-04-14 11:23 ` mmap(2): MAP_ANON Michael Kerrisk (man-pages)
2020-04-14 16:01   ` Heinrich Schuchardt
2020-04-14 19:10     ` Michael Kerrisk (man-pages)

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.