[PATCH] add __ASSUME_MREMAP

Roland McGrath roland@hack.frob.com
Tue Jan 15 00:15:00 GMT 2013


> -    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.

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 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.
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.


Thanks,
Roland



More information about the Libc-alpha mailing list