This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: question on sparc SHMLBA helper function
- From: Roland McGrath <roland at hack dot frob dot com>
- To: David Miller <davem at davemloft dot net>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 16 Mar 2012 14:35:06 -0700 (PDT)
- Subject: Re: question on sparc SHMLBA helper function
- References: <20120316.000703.198160170819711056.davem@davemloft.net>
> I considered putting something like:
>
> extern int __getshmlba (void) __attribute__ ((__const__));
> libc_hidden_proto (__getshmlba)
>
> in include/unistd.h since that's where __getpagesize is right now, but
> I'm not so sure about putting a sparc specific interface there.
We don't really have a good way to address that so far. It won't
materially hurt anything to put the declaration in the shared file.
If there is only one case, I'm not sure it's really worth trying to
come up with a cleaner answer. I think it could be hairy. The thing
that comes to mind is supporting sysdeps/.../include directories with
-I switches. But that both makes things even more fiddly, and seems
like it could well have some unintended consequences I'm not thinking
of at the moment.
Perhaps we can avoid the issue entirely. I see exactly one use
of SHMLBA, in shmat.c, and I really don't understand what that
logic is intended to do. It is sorely lacking a comment.
> +__getshmlba(void)
Missing space here.
Thanks,
Roland