diff options
author | Anders Roxell <anders.roxell@linaro.org> | 2015-01-28 00:49:02 +0100 |
---|---|---|
committer | Maxim Uvarov <maxim.uvarov@linaro.org> | 2015-01-29 20:42:38 +0300 |
commit | 58e79732e23b04c9fc2f1ea1a755640b82fb2e9b (patch) | |
tree | 193adb495e80e6c4c8e1bc3c4d84ba692ca6e9f3 | |
parent | 49bf1afedff2cdd24ecaa64c07a629e87c4fbebd (diff) |
api: version: move defines
Align the style with the rest of the header files of linux-generic
Signed-off-by: Anders Roxell <anders.roxell@linaro.org>
Reviewed-by: Balasubramanian Manoharan <bala.manoharan@linaro.org>
Reviewed-by: Taras Kondratiuk <taras.kondratiuk@linaro.org>
Signed-off-by: Maxim Uvarov <maxim.uvarov@linaro.org>
-rw-r--r-- | include/odp/api/version.h | 18 | ||||
-rw-r--r-- | platform/linux-generic/Makefile.am | 3 | ||||
-rw-r--r-- | platform/linux-generic/include/odp/plat/version_types.h | 30 | ||||
-rw-r--r-- | platform/linux-generic/include/odp/version.h | 7 |
4 files changed, 41 insertions, 17 deletions
diff --git a/include/odp/api/version.h b/include/odp/api/version.h index 69be81c5..eb798106 100644 --- a/include/odp/api/version.h +++ b/include/odp/api/version.h @@ -48,25 +48,11 @@ extern "C" { */ #define ODP_VERSION_API_MINOR 0 -/** @internal Version string expand */ -#define ODP_VERSION_STR_EXPAND(x) #x - -/** @internal Version to string */ -#define ODP_VERSION_TO_STR(x) ODP_VERSION_STR_EXPAND(x) - -/** @internal API version string */ -#define ODP_VERSION_API_STR \ -ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \ -ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \ -ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR) - /** * Returns ODP API version string */ -static inline const char *odp_version_api_str(void) -{ - return ODP_VERSION_API_STR; -} +const char *odp_version_api_str(void); + /** * Returns ODP implementation version string diff --git a/platform/linux-generic/Makefile.am b/platform/linux-generic/Makefile.am index 3624377b..addb5ec1 100644 --- a/platform/linux-generic/Makefile.am +++ b/platform/linux-generic/Makefile.am @@ -56,7 +56,8 @@ odpplatinclude_HEADERS = \ $(top_srcdir)/platform/linux-generic/include/odp/plat/pool_types.h \ $(top_srcdir)/platform/linux-generic/include/odp/plat/queue_types.h \ $(top_srcdir)/platform/linux-generic/include/odp/plat/schedule_types.h \ - $(top_srcdir)/platform/linux-generic/include/odp/plat/shared_memory_types.h + $(top_srcdir)/platform/linux-generic/include/odp/plat/shared_memory_types.h \ + $(top_srcdir)/platform/linux-generic/include/odp/plat/version_types.h odpapiincludedir= $(includedir)/odp/api odpapiinclude_HEADERS = \ diff --git a/platform/linux-generic/include/odp/plat/version_types.h b/platform/linux-generic/include/odp/plat/version_types.h new file mode 100644 index 00000000..e3327eb3 --- /dev/null +++ b/platform/linux-generic/include/odp/plat/version_types.h @@ -0,0 +1,30 @@ +/* Copyright (c) 2015, Linaro Limited + * All rights reserved. + * + * SPDX-License-Identifier: BSD-3-Clause + */ + +#ifndef ODP_VERSION_TYPESH_ +#define ODP_VERSION_TYPESH_ + +#ifdef __cplusplus +extern "C" { +#endif + +/** @internal Version string expand */ +#define ODP_VERSION_STR_EXPAND(x) #x + +/** @internal Version to string */ +#define ODP_VERSION_TO_STR(x) ODP_VERSION_STR_EXPAND(x) + +/** @internal API version string */ +#define ODP_VERSION_API_STR \ +ODP_VERSION_TO_STR(ODP_VERSION_API_GENERATION) "." \ +ODP_VERSION_TO_STR(ODP_VERSION_API_MAJOR) "." \ +ODP_VERSION_TO_STR(ODP_VERSION_API_MINOR) + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/platform/linux-generic/include/odp/version.h b/platform/linux-generic/include/odp/version.h index aaedd4fa..f29320a6 100644 --- a/platform/linux-generic/include/odp/version.h +++ b/platform/linux-generic/include/odp/version.h @@ -17,10 +17,17 @@ extern "C" { #endif +#include <odp/plat/version_types.h> + /** @ingroup odp_ver_abt_log_dbg * @{ */ +static inline const char *odp_version_api_str(void) +{ + return ODP_VERSION_API_STR; +} + /** * @} */ |