1
0
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:
Andreas Schwab
2022-08-16 15:18:11 +02:00
parent 589eda82bb
commit 954b8f3895
10 changed files with 90 additions and 124 deletions

View File

@@ -26,19 +26,17 @@
#define __MAP_ANONYMOUS 0x10 /* Don't use a file. */
/* These are Linux-specific. */
#ifdef __USE_MISC
# define MAP_GROWSDOWN 0x01000 /* Stack-like segment. */
# define MAP_DENYWRITE 0x02000 /* ETXTBSY */
# define MAP_EXECUTABLE 0x04000 /* Mark it as an executable. */
# define MAP_LOCKED 0x08000 /* Lock the mapping. */
# define MAP_NORESERVE 0x10000 /* Don't check for reservations. */
# define MAP_POPULATE 0x20000 /* Populate (prefault) pagetables. */
# define MAP_NONBLOCK 0x40000 /* Do not block on IO. */
# define MAP_STACK 0x80000 /* Allocation is for a stack. */
# define MAP_HUGETLB 0x100000 /* Create huge page mapping. */
# define MAP_FIXED_NOREPLACE 0x200000 /* MAP_FIXED but do not unmap
#define MAP_GROWSDOWN 0x01000 /* Stack-like segment. */
#define MAP_DENYWRITE 0x02000 /* ETXTBSY */
#define MAP_EXECUTABLE 0x04000 /* Mark it as an executable. */
#define MAP_LOCKED 0x08000 /* Lock the mapping. */
#define MAP_NORESERVE 0x10000 /* Don't check for reservations. */
#define MAP_POPULATE 0x20000 /* Populate (prefault) pagetables. */
#define MAP_NONBLOCK 0x40000 /* Do not block on IO. */
#define MAP_STACK 0x80000 /* Allocation is for a stack. */
#define MAP_HUGETLB 0x100000 /* Create huge page mapping. */
#define MAP_FIXED_NOREPLACE 0x200000 /* MAP_FIXED but do not unmap
underlying mapping. */
#endif
/* Flags for `mlockall'. */
#define MCL_CURRENT 8192