]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Move MREMAP_* to bits/mman-shared.h.
authorJoseph Myers <joseph@codesourcery.com>
Mon, 1 Oct 2018 20:30:57 +0000 (20:30 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Mon, 1 Oct 2018 20:30:57 +0000 (20:30 +0000)
The MREMAP_* flags are identical between bits/mman-linux.h and the
hppa bits/mman.h; thus, they should be in bits/mman-shared.h instead
to avoid unnecessary duplication.  This patch moves them there.

Tested for x86_64, and with build-many-glibcs.py.

* sysdeps/unix/sysv/linux/bits/mman-linux.h [__USE_GNU]
(MREMAP_MAYMOVE): Do not define here.
[__USE_GNU] (MREMAP_FIXED): Likewise.
* sysdeps/unix/sysv/linux/bits/mman-shared.h [__USE_GNU]
(MREMAP_MAYMOVE): Define here instead.
[__USE_GNU] (MREMAP_FIXED): Likewise.
* sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_GNU]
(MREMAP_MAYMOVE): Remove.
[__USE_GNU] (MREMAP_FIXED): Likewise.

ChangeLog
sysdeps/unix/sysv/linux/bits/mman-linux.h
sysdeps/unix/sysv/linux/bits/mman-shared.h
sysdeps/unix/sysv/linux/hppa/bits/mman.h

index 07760299e68b287df0a7ffd7968ad2fee803f0f9..1fdd50a24c2629f064f8cba8d1e45814c12600d9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2018-10-01  Joseph Myers  <joseph@codesourcery.com>
+
+       * sysdeps/unix/sysv/linux/bits/mman-linux.h [__USE_GNU]
+       (MREMAP_MAYMOVE): Do not define here.
+       [__USE_GNU] (MREMAP_FIXED): Likewise.
+       * sysdeps/unix/sysv/linux/bits/mman-shared.h [__USE_GNU]
+       (MREMAP_MAYMOVE): Define here instead.
+       [__USE_GNU] (MREMAP_FIXED): Likewise.
+       * sysdeps/unix/sysv/linux/hppa/bits/mman.h [__USE_GNU]
+       (MREMAP_MAYMOVE): Remove.
+       [__USE_GNU] (MREMAP_FIXED): Likewise.
+
 2018-09-28  Joseph Myers  <joseph@codesourcery.com>
 
        * math/fromfp.h: Do not include <math_private.h>.
index 70edeb6d60ffd95ad185217898b73109ab7f7ef3..09b118bb70be0af474c7a4055bc517a9abd78bb9 100644 (file)
 #define MS_SYNC                4               /* Synchronous memory sync.  */
 #define MS_INVALIDATE  2               /* Invalidate the caches.  */
 
-/* Flags for `mremap'.  */
-#ifdef __USE_GNU
-# define MREMAP_MAYMOVE        1
-# define MREMAP_FIXED  2
-#endif
-
 /* Advice to `madvise'.  */
 #ifdef __USE_MISC
 # define MADV_NORMAL     0     /* No further special treatment.  */
index d15ba95c9dc6ee597bded16772d525ff17027a20..54823e37246b27e7cbc73564012927a361234ac9 100644 (file)
 #endif
 
 #ifdef __USE_GNU
+/* Flags for mremap.  */
+# define MREMAP_MAYMOVE        1
+# define MREMAP_FIXED  2
+
 /* Flags for memfd_create.  */
 # ifndef MFD_CLOEXEC
 #  define MFD_CLOEXEC 1U
index 1c7d3708e65706f1bc707c2f0c15fc4df4b51b51..fd07a658682c6b4da566690847a1ef2ee085e01a 100644 (file)
 #define MCL_FUTURE     2               /* Lock all future mappings */
 #define MCL_ONFAULT    4               /* Lock all pages that are faulted in */
 
-/* Flags for `mremap'.  */
-#ifdef __USE_GNU
-# define MREMAP_MAYMOVE 1
-# define MREMAP_FIXED  2
-#endif
-
 /* Advice to "madvise"  */
 #ifdef __USE_MISC
 # define MADV_NORMAL     0     /* No further special treatment */