| 2 |
raymond |
1 |
// SPDX-License-Identifier: LGPL-3.0-or-later
|
|
|
2 |
// Copyright 2016-2026 Hristo Gochkov, Mathieu Carbou, Emil Muratov, Will Miles
|
|
|
3 |
|
|
|
4 |
#pragma once
|
|
|
5 |
|
|
|
6 |
#ifdef __cplusplus
|
|
|
7 |
extern "C" {
|
|
|
8 |
#endif
|
|
|
9 |
|
|
|
10 |
/** Major version number (X.x.x) */
|
|
|
11 |
#define ASYNCTCP_VERSION_MAJOR 3
|
|
|
12 |
/** Minor version number (x.X.x) */
|
|
|
13 |
#define ASYNCTCP_VERSION_MINOR 4
|
|
|
14 |
/** Patch version number (x.x.X) */
|
|
|
15 |
#define ASYNCTCP_VERSION_PATCH 10
|
|
|
16 |
|
|
|
17 |
/**
|
|
|
18 |
* Macro to convert version number into an integer
|
|
|
19 |
*
|
|
|
20 |
* To be used in comparisons, such as ASYNCTCP_VERSION >= ASYNCTCP_VERSION_VAL(2, 0, 0)
|
|
|
21 |
*/
|
|
|
22 |
#define ASYNCTCP_VERSION_VAL(major, minor, patch) ((major << 16) | (minor << 8) | (patch))
|
|
|
23 |
|
|
|
24 |
/**
|
|
|
25 |
* Current version, as an integer
|
|
|
26 |
*
|
|
|
27 |
* To be used in comparisons, such as ASYNCTCP_VERSION_NUM >= ASYNCTCP_VERSION_VAL(2, 0, 0)
|
|
|
28 |
*/
|
|
|
29 |
#define ASYNCTCP_VERSION_NUM ASYNCTCP_VERSION_VAL(ASYNCTCP_VERSION_MAJOR, ASYNCTCP_VERSION_MINOR, ASYNCTCP_VERSION_PATCH)
|
|
|
30 |
|
|
|
31 |
/**
|
|
|
32 |
* Current version, as string
|
|
|
33 |
*/
|
|
|
34 |
#define df2xstr(s) #s
|
|
|
35 |
#define df2str(s) df2xstr(s)
|
|
|
36 |
#define ASYNCTCP_VERSION df2str(ASYNCTCP_VERSION_MAJOR) "." df2str(ASYNCTCP_VERSION_MINOR) "." df2str(ASYNCTCP_VERSION_PATCH)
|
|
|
37 |
|
|
|
38 |
#ifdef __cplusplus
|
|
|
39 |
}
|
|
|
40 |
#endif
|