[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: PAGE_SIZE export



Martin Mares a écrit :
> Hello, world!\n
> 
> I recently got bitten several times by libc6-dev in unstable no longer
> exporting PAGE_SIZE on i386.

False, the glibc has nevered exported PAGE_SIZE, it has always been
provided by kernel headers.

> I disagree with the assertion that programs which rely on PAGE_SIZE are
> broken -- if they are architecture specific, they are perfectly correct to
> assume that PAGE_SIZE is a compile-time constant and there is just no valid
> reason for trying to hide PAGE_SIZE from them.

Could you please show me by quoting the code where the problem is?
PAGE_SIZE is defined as a constant on architectures that have a fixed
page size. See /usr/include/asm-$(arch)/page.h

What has changed is that some architectures have changed from a fixed
page size to a variable one.

> PAGE_SIZE has been a part of glibc API since ages (on architectures where
> it's a constant) and I don't think that Debian should be the one who takes
> decisions on what's in the API and what isn't, leaving us with packages which
> build (on the given architecture) with every libc except for the Debian one.

Again false, it has been part of the kernel API since ages. The kernel
API has changed, please blame the kernel developers, not us.

> Also, you have not hidden PAGE_SIZE, but replaced it by a non-constant
> expression. This breaks programs which assume that if PAGE_SIZE exists,
> it's a constant. So far, this was true on all architectures and although
> it hasn't been codified anywhere, so technically you are not breaking
> any standard, it was a common behavior and there are programs that
> rely on that, so I don't think it should be changed without a really
> strong reason.

The patch won't be reverted, because there is no patch which change
PAGE_SIZE... The only patch related to PATCH_SIZE is to make the glibc
buildable on those architectures. And it is necessary.

Bye,
Aurelien

-- 
  .''`.  Aurelien Jarno	            | GPG: 1024D/F1BCDB73
 : :' :  Debian developer           | Electrical Engineer
 `. `'   aurel32@debian.org         | aurelien@aurel32.net
   `-    people.debian.org/~aurel32 | www.aurel32.net



Reply to: