| 1 | /* |
| 2 | * SPDX-License-Identifier: MIT |
| 3 | * |
| 4 | * Copyright (C) 2021 Mathieu Desnoyers <mathieu.desnoyers@efficios.com> |
| 5 | * |
| 6 | * LTTng-UST API compatibility header |
| 7 | */ |
| 8 | |
| 9 | #ifndef _LTTNG_UST_API_COMPAT_H |
| 10 | #define _LTTNG_UST_API_COMPAT_H |
| 11 | |
| 12 | /* |
| 13 | * In order to disable compatibility API for a range of soname major |
| 14 | * versions, define LTTNG_UST_COMPAT_API_VERSION to the oldest major |
| 15 | * version API for which to provide compatibility. |
| 16 | * |
| 17 | * If LTTNG_UST_COMPAT_API_VERSION is undefined, API compatibility for |
| 18 | * all API versions is provided. |
| 19 | * If LTTNG_UST_COMPAT_API_VERSION is defined to N, API compatibility |
| 20 | * for soname N or higher is provided, leaving out (not compiling) |
| 21 | * compatibility for soname lower than N. |
| 22 | */ |
| 23 | |
| 24 | #ifndef LTTNG_UST_COMPAT_API_VERSION |
| 25 | #define LTTNG_UST_COMPAT_API_VERSION 0 |
| 26 | #endif |
| 27 | |
| 28 | #define LTTNG_UST_COMPAT_API(major) \ |
| 29 | (LTTNG_UST_COMPAT_API_VERSION <= (major)) |
| 30 | |
| 31 | #endif /* _LTTNG_UST_API_COMPAT_H */ |