asm/page.h
Dan Nicholson
dbn.lists at gmail.com
Tue Apr 22 13:21:49 MDT 2008
On Tue, Apr 22, 2008 at 12:12 PM, Jeremy Huntwork
<jhuntwork at linuxfromscratch.org> wrote:
> On Tue, Apr 22, 2008 at 01:09:10PM -0600, Jeremy Huntwork wrote:
> > I removed the line where it includes the header and Perl built
> > successfully and all tests passed. This is also what Gentoo does:
> > https://bugs.gentoo.org/show_bug.cgi?id=168312
> >
> > However, there's likely a better and more robust solution. I haven't dug
> > any deeper yet.
>
> Actually, removing the line may just be good enough. PAGE_SIZE doesn't
> really seem to be used anywhere relevant:
>
> grep PAGE_SIZE . -R
> ./ext/IPC/SysV/SysV.xs:/* Required in BSDI to get PAGE_SIZE definition
> for SHMLBA.
> ./os2/os2.c: "PAGE_SIZE",
> ./os2/Changes: MAX_WAIT, MIN_SLICE, MAX_SLICE, PAGE_SIZE,
> ./pod/perl571delta.pod:For getpagesize(), though you should prefer
> POSIX::sysconf(_SC_PAGE_SIZE))
> ./README.os2: MAX_WAIT, MIN_SLICE, MAX_SLICE, PAGE_SIZE,
> ./perlio.c:#if defined(HAS_SYSCONF) && (defined(_SC_PAGESIZE) ||
> defined(_SC_PAGE_SIZE))
> ./perlio.c: page_size = sysconf(_SC_PAGE_SIZE);
Cool. I guess it's just an extraneous #include in SysV.xs. Here's
everything defined in my 2.6.22 asm/page.h (on x86):
#define PAGE_SHIFT 12
#define PAGE_SIZE (1UL << PAGE_SHIFT)
#define PAGE_MASK (~(PAGE_SIZE-1))
#define LARGE_PAGE_MASK (~(LARGE_PAGE_SIZE-1))
#define LARGE_PAGE_SIZE (1UL << PMD_SHIFT)
So, I suppose you could grep for some regex (PAGE_(SHIFT|SIZE|MASK))
of those macros to be safe.
--
Dan
More information about the lfs-dev
mailing list