Tests: Fix abi conflict test when building with clang
[lttng-ust.git] / include / lttng / ust-api-compat.h
CommitLineData
1c196845
MJ
1// SPDX-FileCopyrightText: 2021 Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
2//
3// SPDX-License-Identifier: MIT
4
cbc06a3b 5/*
cbc06a3b
MD
6 * LTTng-UST API compatibility header
7 */
8
9#ifndef _LTTNG_UST_API_COMPAT_H
10#define _LTTNG_UST_API_COMPAT_H
11
12/*
1f8a8ec9
MD
13 * The compat API version controls backward API compatibility at the
14 * source-code level.
15 *
16 * In order to disable compatibility API for a range of API versions, define
17 * LTTNG_UST_COMPAT_API_VERSION to the oldest API version for which to provide
18 * compatibility.
cbc06a3b
MD
19 *
20 * If LTTNG_UST_COMPAT_API_VERSION is undefined, API compatibility for
21 * all API versions is provided.
22 * If LTTNG_UST_COMPAT_API_VERSION is defined to N, API compatibility
1f8a8ec9
MD
23 * for versions N or higher is provided, thus not defining compatibility macros
24 * for versions lower than N.
cbc06a3b
MD
25 */
26
27#ifndef LTTNG_UST_COMPAT_API_VERSION
28#define LTTNG_UST_COMPAT_API_VERSION 0
29#endif
30
31#define LTTNG_UST_COMPAT_API(major) \
32 (LTTNG_UST_COMPAT_API_VERSION <= (major))
33
34#endif /* _LTTNG_UST_API_COMPAT_H */
This page took 0.029648 seconds and 4 git commands to generate.