From 67d54eafc871f30b3209585b2198e8d0fd848679 Mon Sep 17 00:00:00 2001 From: Bart Van Assche Date: Sun, 26 Apr 2009 18:06:10 +0000 Subject: [PATCH] Modified a two-line preprocessor statement into a single-line statement and added a comment that explains why this has been done. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@801 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/scst_proc.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/scst/src/scst_proc.c b/scst/src/scst_proc.c index 5ec135887..938dede5e 100644 --- a/scst/src/scst_proc.c +++ b/scst/src/scst_proc.c @@ -176,19 +176,25 @@ static DEFINE_MUTEX(scst_proc_mutex); #include -#if !defined(CONFIG_PPC) && (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)) && \ - (!defined(RHEL_RELEASE_CODE) || RHEL_RELEASE_CODE -0 < 5 * 256 + 3) +#if !defined(CONFIG_PPC) && (LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 22)) && (!defined(RHEL_RELEASE_CODE) || RHEL_RELEASE_CODE -0 < 5 * 256 + 3) /* * If strcasecmp() and strncasecmp() have already been declared in * , do not redefine these functions. Declarations for these * functions are present in the header of the following * kernels: - * - The kernel headers on PPC for all kernel versions supported by SCST. + * - The PPC kernel headers for all kernel versions supported by SCST. * - Kernel version 2.6.22 and later for all architectures. * - RHEL 5.3 and later. * - * We can't use RHEL_RELEASE_CODE(5, 3), because it triggers an error on - * non-RHEL/CentOS systems, because it expands to "< (5,3)" + * Notes about the above preprocessor statement: + * - We can't use RHEL_RELEASE_CODE(5, 3) because it would trigger an error on + * non-RHEL/CentOS systems -- this expression would expand to "(5,3)". + * - There is no space between the minus sign and the zero in the expression + * "RHEL_RELEASE_CODE -0" such that it expands to a syntactically valid + * expression on non-RHEL/CentOS systems ("-0"). + * - The above statement has been put on one long line because as of r800 + * scripts/specialize-patch does not yet handle multi-line preprocessor + * statements correctly. */ #if defined(CONFIG_SCST_DEBUG) || defined(CONFIG_SCST_TRACING)