|
|
86f512 |
From 2947a7dc764413f236db956b0d5af0a6f4169eee Mon Sep 17 00:00:00 2001
|
|
|
86f512 |
From: Eugene Syromyatnikov <evgsyr@gmail.com>
|
|
|
86f512 |
Date: Thu, 10 Oct 2019 11:49:02 +0200
|
|
|
86f512 |
Subject: [PATCH 56/76] xlat: update MDB_FLAGS_* constants
|
|
|
86f512 |
|
|
|
86f512 |
Also, provide fallback definitions for constants.
|
|
|
86f512 |
|
|
|
86f512 |
* xlat/mdb_flags.in (MDB_FLAGS_OFFLOAD): Add fallback definition.
|
|
|
86f512 |
(MDB_FLAGS_FAST_LEAVE): New constant, introduced by Linux commit
|
|
|
86f512 |
v5.4-rc1~131^2~321.
|
|
|
86f512 |
---
|
|
|
86f512 |
xlat/mdb_flags.in | 3 ++-
|
|
|
86f512 |
1 file changed, 2 insertions(+), 1 deletion(-)
|
|
|
86f512 |
|
|
|
86f512 |
Index: strace-5.1/xlat/mdb_flags.in
|
|
|
86f512 |
===================================================================
|
|
|
86f512 |
--- strace-5.1.orig/xlat/mdb_flags.in 2017-09-17 14:04:11.000000000 +0200
|
|
|
86f512 |
+++ strace-5.1/xlat/mdb_flags.in 2020-01-29 12:28:36.222845420 +0100
|
|
|
86f512 |
@@ -1 +1,2 @@
|
|
|
86f512 |
-MDB_FLAGS_OFFLOAD
|
|
|
86f512 |
+MDB_FLAGS_OFFLOAD (1 << 0)
|
|
|
86f512 |
+MDB_FLAGS_FAST_LEAVE (1 << 1)
|
|
|
86f512 |
Index: strace-5.1/xlat/mdb_flags.h
|
|
|
86f512 |
===================================================================
|
|
|
86f512 |
--- strace-5.1.orig/xlat/mdb_flags.h 2019-05-22 15:08:30.000000000 +0200
|
|
|
86f512 |
+++ strace-5.1/xlat/mdb_flags.h 2020-01-29 12:32:34.459433886 +0100
|
|
|
86f512 |
@@ -3,6 +3,20 @@
|
|
|
86f512 |
#include "gcc_compat.h"
|
|
|
86f512 |
#include "static_assert.h"
|
|
|
86f512 |
|
|
|
86f512 |
+#if defined(MDB_FLAGS_OFFLOAD) || (defined(HAVE_DECL_MDB_FLAGS_OFFLOAD) && HAVE_DECL_MDB_FLAGS_OFFLOAD)
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((MDB_FLAGS_OFFLOAD) == ((1 << 0)), "MDB_FLAGS_OFFLOAD != (1 << 0)");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define MDB_FLAGS_OFFLOAD (1 << 0)
|
|
|
86f512 |
+#endif
|
|
|
86f512 |
+#if defined(MDB_FLAGS_FAST_LEAVE) || (defined(HAVE_DECL_MDB_FLAGS_FAST_LEAVE) && HAVE_DECL_MDB_FLAGS_FAST_LEAVE)
|
|
|
86f512 |
+DIAG_PUSH_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+static_assert((MDB_FLAGS_FAST_LEAVE) == ((1 << 1)), "MDB_FLAGS_FAST_LEAVE != (1 << 1)");
|
|
|
86f512 |
+DIAG_POP_IGNORE_TAUTOLOGICAL_COMPARE
|
|
|
86f512 |
+#else
|
|
|
86f512 |
+# define MDB_FLAGS_FAST_LEAVE (1 << 1)
|
|
|
86f512 |
+#endif
|
|
|
86f512 |
|
|
|
86f512 |
#ifndef XLAT_MACROS_ONLY
|
|
|
86f512 |
|
|
|
86f512 |
@@ -14,9 +28,8 @@
|
|
|
86f512 |
|
|
|
86f512 |
static
|
|
|
86f512 |
const struct xlat mdb_flags[] = {
|
|
|
86f512 |
-#if defined(MDB_FLAGS_OFFLOAD) || (defined(HAVE_DECL_MDB_FLAGS_OFFLOAD) && HAVE_DECL_MDB_FLAGS_OFFLOAD)
|
|
|
86f512 |
- XLAT(MDB_FLAGS_OFFLOAD),
|
|
|
86f512 |
-#endif
|
|
|
86f512 |
+ XLAT(MDB_FLAGS_OFFLOAD),
|
|
|
86f512 |
+ XLAT(MDB_FLAGS_FAST_LEAVE),
|
|
|
86f512 |
XLAT_END
|
|
|
86f512 |
};
|
|
|
86f512 |
|