This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] add __ASSUME_MREMAP
- From: Roland McGrath <roland at hack dot frob dot com>
- To: Pino Toscano <toscano dot pino at tiscali dot it>
- Cc: libc-alpha at sourceware dot org
- Date: Mon, 14 Jan 2013 16:15:18 -0800 (PST)
- Subject: Re: [PATCH] add __ASSUME_MREMAP
- References: <email@example.com>
> - 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.