This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: Add x32 dummy sysctl


On Thu, May 17, 2012 at 1:09 PM, Roland McGrath <roland@hack.frob.com> wrote:
>> X32 doesn't have _sysctl system call. ?This patch adds a dummy. ?OK
>> to install?
>
> Then you shouldn't install <sys/sysctl.h> either. ?Since these are added to
> sysdep_routines and sysdep_headers in sysdeps/unix/sysv/linux/Makefile and
> a linux/x32-specific Makefile would be before it, I think what you need to
> do is set some variable in linux/x32/Makefile to say there's no sysctl and
> then have linux/Makefile check that.
>
> That's hacky, but it's better than moving the settings into copies
> in every other linux/<machine>/Makefile.
>
> Alternatively and arguably cleaner though a little less obvious:
> move those additions from linux/Makefile into linux/sysctl.mk
> and give linux/Makefile:
>
> include $(firstword $(wildcard $(sysdirs:=/sysctl.mk)))
>
> Then you can add a linux/x32/sysctl.mk to override linux/sysctl.mk
> with a dummy.
>
> I like the latter one better. ?It certainly needs thorough comments.
>

How about adding a _sysctl to return -1 and set errno to ENOSYS?

-- 
H.J.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]