2013-08-20 Joseph Myers <joseph@codesourcery.com>
+
+ * sysdeps/unix/sysv/linux/mmap64.c (__mmap64)
+ [MMAP2_PAGE_SHIFT == -1]: Use __getpagesize to determine page
+ size. Use __ffs to determine corresponding shift.
+
+2013-08-20 Joseph Myers <joseph@codesourcery.com>
Roland McGrath <roland@hack.frob.com>
* Makefile (INSTALL): Remove trailing blank lines from output of
#if MMAP2_PAGE_SHIFT == -1
if (page_shift == 0)
{
- int page_size = getpagesize ();
- while ((1 << ++page_shift) != page_size)
- ;
+ int page_size = __getpagesize ();
+ page_shift = __ffs (page_size) - 1;
}
#endif
if (offset & ((1 << page_shift) - 1))