From patchwork Thu Feb 23 14:14:06 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petri Savolainen X-Patchwork-Id: 94382 Delivered-To: patch@linaro.org Received: by 10.140.20.99 with SMTP id 90csp231377qgi; Thu, 23 Feb 2017 06:16:51 -0800 (PST) X-Received: by 10.36.200.9 with SMTP id w9mr4608432itf.113.1487859410932; Thu, 23 Feb 2017 06:16:50 -0800 (PST) Return-Path: Received: from lists.linaro.org (lists.linaro.org. [54.225.227.206]) by mx.google.com with ESMTP id r141si5162260itr.103.2017.02.23.06.16.50; Thu, 23 Feb 2017 06:16:50 -0800 (PST) Received-SPF: pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) client-ip=54.225.227.206; Authentication-Results: mx.google.com; spf=pass (google.com: domain of lng-odp-bounces@lists.linaro.org designates 54.225.227.206 as permitted sender) smtp.mailfrom=lng-odp-bounces@lists.linaro.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id 6ED13609AA; Thu, 23 Feb 2017 14:16:50 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on ip-10-142-244-252 X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAD_ENC_HEADER,BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_PASS, URIBL_BLOCKED autolearn=disabled version=3.4.0 Received: from [127.0.0.1] (localhost [127.0.0.1]) by lists.linaro.org (Postfix) with ESMTP id 7300E60A1F; Thu, 23 Feb 2017 14:15:35 +0000 (UTC) X-Original-To: lng-odp@lists.linaro.org Delivered-To: lng-odp@lists.linaro.org Received: by lists.linaro.org (Postfix, from userid 109) id DD14A60A1F; Thu, 23 Feb 2017 14:15:24 +0000 (UTC) Received: from EUR01-HE1-obe.outbound.protection.outlook.com (mail-he1eur01on0133.outbound.protection.outlook.com [104.47.0.133]) by lists.linaro.org (Postfix) with ESMTPS id 6138F60F58 for ; Thu, 23 Feb 2017 14:14:55 +0000 (UTC) Received: from DB6PR07CA0053.eurprd07.prod.outlook.com (10.175.237.143) by HE1PR07MB0825.eurprd07.prod.outlook.com (10.162.24.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.888.5; Thu, 23 Feb 2017 14:14:53 +0000 Received: from DB5EUR03FT022.eop-EUR03.prod.protection.outlook.com (2a01:111:f400:7e0a::209) by DB6PR07CA0053.outlook.office365.com (2603:10a6:6:2a::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.947.2 via Frontend Transport; Thu, 23 Feb 2017 14:14:53 +0000 Received-SPF: SoftFail (protection.outlook.com: domain of transitioning linaro.org discourages use of 131.228.2.35 as permitted sender) Received: from hybrid2.ext.net.nokia.com (131.228.2.35) by DB5EUR03FT022.mail.protection.outlook.com (10.152.20.171) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P384) id 15.1.919.10 via Frontend Transport; Thu, 23 Feb 2017 14:14:52 +0000 Received: from fihe3nok1347.nsn-intra.net (10.158.36.135) by fihe3nok1346.nsn-intra.net (10.158.36.134) with Microsoft SMTP Server (TLS) id 15.1.466.34; Thu, 23 Feb 2017 16:14:51 +0200 Received: from mailrelay.int.nokia.com (10.130.128.21) by fihe3nok1347.nsn-intra.net (10.158.36.135) with Microsoft SMTP Server (TLS) id 15.1.466.34 via Frontend Transport; Thu, 23 Feb 2017 16:14:51 +0200 Received: from fihe3nok0734.emea.nsn-net.net (localhost [127.0.0.1]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v1NEE95V029199 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Thu, 23 Feb 2017 16:14:09 +0200 Received: from 10.144.19.15 ([10.144.104.219]) by fihe3nok0734.emea.nsn-net.net (8.14.9/8.14.5) with ESMTP id v1NEE8UD029180 (version=TLSv1/SSLv3 cipher=AES128-SHA256 bits=128 verify=NOT) for ; Thu, 23 Feb 2017 16:14:08 +0200 X-HPESVCS-Source-Ip: 10.144.104.219 From: Petri Savolainen To: Date: Thu, 23 Feb 2017 16:14:06 +0200 Message-ID: <1487859248-23273-2-git-send-email-petri.savolainen@linaro.org> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1487859248-23273-1-git-send-email-petri.savolainen@linaro.org> References: <1487859248-23273-1-git-send-email-petri.savolainen@linaro.org> MIME-Version: 1.0 X-EOPAttributedMessage: 0 X-MS-Office365-Filtering-HT: Tenant X-Forefront-Antispam-Report: CIP:131.228.2.35; IPV:NLI; CTRY:FI; EFV:NLI; SFV:NSPM; SFS:(10019020)(6009001)(7916002)(39840400002)(39450400003)(39410400002)(39860400002)(39850400002)(2980300002)(189002)(199003)(22756006)(2906002)(626004)(92566002)(2950100002)(305945005)(105596002)(8676002)(6916009)(106466001)(356003)(68736007)(5660300001)(76176999)(36756003)(86362001)(81166006)(53936002)(50986999)(81156014)(50226002)(77096006)(33646002)(38730400002)(5003940100001)(47776003)(110136004)(50466002)(48376002)(189998001)(97736004)(8936002)(450100001)(2351001)(217873001); DIR:OUT; SFP:1102; SCL:1; SRVR:HE1PR07MB0825; H:hybrid2.ext.net.nokia.com; FPR:; SPF:SoftFail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; DB5EUR03FT022; 1:mCaOqMfBLT8xgWU7hpeESySAtI7VWYH/HyuDXfTw3QXz7mkn/M/anIfsI/Ts1h5o2+Ig13HbUZ/ZdzkvTeI88A3TA7KNy6MFTuVnQEF8LTRNyK0Yhu6ONvDipU7Ili+sRNv+roc+NchZYeUXFViF81BFaBwwpTueEIKZU8AzaIwiDTNBiquCphXeJCbCsDfhM4t+DbIa5I121nuv0f5HkFMGLThNo9v4fDGBKj3kl3sj3G0Xy7DjPZyUdc6gedXoW5HKwlbsU3zu2EtVU+3Wm0aLtW5lFcgyMbJzjzLsxkA28uG0gQoFJeedEExDlyojf8ixEfvd3o7BSgxWIZ7TUEQv9TXY1wYEbNCBGdbGTluVEfn+dPbgxWQT7uBDOzvlO7jhbPODe9GvAjtS6FUNEfHs24pcC4oYzx6ddACTJE3QXknFIOBCAHmXcGEhmRZOYcfLoNVjwWRdDDZavaHiMQ== X-MS-Office365-Filtering-Correlation-Id: f528b42c-e4e0-41fd-d657-08d45bf6560a X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001); SRVR:HE1PR07MB0825; X-Microsoft-Exchange-Diagnostics: 1; HE1PR07MB0825; 3:dS1uUDwRa/irfmOrsi3Od1QQOuwoLBIGikNuBfrSzJTbNqNp4Xi7zwh7UgrIQa04FGa9CVhUVxTqBiXTgo3tS7T+zw+DVFtAo6Oo/mtoDcWA7Dlpi26IdbpWe5K+RduQuR8jbaArS61ZnluNb55p8edoA+eT/4RFn8TD79jSeCXjhhPtYOZ4pEAwhDvNyGwTgb3UB/b4nXeGQNPpvJz/gsycNcj8iLKY9oEKy4M4FciTYLeglA7sHvOZBCSaNiR0P6oQTpdVfU2QwmkmfxM5tsfeLCoQNhAElgHvj9pM3BOBAfBxemMh6LvfTH0/j0RWrCA2pgxOy5M8HIXSkHd4mpCnxrTfPRtoBPGvYDPI3KHwiI5NVadcPVdBMc4wyIqM; 25:4pVkZhcYygkRBb+1ikzq2Vqg+H7bANahUEARpBYi9getDIk62nbicr7xZGUEX6BognTBrzLVZ12o78ZTyCdiaEAgick+D8Rjapj0r2v5BlmlB4cJ40hxDR3hnKU5dzRb8isb2mvJRGzKzaVtCheAmbNd/W02LB39AeIhvqPBx8flKVA83o9/lddrd9wY0vGsPVfVmaxzX5+OagjaknRPB3ilN0Vv+TX9KP3YYHrGJ9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io0WfO40R+vMeBFcOQC96TV2yfPiFjrlNXIzVJ9dvfzKsK5B/7SUljgTFl5m3FUuNZiW3XfezhZl0gjUV9xsCJ0NfpDmDdxVJqrHe73OU= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040375)(601004)(2401047)(8121501046)(5005006)(13016025)(13018025)(10201501046)(3002001)(6055026)(6041248)(20161123560025)(20161123564025)(20161123562025)(20161123558025)(20161123555025)(6072148); SRVR:HE1PR07MB0825; BCL:0; PCL:0; RULEID:; SRVR:HE1PR07MB0825; X-Microsoft-Exchange-Diagnostics: 1; HE1PR07MB0825; 4:1+GmmijYbTzpuJMvSErYuCvmACfFtQFCQBjWTVY2aTUyIR6qYhPbnsLbUqP7/tsnh0V/asLzwYWb2WL3ciC2BzXGczu6uHp9y0mHOwF0HC1Q05SRLGlR5C0URku4zmnDaZnzGfC08fZ+Zj3VK0tihpULgFPgr/CoD28lYzHpqwKN7kOnosnrrLuahYTOHzaNmX5L1nGokpRlaT/DGtQVWuQ+dWjk5WmzyWAn0gs5g3LXLjoQBLROiJ0rNn4OBuTLI4pW7wix9KyfqvY/XTWomU8r3Xgc+xmr1f4d+QjCw8KQtfb5hWjl6ti6D1qJZbX6IznZuI+2c2MGwuBNE5xjBo+xnSHty9pg9CTNl0nJhdC1RBva/RBzySIyhdB8grALKxX/P0yIHDTKpEaiTN85LzNbyKeH93Hr2MAt4QhyUVWW73fZ5Q2MttED5+YTL1q1YlfPf7x4ImQLbGlKHxK5HcpxYKtW6ygzqvWGzeHOKaGX9NwDaT2Ijshg3pn4sq4fsE5DYmcvk2HktMG2hQA2/mykU9bqtES8YEm4A7Y31aWphgsR3pc40UJIolYqDyEpJtJGaktXGKLOaqjx5VLKTXxDAwKgbx4DAK9G8QB4taq9fTxboqqGg6LzBjh2GjCUvGTfBhXmHJjoA/JwJ/qZaMyN1SEkHojF8p7nLxTThgI= X-For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LGC8dATm/vGdff1jfAcUMKfvLktLPj1wjDgpHOAlOiXCBvzT0HuuHrwMdGgzu08WTXpgZnZwc4Gnob6BTMkpMQm6K8R9MlBngzf+UxWMD8QgdJ0ii18Mfhinsb4hCm42jaRSWEFZ4Sw429A1EZSY71TbAutlXOlFIvk29UUzATjocnwOsvdAJhjGF6MkMLbvXzQUyYIHEs89I4fbUVh+evfxC9Q== X-OriginatorOrg: nokia.onmicrosoft.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Feb 2017 14:14:52.8465 (UTC) X-MS-Exchange-CrossTenant-Id: 5d471751-9675-428d-917b-70f44f9630b0 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5d471751-9675-428d-917b-70f44f9630b0; Ip=[131.228.2.35]; Helo=[hybrid2.ext.net.nokia.com] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: HE1PR07MB0825 Subject: [lng-odp] [API-NEXT PATCH 2/4] api: deprecated: add ODP_DEPRECATED configure option X-BeenThere: lng-odp@lists.linaro.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: "The OpenDataPlane \(ODP\) List" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: lng-odp-bounces@lists.linaro.org Sender: "lng-odp" Added ODP_DEPRECATED macro which is visible through API and is used to control if deprecated API definitions are enabled or disabled. Deprecated definitions are first moved behind this macro and then removed completely in a later API version. Deprecated APIs are disabled by default. Added configuration option --enable-deprecated to control the macro value. Signed-off-by: Petri Savolainen --- configure.ac | 19 +++++++++-- include/odp/api/spec/.gitignore | 1 + include/odp/api/spec/deprecated.h.in | 38 ++++++++++++++++++++++ include/odp_api.h | 1 + platform/Makefile.inc | 1 + platform/linux-generic/Makefile.am | 1 + .../linux-generic/include/odp/api/deprecated.h | 26 +++++++++++++++ 7 files changed, 85 insertions(+), 2 deletions(-) create mode 100644 include/odp/api/spec/deprecated.h.in create mode 100644 platform/linux-generic/include/odp/api/deprecated.h -- 2.8.1 diff --git a/configure.ac b/configure.ac index e4bd3a7..9927916 100644 --- a/configure.ac +++ b/configure.ac @@ -16,7 +16,8 @@ ODP_VERSION_API_MAJOR=odpapi_major_version AC_SUBST(ODP_VERSION_API_MAJOR) ODP_VERSION_API_MINOR=odpapi_minor_version AC_SUBST(ODP_VERSION_API_MINOR) -AC_CONFIG_FILES([include/odp/api/spec/version.h]) +AC_CONFIG_FILES([include/odp/api/spec/version.h + include/odp/api/spec/deprecated.h]) AM_INIT_AUTOMAKE([1.9 tar-pax subdir-objects]) AC_CONFIG_SRCDIR([helper/config.h.in]) @@ -284,7 +285,7 @@ ODP_CFLAGS="$ODP_CFLAGS -DODP_DEBUG=$ODP_DEBUG" ODP_ABI_COMPAT=1 abi_compat=yes AC_ARG_ENABLE([abi-compat], - [ --disable-abi-compat disables ABI compatible mode, enables inline code in header files], + [ --disable-abi-compat disables ABI compatible mode, enables inline code in header files], [if test "x$enableval" = "xno"; then ODP_ABI_COMPAT=0 abi_compat=no @@ -294,6 +295,19 @@ AC_ARG_ENABLE([abi-compat], AC_SUBST(ODP_ABI_COMPAT) ########################################################################## +# Enable/disable deprecated API definitions +########################################################################## +ODP_DEPRECATED=0 +deprecated=no +AC_ARG_ENABLE([deprecated], + [ --enable-deprecated enable deprecated API definitions], + [if test "x$enableval" = "xyes"; then + ODP_DEPRECATED=1 + deprecated=yes + fi]) +AC_SUBST(ODP_DEPRECATED) + +########################################################################## # Default warning setup ########################################################################## ODP_CFLAGS="$ODP_CFLAGS -W -Wall -Werror -Wstrict-prototypes -Wmissing-prototypes" @@ -379,6 +393,7 @@ AC_MSG_RESULT([ static libraries: ${enable_static} shared libraries: ${enable_shared} ABI compatible: ${abi_compat} + Deprecated APIs: ${deprecated} cunit: ${cunit_support} test_vald: ${test_vald} test_perf: ${test_perf} diff --git a/include/odp/api/spec/.gitignore b/include/odp/api/spec/.gitignore index 6702033..df9c87d 100644 --- a/include/odp/api/spec/.gitignore +++ b/include/odp/api/spec/.gitignore @@ -1 +1,2 @@ +deprecated.h version.h diff --git a/include/odp/api/spec/deprecated.h.in b/include/odp/api/spec/deprecated.h.in new file mode 100644 index 0000000..a319064 --- /dev/null +++ b/include/odp/api/spec/deprecated.h.in @@ -0,0 +1,38 @@ +/* Copyright (c) 2017, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +/** + * @file + * + * Macro for deprecated API definitions + */ + +#ifndef ODP_API_DEPRECATED_H_ +#define ODP_API_DEPRECATED_H_ +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * Deprecated API definitions + * + * Some API definitions may be deprecated by this or a previous API version. + * This macro controls if those are enabled (and visible to the application) + * or disabled. + * + * * 0: Deprecated API definitions are disabled + * * 1: Deprecated API definitions are enabled + */ +#define ODP_DEPRECATED @ODP_DEPRECATED@ + +#ifdef __cplusplus +} +#endif + +#include +#endif diff --git a/include/odp_api.h b/include/odp_api.h index 73e5309..962415f 100644 --- a/include/odp_api.h +++ b/include/odp_api.h @@ -18,6 +18,7 @@ extern "C" { #endif +#include #include #include #include diff --git a/platform/Makefile.inc b/platform/Makefile.inc index 874cf88..f282770 100644 --- a/platform/Makefile.inc +++ b/platform/Makefile.inc @@ -29,6 +29,7 @@ odpapispecinclude_HEADERS = \ $(top_srcdir)/include/odp/api/spec/cpumask.h \ $(top_srcdir)/include/odp/api/spec/crypto.h \ $(top_srcdir)/include/odp/api/spec/debug.h \ + $(top_srcdir)/include/odp/api/spec/deprecated.h \ $(top_srcdir)/include/odp/api/spec/errno.h \ $(top_srcdir)/include/odp/api/spec/event.h \ $(top_srcdir)/include/odp/api/spec/hash.h \ diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index deab284..242c54a 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -34,6 +34,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 0000000..82797eb --- /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 + +#ifdef __cplusplus +} +#endif + +#endif