Blame SOURCES/0058-xlat-provide-fallback-definitions-for-ABS_MT_-consta.patch

86f512
From b31fdb9db2fdab3df9f3225c3adcfee2bbb763e0 Mon Sep 17 00:00:00 2001
86f512
From: Eugene Syromyatnikov <evgsyr@gmail.com>
86f512
Date: Sun, 13 Oct 2019 17:06:08 +0200
86f512
Subject: [PATCH 58/76] xlat: provide fallback definitions for ABS_MT_*
86f512
 constants
86f512
86f512
* xlat/evdev_mtslots.in: Add fallback definitions.  Add #sorted.
86f512
86f512
References: https://bugzilla.redhat.com/show_bug.cgi?id=1758201
86f512
---
86f512
 xlat/evdev_mtslots.in | 30 +++++++++++++++---------------
86f512
 1 file changed, 15 insertions(+), 15 deletions(-)
86f512
86f512
Index: strace-5.1/xlat/evdev_mtslots.in
86f512
===================================================================
86f512
--- strace-5.1.orig/xlat/evdev_mtslots.in	2015-02-22 03:29:54.000000000 +0100
86f512
+++ strace-5.1/xlat/evdev_mtslots.in	2020-01-29 12:33:27.876943556 +0100
86f512
@@ -1,15 +1,15 @@
86f512
-ABS_MT_SLOT
86f512
-ABS_MT_TOUCH_MAJOR
86f512
-ABS_MT_TOUCH_MINOR
86f512
-ABS_MT_WIDTH_MAJOR
86f512
-ABS_MT_WIDTH_MINOR
86f512
-ABS_MT_ORIENTATION
86f512
-ABS_MT_POSITION_X
86f512
-ABS_MT_POSITION_Y
86f512
-ABS_MT_TOOL_TYPE
86f512
-ABS_MT_BLOB_ID
86f512
-ABS_MT_TRACKING_ID
86f512
-ABS_MT_PRESSURE
86f512
-ABS_MT_DISTANCE
86f512
-ABS_MT_TOOL_X
86f512
-ABS_MT_TOOL_Y
86f512
+ABS_MT_SLOT		0x2f
86f512
+ABS_MT_TOUCH_MAJOR	0x30
86f512
+ABS_MT_TOUCH_MINOR	0x31
86f512
+ABS_MT_WIDTH_MAJOR	0x32
86f512
+ABS_MT_WIDTH_MINOR	0x33
86f512
+ABS_MT_ORIENTATION	0x34
86f512
+ABS_MT_POSITION_X	0x35
86f512
+ABS_MT_POSITION_Y	0x36
86f512
+ABS_MT_TOOL_TYPE	0x37
86f512
+ABS_MT_BLOB_ID		0x38
86f512
+ABS_MT_TRACKING_ID	0x39
86f512
+ABS_MT_PRESSURE		0x3a
86f512
+ABS_MT_DISTANCE		0x3b
86f512
+ABS_MT_TOOL_X		0x3c
86f512
+ABS_MT_TOOL_Y		0x3d
86f512
Index: strace-5.1/xlat/evdev_mtslots.h
86f512
===================================================================
86f512
--- strace-5.1.orig/xlat/evdev_mtslots.h	2019-05-22 15:08:30.000000000 +0200
86f512
+++ strace-5.1/xlat/evdev_mtslots.h	2020-01-29 12:33:40.167830736 +0100
86f512
@@ -3,62 +3,137 @@
86f512
 #include "gcc_compat.h"
86f512
 #include "static_assert.h"
86f512
 
86f512
-
86f512
-#ifndef XLAT_MACROS_ONLY
86f512
-
86f512
-# ifdef IN_MPERS
86f512
-
86f512
-#  error static const struct xlat evdev_mtslots in mpers mode
86f512
-
86f512
-# else
86f512
-
86f512
-static
86f512
-const struct xlat evdev_mtslots[] = {
86f512
 #if defined(ABS_MT_SLOT) || (defined(HAVE_DECL_ABS_MT_SLOT) && HAVE_DECL_ABS_MT_SLOT)
86f512
-  XLAT(ABS_MT_SLOT),
86f512
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+static_assert((ABS_MT_SLOT) == (0x2f), "ABS_MT_SLOT != 0x2f");
86f512
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+#else
86f512
+# define ABS_MT_SLOT 0x2f
86f512
 #endif
86f512
 #if defined(ABS_MT_TOUCH_MAJOR) || (defined(HAVE_DECL_ABS_MT_TOUCH_MAJOR) && HAVE_DECL_ABS_MT_TOUCH_MAJOR)
86f512
-  XLAT(ABS_MT_TOUCH_MAJOR),
86f512
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+static_assert((ABS_MT_TOUCH_MAJOR) == (0x30), "ABS_MT_TOUCH_MAJOR != 0x30");
86f512
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+#else
86f512
+# define ABS_MT_TOUCH_MAJOR 0x30
86f512
 #endif
86f512
 #if defined(ABS_MT_TOUCH_MINOR) || (defined(HAVE_DECL_ABS_MT_TOUCH_MINOR) && HAVE_DECL_ABS_MT_TOUCH_MINOR)
86f512
-  XLAT(ABS_MT_TOUCH_MINOR),
86f512
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+static_assert((ABS_MT_TOUCH_MINOR) == (0x31), "ABS_MT_TOUCH_MINOR != 0x31");
86f512
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+#else
86f512
+# define ABS_MT_TOUCH_MINOR 0x31
86f512
 #endif
86f512
 #if defined(ABS_MT_WIDTH_MAJOR) || (defined(HAVE_DECL_ABS_MT_WIDTH_MAJOR) && HAVE_DECL_ABS_MT_WIDTH_MAJOR)
86f512
-  XLAT(ABS_MT_WIDTH_MAJOR),
86f512
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+static_assert((ABS_MT_WIDTH_MAJOR) == (0x32), "ABS_MT_WIDTH_MAJOR != 0x32");
86f512
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+#else
86f512
+# define ABS_MT_WIDTH_MAJOR 0x32
86f512
 #endif
86f512
 #if defined(ABS_MT_WIDTH_MINOR) || (defined(HAVE_DECL_ABS_MT_WIDTH_MINOR) && HAVE_DECL_ABS_MT_WIDTH_MINOR)
86f512
-  XLAT(ABS_MT_WIDTH_MINOR),
86f512
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+static_assert((ABS_MT_WIDTH_MINOR) == (0x33), "ABS_MT_WIDTH_MINOR != 0x33");
86f512
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+#else
86f512
+# define ABS_MT_WIDTH_MINOR 0x33
86f512
 #endif
86f512
 #if defined(ABS_MT_ORIENTATION) || (defined(HAVE_DECL_ABS_MT_ORIENTATION) && HAVE_DECL_ABS_MT_ORIENTATION)
86f512
-  XLAT(ABS_MT_ORIENTATION),
86f512
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+static_assert((ABS_MT_ORIENTATION) == (0x34), "ABS_MT_ORIENTATION != 0x34");
86f512
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+#else
86f512
+# define ABS_MT_ORIENTATION 0x34
86f512
 #endif
86f512
 #if defined(ABS_MT_POSITION_X) || (defined(HAVE_DECL_ABS_MT_POSITION_X) && HAVE_DECL_ABS_MT_POSITION_X)
86f512
-  XLAT(ABS_MT_POSITION_X),
86f512
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+static_assert((ABS_MT_POSITION_X) == (0x35), "ABS_MT_POSITION_X != 0x35");
86f512
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+#else
86f512
+# define ABS_MT_POSITION_X 0x35
86f512
 #endif
86f512
 #if defined(ABS_MT_POSITION_Y) || (defined(HAVE_DECL_ABS_MT_POSITION_Y) && HAVE_DECL_ABS_MT_POSITION_Y)
86f512
-  XLAT(ABS_MT_POSITION_Y),
86f512
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+static_assert((ABS_MT_POSITION_Y) == (0x36), "ABS_MT_POSITION_Y != 0x36");
86f512
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+#else
86f512
+# define ABS_MT_POSITION_Y 0x36
86f512
 #endif
86f512
 #if defined(ABS_MT_TOOL_TYPE) || (defined(HAVE_DECL_ABS_MT_TOOL_TYPE) && HAVE_DECL_ABS_MT_TOOL_TYPE)
86f512
-  XLAT(ABS_MT_TOOL_TYPE),
86f512
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+static_assert((ABS_MT_TOOL_TYPE) == (0x37), "ABS_MT_TOOL_TYPE != 0x37");
86f512
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+#else
86f512
+# define ABS_MT_TOOL_TYPE 0x37
86f512
 #endif
86f512
 #if defined(ABS_MT_BLOB_ID) || (defined(HAVE_DECL_ABS_MT_BLOB_ID) && HAVE_DECL_ABS_MT_BLOB_ID)
86f512
-  XLAT(ABS_MT_BLOB_ID),
86f512
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+static_assert((ABS_MT_BLOB_ID) == (0x38), "ABS_MT_BLOB_ID != 0x38");
86f512
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+#else
86f512
+# define ABS_MT_BLOB_ID 0x38
86f512
 #endif
86f512
 #if defined(ABS_MT_TRACKING_ID) || (defined(HAVE_DECL_ABS_MT_TRACKING_ID) && HAVE_DECL_ABS_MT_TRACKING_ID)
86f512
-  XLAT(ABS_MT_TRACKING_ID),
86f512
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+static_assert((ABS_MT_TRACKING_ID) == (0x39), "ABS_MT_TRACKING_ID != 0x39");
86f512
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+#else
86f512
+# define ABS_MT_TRACKING_ID 0x39
86f512
 #endif
86f512
 #if defined(ABS_MT_PRESSURE) || (defined(HAVE_DECL_ABS_MT_PRESSURE) && HAVE_DECL_ABS_MT_PRESSURE)
86f512
-  XLAT(ABS_MT_PRESSURE),
86f512
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+static_assert((ABS_MT_PRESSURE) == (0x3a), "ABS_MT_PRESSURE != 0x3a");
86f512
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+#else
86f512
+# define ABS_MT_PRESSURE 0x3a
86f512
 #endif
86f512
 #if defined(ABS_MT_DISTANCE) || (defined(HAVE_DECL_ABS_MT_DISTANCE) && HAVE_DECL_ABS_MT_DISTANCE)
86f512
-  XLAT(ABS_MT_DISTANCE),
86f512
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+static_assert((ABS_MT_DISTANCE) == (0x3b), "ABS_MT_DISTANCE != 0x3b");
86f512
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+#else
86f512
+# define ABS_MT_DISTANCE 0x3b
86f512
 #endif
86f512
 #if defined(ABS_MT_TOOL_X) || (defined(HAVE_DECL_ABS_MT_TOOL_X) && HAVE_DECL_ABS_MT_TOOL_X)
86f512
-  XLAT(ABS_MT_TOOL_X),
86f512
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+static_assert((ABS_MT_TOOL_X) == (0x3c), "ABS_MT_TOOL_X != 0x3c");
86f512
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+#else
86f512
+# define ABS_MT_TOOL_X 0x3c
86f512
 #endif
86f512
 #if defined(ABS_MT_TOOL_Y) || (defined(HAVE_DECL_ABS_MT_TOOL_Y) && HAVE_DECL_ABS_MT_TOOL_Y)
86f512
-  XLAT(ABS_MT_TOOL_Y),
86f512
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+static_assert((ABS_MT_TOOL_Y) == (0x3d), "ABS_MT_TOOL_Y != 0x3d");
86f512
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
86f512
+#else
86f512
+# define ABS_MT_TOOL_Y 0x3d
86f512
 #endif
86f512
+
86f512
+#ifndef XLAT_MACROS_ONLY
86f512
+
86f512
+# ifdef IN_MPERS
86f512
+
86f512
+#  error static const struct xlat evdev_mtslots in mpers mode
86f512
+
86f512
+# else
86f512
+
86f512
+static
86f512
+const struct xlat evdev_mtslots[] = {
86f512
+ XLAT(ABS_MT_SLOT),
86f512
+ XLAT(ABS_MT_TOUCH_MAJOR),
86f512
+ XLAT(ABS_MT_TOUCH_MINOR),
86f512
+ XLAT(ABS_MT_WIDTH_MAJOR),
86f512
+ XLAT(ABS_MT_WIDTH_MINOR),
86f512
+ XLAT(ABS_MT_ORIENTATION),
86f512
+ XLAT(ABS_MT_POSITION_X),
86f512
+ XLAT(ABS_MT_POSITION_Y),
86f512
+ XLAT(ABS_MT_TOOL_TYPE),
86f512
+ XLAT(ABS_MT_BLOB_ID),
86f512
+ XLAT(ABS_MT_TRACKING_ID),
86f512
+ XLAT(ABS_MT_PRESSURE),
86f512
+ XLAT(ABS_MT_DISTANCE),
86f512
+ XLAT(ABS_MT_TOOL_X),
86f512
+ XLAT(ABS_MT_TOOL_Y),
86f512
  XLAT_END
86f512
 };
86f512