diff options
Diffstat (limited to 'sysdeps/unix/sysv')
-rw-r--r-- | sysdeps/unix/sysv/linux/alpha/bits/mman.h | 22 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/mman-linux.h | 26 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/mman-map-flags-generic.h | 24 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/hppa/bits/mman.h | 32 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/ia64/bits/mman.h | 4 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/mips/bits/mman.h | 26 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/powerpc/bits/mman.h | 24 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/sparc/bits/mman.h | 30 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86/bits/mman.h | 4 |
9 files changed, 82 insertions, 110 deletions
diff --git a/sysdeps/unix/sysv/linux/alpha/bits/mman.h b/sysdeps/unix/sysv/linux/alpha/bits/mman.h index f74a3bf9e4..fdfb6f5cd4 100644 --- a/sysdeps/unix/sysv/linux/alpha/bits/mman.h +++ b/sysdeps/unix/sysv/linux/alpha/bits/mman.h @@ -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 diff --git a/sysdeps/unix/sysv/linux/bits/mman-linux.h b/sysdeps/unix/sysv/linux/bits/mman-linux.h index cb5ad30ef9..1fb7f888aa 100644 --- a/sysdeps/unix/sysv/linux/bits/mman-linux.h +++ b/sysdeps/unix/sysv/linux/bits/mman-linux.h @@ -41,26 +41,22 @@ /* Sharing types (must choose one and only one of these). */ #define MAP_SHARED 0x01 /* Share changes. */ #define MAP_PRIVATE 0x02 /* Changes are private. */ -#ifdef __USE_MISC -# define MAP_SHARED_VALIDATE 0x03 /* Share changes and validate +#define MAP_SHARED_VALIDATE 0x03 /* Share changes and validate extension flags. */ -# define MAP_TYPE 0x0f /* Mask for type of mapping. */ -#endif +#define MAP_TYPE 0x0f /* Mask for type of mapping. */ /* Other flags. */ #define MAP_FIXED 0x10 /* Interpret addr exactly. */ -#ifdef __USE_MISC -# define MAP_FILE 0 -# ifdef __MAP_ANONYMOUS -# define MAP_ANONYMOUS __MAP_ANONYMOUS /* Don't use a file. */ -# else -# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ -# endif -# define MAP_ANON MAP_ANONYMOUS -/* When MAP_HUGETLB is set bits [26:31] encode the log2 of the huge page size. */ -# define MAP_HUGE_SHIFT 26 -# define MAP_HUGE_MASK 0x3f +#define MAP_FILE 0 +#ifdef __MAP_ANONYMOUS +# define MAP_ANONYMOUS __MAP_ANONYMOUS /* Don't use a file. */ +#else +# define MAP_ANONYMOUS 0x20 /* Don't use a file. */ #endif +#define MAP_ANON MAP_ANONYMOUS +/* When MAP_HUGETLB is set bits [26:31] encode the log2 of the huge page size. */ +#define MAP_HUGE_SHIFT 26 +#define MAP_HUGE_MASK 0x3f /* Flags to `msync'. */ #define MS_ASYNC 1 /* Sync memory asynchronously. */ diff --git a/sysdeps/unix/sysv/linux/bits/mman-map-flags-generic.h b/sysdeps/unix/sysv/linux/bits/mman-map-flags-generic.h index ffb28d6977..b93c3e051f 100644 --- a/sysdeps/unix/sysv/linux/bits/mman-map-flags-generic.h +++ b/sysdeps/unix/sysv/linux/bits/mman-map-flags-generic.h @@ -25,18 +25,16 @@ includes asm-generic/mman.h without any changes to the values of the MAP_* flags defined in that header. */ -#ifdef __USE_MISC -# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */ -# define MAP_DENYWRITE 0x00800 /* ETXTBSY. */ -# define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */ -# define MAP_LOCKED 0x02000 /* Lock the mapping. */ -# define MAP_NORESERVE 0x04000 /* Don't check for reservations. */ -# define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */ -# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ -# define MAP_STACK 0x20000 /* Allocation is for a stack. */ -# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ -# define MAP_SYNC 0x80000 /* Perform synchronous page +#define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */ +#define MAP_DENYWRITE 0x00800 /* ETXTBSY. */ +#define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */ +#define MAP_LOCKED 0x02000 /* Lock the mapping. */ +#define MAP_NORESERVE 0x04000 /* Don't check for reservations. */ +#define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */ +#define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ +#define MAP_STACK 0x20000 /* Allocation is for a stack. */ +#define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ +#define MAP_SYNC 0x80000 /* Perform synchronous page faults for the mapping. */ -# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap +#define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap underlying mapping. */ -#endif diff --git a/sysdeps/unix/sysv/linux/hppa/bits/mman.h b/sysdeps/unix/sysv/linux/hppa/bits/mman.h index 15167ba78f..acaa1cc3e7 100644 --- a/sysdeps/unix/sysv/linux/hppa/bits/mman.h +++ b/sysdeps/unix/sysv/linux/hppa/bits/mman.h @@ -24,24 +24,20 @@ /* Other flags. */ #define __MAP_ANONYMOUS 0x10 /* Don't use a file */ -#ifdef __USE_MISC -# define MAP_VARIABLE 0 -#endif +#define MAP_VARIABLE 0 /* These are Linux-specific. */ -#ifdef __USE_MISC -# define MAP_DENYWRITE 0x0800 /* ETXTBSY */ -# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable */ -# define MAP_LOCKED 0x2000 /* Pages are locked */ -# define MAP_NORESERVE 0x4000 /* Don't check for reservations */ -# define MAP_GROWSDOWN 0x8000 /* Stack-like segment */ -# define MAP_POPULATE 0x10000 /* Populate (prefault) pagetables */ -# define MAP_NONBLOCK 0x20000 /* Do not block on IO */ -# define MAP_STACK 0x40000 /* Create for process/thread stacks */ -# define MAP_HUGETLB 0x80000 /* Create a huge page mapping */ -# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap +#define MAP_DENYWRITE 0x0800 /* ETXTBSY */ +#define MAP_EXECUTABLE 0x1000 /* Mark it as an executable */ +#define MAP_LOCKED 0x2000 /* Pages are locked */ +#define MAP_NORESERVE 0x4000 /* Don't check for reservations */ +#define MAP_GROWSDOWN 0x8000 /* Stack-like segment */ +#define MAP_POPULATE 0x10000 /* Populate (prefault) pagetables */ +#define MAP_NONBLOCK 0x20000 /* Do not block on IO */ +#define MAP_STACK 0x40000 /* Create for process/thread stacks */ +#define MAP_HUGETLB 0x80000 /* Create a huge page mapping */ +#define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap underlying mapping. */ -#endif /* Advice to "madvise" */ #ifdef __USE_MISC @@ -50,10 +46,8 @@ #include <bits/mman-linux.h> -#ifdef __USE_MISC -# undef MAP_TYPE -# define MAP_TYPE 0x2b /* Mask for type of mapping */ -#endif +#undef MAP_TYPE +#define MAP_TYPE 0x2b /* Mask for type of mapping */ #undef MAP_FIXED #define MAP_FIXED 0x04 /* Interpret addr exactly */ diff --git a/sysdeps/unix/sysv/linux/ia64/bits/mman.h b/sysdeps/unix/sysv/linux/ia64/bits/mman.h index fec05c898c..b02a2770ae 100644 --- a/sysdeps/unix/sysv/linux/ia64/bits/mman.h +++ b/sysdeps/unix/sysv/linux/ia64/bits/mman.h @@ -24,9 +24,7 @@ But the kernel header is not namespace clean. */ /* These are Linux-specific. */ -#ifdef __USE_MISC -# define MAP_GROWSUP 0x00200 /* Register stack-like segment */ -#endif +#define MAP_GROWSUP 0x00200 /* Register stack-like segment */ #include <bits/mman-map-flags-generic.h> diff --git a/sysdeps/unix/sysv/linux/mips/bits/mman.h b/sysdeps/unix/sysv/linux/mips/bits/mman.h index c215ec9f5e..2334372ef5 100644 --- a/sysdeps/unix/sysv/linux/mips/bits/mman.h +++ b/sysdeps/unix/sysv/linux/mips/bits/mman.h @@ -24,25 +24,21 @@ But the kernel header is not namespace clean. */ /* These are Linux-specific. */ -#ifdef __USE_MISC -# define MAP_NORESERVE 0x0400 /* don't check for reservations */ -# define MAP_GROWSDOWN 0x1000 /* stack-like segment */ -# define MAP_DENYWRITE 0x2000 /* ETXTBSY */ -# define MAP_EXECUTABLE 0x4000 /* mark it as an executable */ -# define MAP_LOCKED 0x8000 /* pages are locked */ -# define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */ -# define MAP_NONBLOCK 0x20000 /* do not block on IO */ -# define MAP_STACK 0x40000 /* Allocation is for a stack. */ -# define MAP_HUGETLB 0x80000 /* Create huge page mapping. */ -# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap +#define MAP_NORESERVE 0x0400 /* don't check for reservations */ +#define MAP_GROWSDOWN 0x1000 /* stack-like segment */ +#define MAP_DENYWRITE 0x2000 /* ETXTBSY */ +#define MAP_EXECUTABLE 0x4000 /* mark it as an executable */ +#define MAP_LOCKED 0x8000 /* pages are locked */ +#define MAP_POPULATE 0x10000 /* populate (prefault) pagetables */ +#define MAP_NONBLOCK 0x20000 /* do not block on IO */ +#define MAP_STACK 0x40000 /* Allocation is for a stack. */ +#define MAP_HUGETLB 0x80000 /* Create huge page mapping. */ +#define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap underlying mapping. */ -#endif #define __MAP_ANONYMOUS 0x0800 /* Include generic Linux declarations. */ #include <bits/mman-linux.h> -#ifdef __USE_MISC -# define MAP_RENAME MAP_ANONYMOUS -#endif +#define MAP_RENAME MAP_ANONYMOUS diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/mman.h b/sysdeps/unix/sysv/linux/powerpc/bits/mman.h index 9ec01977c4..d6f83332df 100644 --- a/sysdeps/unix/sysv/linux/powerpc/bits/mman.h +++ b/sysdeps/unix/sysv/linux/powerpc/bits/mman.h @@ -26,21 +26,19 @@ #define PROT_SAO 0x10 /* Strong Access Ordering. */ /* These are Linux-specific. */ -#ifdef __USE_MISC -# define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */ -# define MAP_DENYWRITE 0x00800 /* ETXTBSY */ -# define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */ -# define MAP_LOCKED 0x00080 /* Lock the mapping. */ -# define MAP_NORESERVE 0x00040 /* Don't check for reservations. */ -# define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */ -# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ -# define MAP_STACK 0x20000 /* Allocation is for a stack. */ -# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ -# define MAP_SYNC 0x80000 /* Perform synchronous page +#define MAP_GROWSDOWN 0x00100 /* Stack-like segment. */ +#define MAP_DENYWRITE 0x00800 /* ETXTBSY */ +#define MAP_EXECUTABLE 0x01000 /* Mark it as an executable. */ +#define MAP_LOCKED 0x00080 /* Lock the mapping. */ +#define MAP_NORESERVE 0x00040 /* Don't check for reservations. */ +#define MAP_POPULATE 0x08000 /* Populate (prefault) pagetables. */ +#define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ +#define MAP_STACK 0x20000 /* Allocation is for a stack. */ +#define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ +#define MAP_SYNC 0x80000 /* Perform synchronous page faults for the mapping. */ -# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap +#define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap underlying mapping. */ -#endif /* Flags for `mlockall'. */ #define MCL_CURRENT 0x2000 /* Lock all currently mapped pages. */ diff --git a/sysdeps/unix/sysv/linux/sparc/bits/mman.h b/sysdeps/unix/sysv/linux/sparc/bits/mman.h index 6283e4074a..e7fc670159 100644 --- a/sysdeps/unix/sysv/linux/sparc/bits/mman.h +++ b/sysdeps/unix/sysv/linux/sparc/bits/mman.h @@ -25,22 +25,20 @@ /* These are Linux-specific. */ -#ifdef __USE_MISC -# define MAP_GROWSDOWN 0x0200 /* Stack-like segment. */ -# define MAP_DENYWRITE 0x0800 /* ETXTBSY */ -# define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */ -# define MAP_LOCKED 0x0100 /* Lock the mapping. */ -# define MAP_NORESERVE 0x0040 /* Don't check for reservations. */ -# define _MAP_NEW 0x80000000 /* Binary compatibility with SunOS. */ -# define MAP_POPULATE 0x8000 /* Populate (prefault) pagetables. */ -# define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ -# define MAP_STACK 0x20000 /* Allocation is for a stack. */ -# define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ -# define MAP_SYNC 0x80000 /* Perform synchronous page +#define MAP_GROWSDOWN 0x0200 /* Stack-like segment. */ +#define MAP_DENYWRITE 0x0800 /* ETXTBSY */ +#define MAP_EXECUTABLE 0x1000 /* Mark it as an executable. */ +#define MAP_LOCKED 0x0100 /* Lock the mapping. */ +#define MAP_NORESERVE 0x0040 /* Don't check for reservations. */ +#define _MAP_NEW 0x80000000 /* Binary compatibility with SunOS. */ +#define MAP_POPULATE 0x8000 /* Populate (prefault) pagetables. */ +#define MAP_NONBLOCK 0x10000 /* Do not block on IO. */ +#define MAP_STACK 0x20000 /* Allocation is for a stack. */ +#define MAP_HUGETLB 0x40000 /* Create huge page mapping. */ +#define MAP_SYNC 0x80000 /* Perform synchronous page faults for the mapping. */ -# define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap +#define MAP_FIXED_NOREPLACE 0x100000 /* MAP_FIXED but do not unmap underlying mapping. */ -#endif /* Flags for `mlockall'. */ #define MCL_CURRENT 0x2000 /* Lock all currently mapped pages. */ @@ -52,6 +50,4 @@ #include <bits/mman-linux.h> /* Other flags. */ -#ifdef __USE_MISC -# define MAP_RENAME MAP_ANONYMOUS -#endif +#define MAP_RENAME MAP_ANONYMOUS diff --git a/sysdeps/unix/sysv/linux/x86/bits/mman.h b/sysdeps/unix/sysv/linux/x86/bits/mman.h index 877be77336..e03227cc31 100644 --- a/sysdeps/unix/sysv/linux/x86/bits/mman.h +++ b/sysdeps/unix/sysv/linux/x86/bits/mman.h @@ -24,9 +24,7 @@ But the kernel header is not namespace clean. */ /* Other flags. */ -#ifdef __USE_MISC -# define MAP_32BIT 0x40 /* Only give out 32-bit addresses. */ -#endif +#define MAP_32BIT 0x40 /* Only give out 32-bit addresses. */ #include <bits/mman-map-flags-generic.h> |