lkml.org 
[lkml]   [2004]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [ANNOUNCE] linux-libc-headers 2.6.8.1
On Mon Aug 30, 2004 at 01:07:57AM -0700, William Lee Irwin III wrote:
> On Mon Aug 30, 2004 at 12:24:22AM -0700, David S. Miller wrote:
> >> It has never been a constant, and any portable piece of
> >> software needs to evaluate it not at compile time.
> >> When I first did the sparc64 port, the biggest source of
> >> portability problems was of the "uses PAGE_SIZE in some way"
> >> nature.
> >> This is a positive change, we should break the build of these
> >> apps and thus get them fixed.
>
> On Mon, Aug 30, 2004 at 01:48:35AM -0600, Erik Andersen wrote:
> > There is no question that using PAGE_SIZE should be considered
> > harmful. But this particular change to the linux-libc-headers
> > makes it easy for the common case (bog standard x86) folk to keep
> > using a fixed PAGE_SIZE value, and keep writing crap code which
> > is now _guaranteed_ to blow chunks on mips, x86_64, etc.
> > I think outright removal of PAGE_SIZE from user space may be a
> > much better choice, with some sortof #error perhaps... Wouldn't
> > it be better for the whole world if people would get errors like
> > foo.c:10:2: #error "Don't use PAGE_SIZE, use sysconf(_SC_PAGESIZE)"
> > making people actually fix their code?
>
> In general people #define PAGE_SIZE (getpagesize()) or some such.

Then perhaps the right thing is for linux-libc-headers to always
provide such a define for PAGE_SIZE for _all_ architectures, not
just for those that happen to have variable PAGE_SIZE values.

-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@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:05    [W:1.253 / U:0.000 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site