Avoid negative value in FD_SET call
[libmodbus.git] / tests / version.c
blob0b266d13495c064050f573c6c9b3e89e5bed0ca3
1 /*
2 * Copyright © Stéphane Raimbault <stephane.raimbault@gmail.com>
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
7 #include <stdio.h>
8 #include <modbus.h>
10 int main(void)
12 printf("Compiled with libmodbus version %s (%06X)\n", LIBMODBUS_VERSION_STRING, LIBMODBUS_VERSION_HEX);
13 printf("Linked with libmodbus version %d.%d.%d\n",
14 libmodbus_version_major, libmodbus_version_minor, libmodbus_version_micro);
16 if (LIBMODBUS_VERSION_CHECK(2, 1, 0)) {
17 printf("The functions to read/write float values are available (2.1.0).\n");
20 if (LIBMODBUS_VERSION_CHECK(2, 1, 1)) {
21 printf("Oh gosh, brand new API (2.1.1)!\n");
24 return 0;