[PATCH] add __ASSUME_MREMAP

Pino Toscano toscano.pino@tiscali.it
Tue Jan 15 17:05:00 GMT 2013


Hi,

Alle martedì 15 gennaio 2013, Roland McGrath ha scritto:
> > -    HAVE_MREMAP                0 unless linux defined
> > +    HAVE_MREMAP                0 unless linux or __ASSUME_MREMAP
> > defined
> 
> Just simplify the condition to __ASSUME_MREMAP.
> We don't want anything like #ifdef linux in libc internals.

OK.

> But, I'm not really convinced that kernel-features.h is the right way
> to do this.  We have malloc-sysdep.h now, so that could just define
> HAVE_MREMAP directly.

I see, malloc-sysdep.h seems a better fit then, assuming it is fine 
using it outside of malloc itself.

> I do think it would be nice to have a single
> place define it rather than having both HAVE_REMAP for malloc and
> _G_HAVE_MREMAP for libio.

Yes, that is what my patch does. Attached there is a new version of it, 
updated after your feedback.

> But I never liked the use of
> kernel-features.h outside linux-specific files. OTOH, it is the
> status quo that it is used in a few generic files already. So
> perhaps using it a little more is not so bad.

I guess this would warrant an own discussion.

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mremap.diff
Type: text/x-patch
Size: 2824 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20130115/c8fcf270/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20130115/c8fcf270/attachment.sig>


More information about the Libc-alpha mailing list