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-Url: https://git.stricted.de/?a=commitdiff_plain;h=94f582f82a85a941678c80c60a3baa8187c74217;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.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 03ec2311fb29..acd583384bd9 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 a9e2863c2dbf..2d8c0f48f55e 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 14f7494280f0..ee7ca5de970c 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 b769961e6f23..d8e636e5607d 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