]> granicus.if.org Git - strace/commitdiff
defs.h: simplify SUPPORTED_PERSONALITIES definition
authorDmitry V. Levin <ldv@altlinux.org>
Mon, 8 Aug 2016 22:00:06 +0000 (22:00 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Mon, 8 Aug 2016 23:28:29 +0000 (23:28 +0000)
* defs.h: Group definition of SUPPORTED_PERSONALITIES by value.

defs.h

diff --git a/defs.h b/defs.h
index 3d504ae3df325fc2e34a2511be845b79ee0fe7cc..709d9a4a5dc471f77718b2211c44c6c86e17621e 100644 (file)
--- a/defs.h
+++ b/defs.h
@@ -151,38 +151,22 @@ extern char *stpcpy(char *dst, const char *src);
 # define ERESTART_RESTARTBLOCK 516
 #endif
 
-#ifdef SPARC64
-# define SUPPORTED_PERSONALITIES 2
-#endif
-
-#ifdef X86_64
+#if defined X86_64
 # define SUPPORTED_PERSONALITIES 3
 # define PERSONALITY2_WORDSIZE 4
-#endif
-
-#ifdef X32
-# define SUPPORTED_PERSONALITIES 2
-#endif
-
-#ifdef AARCH64
-# define SUPPORTED_PERSONALITIES 2
-#endif
-
-#ifdef POWERPC64
+#elif defined AARCH64 \
+   || defined POWERPC64 \
+   || defined SPARC64 \
+   || defined TILE \
+   || defined X32
 # define SUPPORTED_PERSONALITIES 2
-#endif
-
-#ifdef TILE
-# define SUPPORTED_PERSONALITIES 2
-# ifdef __tilepro__
-#  define DEFAULT_PERSONALITY 1
-# endif
-#endif
-
-#ifndef SUPPORTED_PERSONALITIES
+#else
 # define SUPPORTED_PERSONALITIES 1
 #endif
-#ifndef DEFAULT_PERSONALITY
+
+#if defined TILE && defined __tilepro__
+# define DEFAULT_PERSONALITY 1
+#else
 # define DEFAULT_PERSONALITY 0
 #endif