[haiku-development] Re: [haiku-development] src_libs_compat_freebsd_network_compat_sys_param.h.diff

On 2008-05-28 at 15:52:05 [+0200], François Revol <revol@xxxxxxx> wrote:
> > "François Revol" <revol@xxxxxxx> wrote:
> > > I added it to limits.h, as it's supposed to be available there, but
> > > it
> > > should really be arch-dependant, and set from B_PAGE_SIZE, so from
> > > another include, but I'm not sure we are allowed to include OS.h
> > > from
> > > there.
> > > Ingo ?
> >
> > B_PAGE_SIZE should be defined in some arch header as well, actually.
> > And no, we don't want to mix POSIX with our headers too much.
> 
> Be used things like posix/be_errors.h and friends in Dano to have
> common stuff that are included in both posix and native headers...
> That still doesn't handle the arch specific stuff.
> Linux has headers including stuff from asm/

We have posix/arch/..., and I agree with Axel to rather add an 
arch-specific limits.h there. <OS.h> should simply include <limits.h> and 
define B_PAGE_SIZE to PAGE_SIZE or PAGESIZE.

Regarding error codes, the cleanest solution would be to put the POSIX 
error codes in <errno.h> and include that from <Errors.h>, so that Be API 
definitions don't pollute the POSIX namespace. This is somewhat ugly 
though, due to the way some POSIX error codes are defined ATM (synonymous 
to Be error codes).

CU, Ingo

Other related posts: