From: Robert P. J. Day Date: Wed, 17 Oct 2007 06:26:11 +0000 (-0700) Subject: Force erroneous inclusions of compiler-*.h files to be errors X-Git-Tag: v3.12-rc1~25782 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=94f582f82a85a941678c80c60a3baa8187c74217;p=kernel%2Fkernel-generic.git 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h index 03ec231..acd5833 100644 --- a/include/linux/compiler-gcc.h +++ b/include/linux/compiler-gcc.h @@ -1,4 +1,6 @@ -/* Never include this file directly. Include instead. */ +#ifndef __LINUX_COMPILER_H +#error "Please don't include directly, include instead." +#endif /* * Common definitions for all gcc versions go here. diff --git a/include/linux/compiler-gcc3.h b/include/linux/compiler-gcc3.h index a9e2863..2d8c0f4 100644 --- a/include/linux/compiler-gcc3.h +++ b/include/linux/compiler-gcc3.h @@ -1,4 +1,6 @@ -/* Never include this file directly. Include instead. */ +#ifndef __LINUX_COMPILER_H +#error "Please don't include directly, include instead." +#endif /* These definitions are for GCC v3.x. */ #include diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index 14f74942..ee7ca5d 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h @@ -1,4 +1,6 @@ -/* Never include this file directly. Include instead. */ +#ifndef __LINUX_COMPILER_H +#error "Please don't include directly, include instead." +#endif /* These definitions are for GCC v4.x. */ #include diff --git a/include/linux/compiler-intel.h b/include/linux/compiler-intel.h index b769961..d8e636e 100644 --- a/include/linux/compiler-intel.h +++ b/include/linux/compiler-intel.h @@ -1,4 +1,6 @@ -/* Never include this file directly. Include instead. */ +#ifndef __LINUX_COMPILER_H +#error "Please don't include directly, include instead." +#endif #ifdef __ECC