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


"H.J. Lu" <hjl.tools@gmail.com> writes:

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

Isn't failure to build better for a system call that has never been nor
will ever be supported on an architecture?

At least on linux sysctl as a separate system call is dead.  We are just
gradually taking our time removing old cruft.

Eric


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