From 3c5aaa643bf32181bfd062be0b0d116f57afa4b1 Mon Sep 17 00:00:00 2001 From: "Dmitry V. Levin" Date: Fri, 19 Jan 2018 23:02:17 +0000 Subject: [PATCH] Fix ANY_WORDSIZE_LESS_THAN_KERNEL_LONG definition * defs.h (ANY_WORDSIZE_LESS_THAN_KERNEL_LONG): Rewrite without undefined behaviour. Fixes: f916793 ("Introduce ANY_WORDSIZE_LESS_THAN_KERNEL_LONG macro") --- defs.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/defs.h b/defs.h index 24226a01..20f593e0 100644 --- a/defs.h +++ b/defs.h @@ -844,9 +844,12 @@ extern unsigned current_klongsize; # endif #endif -#define ANY_WORDSIZE_LESS_THAN_KERNEL_LONG \ - (SIZEOF_KERNEL_LONG_T > 4 \ - && (SIZEOF_LONG < SIZEOF_KERNEL_LONG_T || !defined(current_wordsize))) +#if SIZEOF_KERNEL_LONG_T > 4 \ + && (SIZEOF_LONG < SIZEOF_KERNEL_LONG_T || !defined(current_wordsize)) +# define ANY_WORDSIZE_LESS_THAN_KERNEL_LONG 1 +#else +# define ANY_WORDSIZE_LESS_THAN_KERNEL_LONG 0 +#endif #define DECL_PRINTNUM(name) \ extern bool \