> Erk. Why would they ship a header that errors instead of no file at all?

It seems the idea of not shipping it was proposed but dismissed:
https://libc-alpha.sourceware.narkive.com/NmybqkkT/patch-add-x32-dummy-sysctl#post5

As I parse this: attempting to use sysctl on x32 is a clear error, it
doesn't exist. glibc wants to fail on compile, not runtime - and it
also doesn't want the developer missing the fact that sysctl is no
longer being used, hence the code paths are different; otherwise, you
might have decided to rely on randomization via sysctl and thought
that was fine for all x86 Linux ABIs, including x32. The way to do
that is to #error on include.

The "slightly annoying" result is that we need an x32-specific define
to prevent sysctl.h being included on x32. I suggested config.guess.h
because that seems to block any future use (notwithstanding the idea
that there *shouldn't* be any future use...).

--
Laurence "GreenReaper" Parry

Reply via email to