提交 94f582f8 编写于 作者: R Robert P. J. Day 提交者: Linus Torvalds

Force erroneous inclusions of compiler-*.h files to be errors

Replace worthless comments with actual preprocessor errors when including
the wrong versions of the compiler.h files.

[akpm@linux-foundation.org: make it work]
Signed-off-by: NRobert P. J. Day <rpjday@mindspring.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 a36a151e
/* Never include this file directly. Include <linux/compiler.h> instead. */
#ifndef __LINUX_COMPILER_H
#error "Please don't include <linux/compiler-gcc.h> directly, include <linux/compiler.h> instead."
#endif
/*
* Common definitions for all gcc versions go here.
......
/* Never include this file directly. Include <linux/compiler.h> instead. */
#ifndef __LINUX_COMPILER_H
#error "Please don't include <linux/compiler-gcc3.h> directly, include <linux/compiler.h> instead."
#endif
/* These definitions are for GCC v3.x. */
#include <linux/compiler-gcc.h>
......
/* Never include this file directly. Include <linux/compiler.h> instead. */
#ifndef __LINUX_COMPILER_H
#error "Please don't include <linux/compiler-gcc4.h> directly, include <linux/compiler.h> instead."
#endif
/* These definitions are for GCC v4.x. */
#include <linux/compiler-gcc.h>
......
/* Never include this file directly. Include <linux/compiler.h> instead. */
#ifndef __LINUX_COMPILER_H
#error "Please don't include <linux/compiler-intel.h> directly, include <linux/compiler.h> instead."
#endif
#ifdef __ECC
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册