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: Robert P. J. Day <rpjday@mindspring.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Robert P. J. Day 2007-10-16 23:26:11 -07:00 committed by Linus Torvalds
parent a36a151e79
commit 94f582f82a
4 changed files with 12 additions and 4 deletions

View File

@ -1,4 +1,6 @@
/* 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.

View File

@ -1,4 +1,6 @@
/* 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>

View File

@ -1,4 +1,6 @@
/* 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>

View File

@ -1,4 +1,6 @@
/* 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