> Date: Thu, 10 Jul 2014 11:50:18 -0700
> From: Matthew Dempsky <[email protected]>
> 
> The Austin Group this morning accepted proposed wording to standardize
> both MAP_ANON and MAP_ANONYMOUS, recognizing that neither was clearly
> more popular than the other among applications, and that there's
> precedent in POSIX for simply standardizing multiple spellings for a
> feature when both are common and trivial for implementations to
> provide (e.g., PAGE_SIZE and PAGESIZE).
> 
> Diff below defines MAP_ANONYMOUS as a synonym for MAP_ANON, keeping
> MAP_ANON as canonical in following BSD heritage.
> 
> ok?

ok kettenis@

> Index: lib/libc/sys/mmap.2
> ===================================================================
> RCS file: /cvs/src/lib/libc/sys/mmap.2,v
> retrieving revision 1.50
> diff -u -p -r1.50 mmap.2
> --- lib/libc/sys/mmap.2       2 Jul 2014 22:22:35 -0000       1.50
> +++ lib/libc/sys/mmap.2       10 Jul 2014 18:32:59 -0000
> @@ -121,7 +121,7 @@ Sharing, mapping type, and options are s
>  .Fa flags
>  argument by OR'ing the following values.
>  Exactly one of the first two values must be specified:
> -.Bl -tag -width MAP_PRIVATE -offset indent
> +.Bl -tag -width MAP_ANONYMOUS -offset indent
>  .It Dv MAP_PRIVATE
>  Modifications are private.
>  .It Dv MAP_SHARED
> @@ -129,13 +129,16 @@ Modifications are shared.
>  .El
>  .Pp
>  Any combination of the following flags may additionally be used:
> -.Bl -tag -width MAP_PRIVATE -offset indent
> +.Bl -tag -width MAP_ANONYMOUS -offset indent
>  .It Dv MAP_ANON
>  Map anonymous memory not associated with any specific file.
>  The file descriptor used for creating
>  .Dv MAP_ANON
>  must currently be \-1 indicating no name is associated with the
>  region.
> +.It Dv MAP_ANONYMOUS
> +Synonym for
> +.Dv MAP_ANON .
>  .It Dv MAP_FIXED
>  Demand that the mapping is placed at
>  .Fa addr ,
> @@ -157,7 +160,7 @@ source compatibility with code written f
>  but are not recommended for use in new
>  .Ox
>  code:
> -.Bl -tag -width MAP_PRIVATE -offset indent
> +.Bl -tag -width MAP_ANONYMOUS -offset indent
>  .It Dv MAP_COPY
>  Modifications are private and, unlike
>  .Dv MAP_PRIVATE ,
> Index: sys/sys/mman.h
> ===================================================================
> RCS file: /cvs/src/sys/sys/mman.h,v
> retrieving revision 1.25
> diff -u -p -r1.25 mman.h
> --- sys/sys/mman.h    27 Jun 2014 20:50:43 -0000      1.25
> +++ sys/sys/mman.h    10 Jul 2014 18:32:59 -0000
> @@ -57,6 +57,7 @@
>  #define      MAP_FIXED       0x0010  /* map addr must be exactly as 
> requested */
>  #define      __MAP_NOREPLACE 0x0800  /* fail if address not available */
>  #define      MAP_ANON        0x1000  /* allocated from memory, swap space */
> +#define      MAP_ANONYMOUS   MAP_ANON        /* alternate POSIX spelling */
>  
>  #define      MAP_FLAGMASK    0x1ff7
>  
> 
> 

Reply via email to