From 17e961d9c708ab202760ce830f8efe73e91bb129 Mon Sep 17 00:00:00 2001 From: Carmelo Amoroso Date: Wed, 26 Mar 2008 11:58:14 +0000 Subject: Enable remap_file_pages prototype controlled by __USE_GNU define as well as mremap, instead of __USE_MISC according to glibc. Missing prototype was spotted out by Peter Mazinger --- include/sys/mman.h | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) (limited to 'include/sys/mman.h') diff --git a/include/sys/mman.h b/include/sys/mman.h index 76c2009bf..7bb1595bb 100644 --- a/include/sys/mman.h +++ b/include/sys/mman.h @@ -134,18 +134,9 @@ static inline int mlock (__const void *__addr, size_t __len) { return 0; } static inline int munlock (__const void *__addr, size_t __len) { return 0; } static inline int mlockall (int __flags) { return 0; } static inline int munlockall (void) { return 0; } - #endif #ifdef __USE_MISC -/* Remap pages mapped by the range [ADDR,ADDR+OLD_LEN) to new length - NEW_LEN. If MREMAP_MAYMOVE is set in FLAGS the returned address - may differ from ADDR. If MREMAP_FIXED is set in FLAGS the function - takes another paramter which is a fixed address at which the block - resides after a successful call. */ -extern void *mremap (void *__addr, size_t __old_len, size_t __new_len, - int __flags, ...) __THROW; - /* mincore returns the memory residency status of the pages in the current process's address space specified by [start, start + len). The status is returned in a vector of bytes. The least significant @@ -153,14 +144,22 @@ extern void *mremap (void *__addr, size_t __old_len, size_t __new_len, it is zero. */ extern int mincore (void *__start, size_t __len, unsigned char *__vec) __THROW; +#endif + +#ifdef __USE_GNU +/* Remap pages mapped by the range [ADDR,ADDR+OLD_LEN) to new length + NEW_LEN. If MREMAP_MAYMOVE is set in FLAGS the returned address + may differ from ADDR. If MREMAP_FIXED is set in FLAGS the function + takes another paramter which is a fixed address at which the block + resides after a successful call. */ +extern void *mremap (void *__addr, size_t __old_len, size_t __new_len, + int __flags, ...) __THROW; -#if 0 /* Remap arbitrary pages of a shared backing store within an existing VMA. */ extern int remap_file_pages (void *__start, size_t __size, int __prot, size_t __pgoff, int __flags) __THROW; #endif -#endif /* Open shared memory segment. */ -- cgit v1.2.3