aboutsummaryrefslogtreecommitdiff
path: root/platform/linux-generic
diff options
context:
space:
mode:
authorPetri Savolainen <petri.savolainen@linaro.org>2017-03-30 16:58:54 +0300
committerMaxim Uvarov <maxim.uvarov@linaro.org>2017-06-16 16:51:09 +0300
commit2b34cda253fd28f3b373dc3ee66753d47a0c9b33 (patch)
tree6d7072ae3a25dca16d99bbc74625dffb85c3f588 /platform/linux-generic
parent166e4e6a7f2e289f305203e75c68cea56d015c08 (diff)
api: deprecated: add configure option and macros
Added configuration option --enable-deprecated to control if deprecated APIs are enabled or disabled. Added ODP_DEPRECATED_API macro into the API. Its value can be used to check if deprecated API definitions are enabled or disabled. Deprecated APIs are disabled by default. Deprecated APIs are meant to be removed completely in a later API version. Added ODP_DEPRECATE() macro to enforce deprecation of API definitions. When deprecated APIs are disabled, the macro renames API definitions so that application cannot use those any more, but a single implementation library can serve applications built with both options. Signed-off-by: Petri Savolainen <petri.savolainen@linaro.org> Reviewed-by: Dmitry Eremin-Solenikov <dmitry.ereminsolenikov@linaro.org> Reviewed-by: Bill Fischofer <bill.fischofer@linaro.org> Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
Diffstat (limited to 'platform/linux-generic')
-rw-r--r--platform/linux-generic/Makefile.am1
-rw-r--r--platform/linux-generic/include/odp/api/deprecated.h26
2 files changed, 27 insertions, 0 deletions
diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am
index 00ce80d74..eb7bea8f3 100644
--- a/platform/linux-generic/Makefile.am
+++ b/platform/linux-generic/Makefile.am
@@ -33,6 +33,7 @@ odpapiinclude_HEADERS = \
$(srcdir)/include/odp/api/cpumask.h \
$(srcdir)/include/odp/api/crypto.h \
$(srcdir)/include/odp/api/debug.h \
+ $(srcdir)/include/odp/api/deprecated.h \
$(srcdir)/include/odp/api/errno.h \
$(srcdir)/include/odp/api/event.h \
$(srcdir)/include/odp/api/hash.h \
diff --git a/platform/linux-generic/include/odp/api/deprecated.h b/platform/linux-generic/include/odp/api/deprecated.h
new file mode 100644
index 000000000..82797ebc4
--- /dev/null
+++ b/platform/linux-generic/include/odp/api/deprecated.h
@@ -0,0 +1,26 @@
+/* Copyright (c) 2017, Linaro Limited
+ * All rights reserved.
+ *
+ * SPDX-License-Identifier: BSD-3-Clause
+ */
+
+/**
+ * @file
+ *
+ * Control deprecated API definitions
+ */
+
+#ifndef ODP_PLAT_DEPRECATED_H_
+#define ODP_PLAT_DEPRECATED_H_
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <odp/api/spec/deprecated.h>
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif