Re: 2.6.18 Headers - Long

From: Erik Andersen
Date: Fri Jul 14 2006 - 16:04:36 EST


On Fri Jul 14, 2006 at 12:28:34PM -0700, Jim Gifford wrote:
> Unfortunately, a lot programs out there are using page.h, and a lot of
> people are using that in their programs. The 2 program I know for sure
> that use page.h are glibc and util-linux.

util-linux should be using getpagesize() or sysconf(_SC_PAGESIZE)
from the C library. And libc should be getting the page size
within ldso (or _start for static apps) by parsing the AT_PAGESZ
entry from the ELF auxiliary vector. Should that be 0 (i.e.
because the kernel is horribly broken) then and only then should
libc fall back to guessing, i.e. a page size of 4k. A quick check
shows that glibc, uClibc, and klibc all get this right. But you
are right, that util-linux looks to have this wrong in a few
places. I expect fixing the kernel headers will get that fixed
in short order. :-)

-Erik

--
Erik B. Andersen http://codepoet-consulting.com/
--This message was written using 73% post-consumer electrons--
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/