[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <152261546762.30503.9337930260734861018.stgit@warthog.procyon.org.uk>
Date: Sun, 01 Apr 2018 21:44:27 +0100
From: David Howells <dhowells@...hat.com>
To: linux-kernel@...r.kernel.org
Subject: [PATCH 42/45] C++: Hide C++ keywords
Hide C++ keywords like new, delete, class and private.
Signed-off-by: David Howells <dhowells@...hat.com>
---
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)]
Powered by blists - more mailing lists