File: version.c

package info (click to toggle)
liburing 2.12-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,104 kB
  • sloc: ansic: 56,796; sh: 806; makefile: 575; cpp: 32
file content (25 lines) | stat: -rw-r--r-- 576 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
/* SPDX-License-Identifier: MIT */
/*
 * Description: check version macros and runtime checks work
 *
 */
#include "liburing.h"
#include "helpers.h"

int main(int argc, char *argv[])
{
	if (IO_URING_CHECK_VERSION(io_uring_major_version(), io_uring_minor_version()))
		return T_EXIT_FAIL;

	if (io_uring_major_version() != IO_URING_VERSION_MAJOR)
		return T_EXIT_FAIL;

	if (io_uring_minor_version() != IO_URING_VERSION_MINOR)
		return T_EXIT_FAIL;

#if IO_URING_CHECK_VERSION(IO_URING_VERSION_MAJOR, IO_URING_VERSION_MINOR)
	return T_EXIT_FAIL;
#endif

	return T_EXIT_PASS;
}