]> granicus.if.org Git - strace/commitdiff
Fix ANY_WORDSIZE_LESS_THAN_KERNEL_LONG definition
authorDmitry V. Levin <ldv@altlinux.org>
Fri, 19 Jan 2018 23:02:17 +0000 (23:02 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Fri, 19 Jan 2018 23:02:17 +0000 (23:02 +0000)
* defs.h (ANY_WORDSIZE_LESS_THAN_KERNEL_LONG): Rewrite without undefined
behaviour.

Fixes: f916793 ("Introduce ANY_WORDSIZE_LESS_THAN_KERNEL_LONG macro")
defs.h

diff --git a/defs.h b/defs.h
index 24226a01ec3506492b0f9e4012688d7685708c8f..20f593e0d3bcb0ec908706c976f43396b72aec75 100644 (file)
--- 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                                                            \