Re: CONFIG_* and user-visible #defines

Alan Cox (alan@lxorguk.ukuu.org.uk)
Tue, 25 Aug 1998 14:26:36 +0100 (BST)


> Is there a clean way to have dependencies on a CONFIG_* option in parts of
> the kernel headers that aren't #ifdef __KERNEL__ ?
>
> I need to set (at least) HZ and PAGE_SIZE depending on CONFIG_SUN3X, but
> those definitions appear to be visible outside the kernel so including
> linux/config.h seems like a bad idea..

Put a machine type in the gcc spec file for your target and do

#ifdef __sun3__

HZ is a bad one as it leaks everywhere. Andi Kleen had a patch that makes
HZ visible (not settable) via sysctl and /proc/sys

Alan

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html