This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] Linux: Introduce <bits/mman-shared.h>
On Fri, 24 Nov 2017, Carlos O'Donell wrote:
> I had a large patchset to go upstream to reorganize mman.h around
> a similar mman-shared.h, there is a mman-common.h upstream but it
> is not well used.
For cases where the values vary, bits/fcntl-linux.h sometimes uses __O_*
(architecture header may define before including bits/fcntl-linux.h to
override the default value), then defines O_* to __O_* (so meaning the
feature test macro conditionals on the public O_* conditionals don't get
duplicated).
I wonder about such an approach for allowing further sharing between hppa
and other architectures for constants in bits/mman-linux.h. Where the
public API is shared by all architectures, but the values vary, I think
it's desirable to avoid duplicating the feature test macro conditionals.
--
Joseph S. Myers
joseph@codesourcery.com