|
|
86f512 |
From 300b952c68a991eca56d31b044bd9643028ee46b Mon Sep 17 00:00:00 2001
|
|
|
86f512 |
From: Eugene Syromyatnikov <evgsyr@gmail.com>
|
|
|
86f512 |
Date: Sun, 20 Oct 2019 21:06:28 +0200
|
|
|
86f512 |
Subject: [PATCH 73/76] xlat: Provide fallback definitions for V4L2_FIELD_*
|
|
|
86f512 |
constants
|
|
|
86f512 |
|
|
|
86f512 |
* xlat/v4l2_fields.in: Add fallback definitions for constants.
|
|
|
86f512 |
---
|
|
|
86f512 |
xlat/v4l2_fields.in | 21 +++++++++++----------
|
|
|
86f512 |
1 file changed, 11 insertions(+), 10 deletions(-)
|
|
|
86f512 |
|
|
|
86f512 |
Index: strace-5.1/xlat/v4l2_fields.in
|
|
|
86f512 |
===================================================================
|
|
|
86f512 |
--- strace-5.1.orig/xlat/v4l2_fields.in 2014-11-04 16:27:31.000000000 +0100
|
|
|
86f512 |
+++ strace-5.1/xlat/v4l2_fields.in 2020-01-29 12:40:10.613338727 +0100
|
|
|
86f512 |
@@ -1,10 +1,11 @@
|
|
|
86f512 |
-V4L2_FIELD_ANY
|
|
|
86f512 |
-V4L2_FIELD_NONE
|
|
|
86f512 |
-V4L2_FIELD_TOP
|
|
|
86f512 |
-V4L2_FIELD_BOTTOM
|
|
|
86f512 |
-V4L2_FIELD_INTERLACED
|
|
|
86f512 |
-V4L2_FIELD_SEQ_TB
|
|
|
86f512 |
-V4L2_FIELD_SEQ_BT
|
|
|
86f512 |
-V4L2_FIELD_ALTERNATE
|
|
|
86f512 |
-V4L2_FIELD_INTERLACED_TB
|
|
|
86f512 |
-V4L2_FIELD_INTERLACED_BT
|
|
|
86f512 |
+#value_indexed
|
|
|
86f512 |
+V4L2_FIELD_ANY 0
|
|
|
86f512 |
+V4L2_FIELD_NONE 1
|
|
|
86f512 |
+V4L2_FIELD_TOP 2
|
|
|
86f512 |
+V4L2_FIELD_BOTTOM 3
|
|
|
86f512 |
+V4L2_FIELD_INTERLACED 4
|
|
|
86f512 |
+V4L2_FIELD_SEQ_TB 5
|
|
|
86f512 |
+V4L2_FIELD_SEQ_BT 6
|
|
|
86f512 |
+V4L2_FIELD_ALTERNATE 7
|
|
|
86f512 |
+V4L2_FIELD_INTERLACED_TB 8
|
|
|
86f512 |
+V4L2_FIELD_INTERLACED_BT 9
|
|
|
86f512 |
Index: strace-5.1/xlat/v4l2_fields.h
|
|
|
86f512 |
===================================================================
|
|
|
86f512 |
--- strace-5.1.orig/xlat/v4l2_fields.h 2019-05-22 15:08:31.000000000 +0200
|
|
|
86f512 |
+++ strace-5.1/xlat/v4l2_fields.h 2020-01-29 12:40:18.817263422 +0100
|
|
|
86f512 |
@@ -3,49 +3,99 @@
|
|
|
86f512 |
#include "gcc_compat.h"
|
|
|
86f512 |
#include "static_assert.h"
|
|
|
86f512 |
|
|
|
86f512 |
-
|
|
|
86f512 |
-#ifndef XLAT_MACROS_ONLY
|
|
|
86f512 |
-
|
|
|
86f512 |
-# ifdef IN_MPERS
|
|
|
86f512 |
-
|
|
|
86f512 |
-extern const struct xlat v4l2_fields[];
|
|
|
86f512 |
-
|
|
|
86f512 |
-# else
|
|
|
86f512 |
-
|
|
|
86f512 |
-# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS)
|
|
|
86f512 |
-static
|
|
|
86f512 |
-# endif
|
|
|
86f512 |
-const struct xlat v4l2_fields[] = {
|
|
|
86f512 |
#if defined(V4L2_FIELD_ANY) || (defined(HAVE_DECL_V4L2_FIELD_ANY) && HAVE_DECL_V4L2_FIELD_ANY)
|
|
|
86f512 |
- XLAT(V4L2_FIELD_ANY),
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((V4L2_FIELD_ANY) == (0), "V4L2_FIELD_ANY != 0");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define V4L2_FIELD_ANY 0
|
|
|
86f512 |
#endif
|
|
|
86f512 |
#if defined(V4L2_FIELD_NONE) || (defined(HAVE_DECL_V4L2_FIELD_NONE) && HAVE_DECL_V4L2_FIELD_NONE)
|
|
|
86f512 |
- XLAT(V4L2_FIELD_NONE),
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((V4L2_FIELD_NONE) == (1), "V4L2_FIELD_NONE != 1");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define V4L2_FIELD_NONE 1
|
|
|
86f512 |
#endif
|
|
|
86f512 |
#if defined(V4L2_FIELD_TOP) || (defined(HAVE_DECL_V4L2_FIELD_TOP) && HAVE_DECL_V4L2_FIELD_TOP)
|
|
|
86f512 |
- XLAT(V4L2_FIELD_TOP),
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((V4L2_FIELD_TOP) == (2), "V4L2_FIELD_TOP != 2");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define V4L2_FIELD_TOP 2
|
|
|
86f512 |
#endif
|
|
|
86f512 |
#if defined(V4L2_FIELD_BOTTOM) || (defined(HAVE_DECL_V4L2_FIELD_BOTTOM) && HAVE_DECL_V4L2_FIELD_BOTTOM)
|
|
|
86f512 |
- XLAT(V4L2_FIELD_BOTTOM),
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((V4L2_FIELD_BOTTOM) == (3), "V4L2_FIELD_BOTTOM != 3");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define V4L2_FIELD_BOTTOM 3
|
|
|
86f512 |
#endif
|
|
|
86f512 |
#if defined(V4L2_FIELD_INTERLACED) || (defined(HAVE_DECL_V4L2_FIELD_INTERLACED) && HAVE_DECL_V4L2_FIELD_INTERLACED)
|
|
|
86f512 |
- XLAT(V4L2_FIELD_INTERLACED),
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((V4L2_FIELD_INTERLACED) == (4), "V4L2_FIELD_INTERLACED != 4");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define V4L2_FIELD_INTERLACED 4
|
|
|
86f512 |
#endif
|
|
|
86f512 |
#if defined(V4L2_FIELD_SEQ_TB) || (defined(HAVE_DECL_V4L2_FIELD_SEQ_TB) && HAVE_DECL_V4L2_FIELD_SEQ_TB)
|
|
|
86f512 |
- XLAT(V4L2_FIELD_SEQ_TB),
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((V4L2_FIELD_SEQ_TB) == (5), "V4L2_FIELD_SEQ_TB != 5");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define V4L2_FIELD_SEQ_TB 5
|
|
|
86f512 |
#endif
|
|
|
86f512 |
#if defined(V4L2_FIELD_SEQ_BT) || (defined(HAVE_DECL_V4L2_FIELD_SEQ_BT) && HAVE_DECL_V4L2_FIELD_SEQ_BT)
|
|
|
86f512 |
- XLAT(V4L2_FIELD_SEQ_BT),
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((V4L2_FIELD_SEQ_BT) == (6), "V4L2_FIELD_SEQ_BT != 6");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define V4L2_FIELD_SEQ_BT 6
|
|
|
86f512 |
#endif
|
|
|
86f512 |
#if defined(V4L2_FIELD_ALTERNATE) || (defined(HAVE_DECL_V4L2_FIELD_ALTERNATE) && HAVE_DECL_V4L2_FIELD_ALTERNATE)
|
|
|
86f512 |
- XLAT(V4L2_FIELD_ALTERNATE),
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((V4L2_FIELD_ALTERNATE) == (7), "V4L2_FIELD_ALTERNATE != 7");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define V4L2_FIELD_ALTERNATE 7
|
|
|
86f512 |
#endif
|
|
|
86f512 |
#if defined(V4L2_FIELD_INTERLACED_TB) || (defined(HAVE_DECL_V4L2_FIELD_INTERLACED_TB) && HAVE_DECL_V4L2_FIELD_INTERLACED_TB)
|
|
|
86f512 |
- XLAT(V4L2_FIELD_INTERLACED_TB),
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((V4L2_FIELD_INTERLACED_TB) == (8), "V4L2_FIELD_INTERLACED_TB != 8");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define V4L2_FIELD_INTERLACED_TB 8
|
|
|
86f512 |
#endif
|
|
|
86f512 |
#if defined(V4L2_FIELD_INTERLACED_BT) || (defined(HAVE_DECL_V4L2_FIELD_INTERLACED_BT) && HAVE_DECL_V4L2_FIELD_INTERLACED_BT)
|
|
|
86f512 |
- XLAT(V4L2_FIELD_INTERLACED_BT),
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((V4L2_FIELD_INTERLACED_BT) == (9), "V4L2_FIELD_INTERLACED_BT != 9");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define V4L2_FIELD_INTERLACED_BT 9
|
|
|
86f512 |
#endif
|
|
|
86f512 |
+
|
|
|
86f512 |
+#ifndef XLAT_MACROS_ONLY
|
|
|
86f512 |
+
|
|
|
86f512 |
+# ifdef IN_MPERS
|
|
|
86f512 |
+
|
|
|
86f512 |
+extern const struct xlat v4l2_fields[];
|
|
|
86f512 |
+
|
|
|
86f512 |
+# else
|
|
|
86f512 |
+
|
|
|
86f512 |
+# if !(defined HAVE_M32_MPERS || defined HAVE_MX32_MPERS)
|
|
|
86f512 |
+static
|
|
|
86f512 |
+# endif
|
|
|
86f512 |
+const struct xlat v4l2_fields[] = {
|
|
|
86f512 |
+ [V4L2_FIELD_ANY] = XLAT(V4L2_FIELD_ANY),
|
|
|
86f512 |
+ [V4L2_FIELD_NONE] = XLAT(V4L2_FIELD_NONE),
|
|
|
86f512 |
+ [V4L2_FIELD_TOP] = XLAT(V4L2_FIELD_TOP),
|
|
|
86f512 |
+ [V4L2_FIELD_BOTTOM] = XLAT(V4L2_FIELD_BOTTOM),
|
|
|
86f512 |
+ [V4L2_FIELD_INTERLACED] = XLAT(V4L2_FIELD_INTERLACED),
|
|
|
86f512 |
+ [V4L2_FIELD_SEQ_TB] = XLAT(V4L2_FIELD_SEQ_TB),
|
|
|
86f512 |
+ [V4L2_FIELD_SEQ_BT] = XLAT(V4L2_FIELD_SEQ_BT),
|
|
|
86f512 |
+ [V4L2_FIELD_ALTERNATE] = XLAT(V4L2_FIELD_ALTERNATE),
|
|
|
86f512 |
+ [V4L2_FIELD_INTERLACED_TB] = XLAT(V4L2_FIELD_INTERLACED_TB),
|
|
|
86f512 |
+ [V4L2_FIELD_INTERLACED_BT] = XLAT(V4L2_FIELD_INTERLACED_BT),
|
|
|
86f512 |
XLAT_END
|
|
|
86f512 |
};
|
|
|
86f512 |
|