Commit abe842eb authored by Dag-Erling Smrgrav's avatar Dag-Erling Smrgrav Committed by Linus Torvalds

[PATCH] Avoid namespace pollution in <asm/param.h>

In commit 3D59121003721a8fad11ee72e646fd9d3076b5679c, the x86 and x86-64
<asm/param.h> was changed to include <linux/config.h> for the
configurable timer frequency.

However, asm/param.h is sometimes used in userland (it is included
indirectly from <sys/param.h>), so your commit pollutes the userland
namespace with tons of CONFIG_FOO macros.  This greatly confuses
software packages (such as BusyBox) which use CONFIG_FOO macros
themselves to control the inclusion of optional features.

After a short exchange, Christoph approved this patch
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent f12f4d90
#include <linux/config.h>
#ifndef _ASMi386_PARAM_H #ifndef _ASMi386_PARAM_H
#define _ASMi386_PARAM_H #define _ASMi386_PARAM_H
#ifdef __KERNEL__ #ifdef __KERNEL__
# include <linux/config.h>
# define HZ CONFIG_HZ /* Internal kernel timer frequency */ # define HZ CONFIG_HZ /* Internal kernel timer frequency */
# define USER_HZ 100 /* .. some user interfaces are in "ticks" */ # define USER_HZ 100 /* .. some user interfaces are in "ticks" */
# define CLOCKS_PER_SEC (USER_HZ) /* like times() */ # define CLOCKS_PER_SEC (USER_HZ) /* like times() */
......
#include <linux/config.h>
#ifndef _ASMx86_64_PARAM_H #ifndef _ASMx86_64_PARAM_H
#define _ASMx86_64_PARAM_H #define _ASMx86_64_PARAM_H
#ifdef __KERNEL__ #ifdef __KERNEL__
# include <linux/config.h>
# define HZ CONFIG_HZ /* Internal kernel timer frequency */ # define HZ CONFIG_HZ /* Internal kernel timer frequency */
# define USER_HZ 100 /* .. some user interfaces are in "ticks */ # define USER_HZ 100 /* .. some user interfaces are in "ticks */
#define CLOCKS_PER_SEC (USER_HZ) /* like times() */ #define CLOCKS_PER_SEC (USER_HZ) /* like times() */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment