mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-07 06:43:00 +03:00
Expose all MAP_ constants in <sys/mman.h> unconditionally (bug 29375)
POSIX reserves the MAP_ prefix for <sys/mman.h>, so there is no need to conditionalize their definitions on feature test macros.
This commit is contained in:
22
bits/mman.h
22
bits/mman.h
@@ -37,27 +37,21 @@
|
||||
/* Flags contain mapping type, sharing type and options. */
|
||||
|
||||
/* Mapping type (must choose one and only one of these). */
|
||||
#ifdef __USE_MISC
|
||||
# define MAP_FILE 0x0001 /* Mapped from a file or device. */
|
||||
# define MAP_ANON 0x0002 /* Allocated from anonymous virtual memory. */
|
||||
# define MAP_TYPE 0x000f /* Mask for type field. */
|
||||
# define MAP_ANONYMOUS MAP_ANON /* Linux name. */
|
||||
#endif
|
||||
#define MAP_FILE 0x0001 /* Mapped from a file or device. */
|
||||
#define MAP_ANON 0x0002 /* Allocated from anonymous virtual memory. */
|
||||
#define MAP_TYPE 0x000f /* Mask for type field. */
|
||||
#define MAP_ANONYMOUS MAP_ANON /* Linux name. */
|
||||
|
||||
/* Sharing types (must choose one and only one of these). */
|
||||
#ifdef __USE_MISC
|
||||
# define MAP_COPY 0x0020 /* Virtual copy of region at mapping time. */
|
||||
#endif
|
||||
#define MAP_COPY 0x0020 /* Virtual copy of region at mapping time. */
|
||||
#define MAP_SHARED 0x0010 /* Share changes. */
|
||||
#define MAP_PRIVATE 0x0000 /* Changes private; copy pages on write. */
|
||||
|
||||
/* Other flags. */
|
||||
#define MAP_FIXED 0x0100 /* Map address must be exactly as requested. */
|
||||
#ifdef __USE_MISC
|
||||
# define MAP_NOEXTEND 0x0200 /* For MAP_FILE, don't change file size. */
|
||||
# define MAP_HASSEMPHORE 0x0400 /* Region may contain semaphores. */
|
||||
# define MAP_INHERIT 0x0800 /* Region is retained after exec. */
|
||||
#endif
|
||||
#define MAP_NOEXTEND 0x0200 /* For MAP_FILE, don't change file size. */
|
||||
#define MAP_HASSEMPHORE 0x0400 /* Region may contain semaphores. */
|
||||
#define MAP_INHERIT 0x0800 /* Region is retained after exec. */
|
||||
|
||||
/* Advice to `madvise'. */
|
||||
#ifdef __USE_MISC
|
||||
|
Reference in New Issue
Block a user