[PATCH 42/45] C++: Hide C++ keywords

From: David Howells
Date: Sun Apr 01 2018 - 16:44:33 EST


Hide C++ keywords like new, delete, class and private.

Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
---

include/linux/page-flags.h | 3 +++
include/linux/types.h | 6 ++++++
2 files changed, 9 insertions(+)

diff --git a/include/linux/page-flags.h b/include/linux/page-flags.h
index 50c2b8786831..6705394b8f69 100644
--- a/include/linux/page-flags.h
+++ b/include/linux/page-flags.h
@@ -131,6 +131,9 @@ enum pageflags {

/* non-lru isolated movable page */
PG_isolated = PG_reclaim,
+
+ /* C++-ism */
+ PG__Private = PG_private,
};

#ifndef __GENERATING_BOUNDS_H
diff --git a/include/linux/types.h b/include/linux/types.h
index d233b12c7ebe..1554319a3ff2 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -11,6 +11,12 @@

#ifndef __ASSEMBLY__

+#define class _Class
+#define new _New
+#define delete _Delete
+#define namespace _Namespace
+#define private _Private
+
#define DECLARE_BITMAP(name,bits) \
unsigned long name[BITS_TO_LONGS(bits)]