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§ion=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