summaryrefslogtreecommitdiffstats
path: root/config.tests
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@theqtcompany.com>2015-09-10 12:46:27 +0200
committerAlex Blasche <alexander.blasche@theqtcompany.com>2015-09-10 13:24:17 +0000
commit99a6d0b2ed9a0f6520aa0fe013821176ce357773 (patch)
tree2dfdf3cfd4156cc7e590185e506703e9bcb51468 /config.tests
parent5bad528789b98c259920424ad530a4e40f91a590 (diff)
Initial import of libmodbus version 3.1.2
Link libmodbus statically against the related modbus plugin. This enables us to deploy the library on all platforms. Note: In order to do so a small patch had to be applied for Windows. See the patches folder while upgrading the library. The library is LGPL 2.1 or later. Therefore we cannot statically link it against the library. The libmodbus plugin has to remain forever. However the plugin will eventually be invisible to the user. Another commit will add the option to dynamically link against the platforms version. Change-Id: I1e08ea90f8517afa38e059aed35441dc048286ff Reviewed-by: Alex Blasche <alexander.blasche@theqtcompany.com> Reviewed-by: Karsten Heimrich <karsten.heimrich@theqtcompany.com>
Diffstat (limited to 'config.tests')
-rw-r--r--config.tests/libmodbus/libmodbus.pro6
-rw-r--r--config.tests/libmodbus_accept4/libmodbus_accept4.pro3
-rw-r--r--config.tests/libmodbus_accept4/main.cpp (renamed from config.tests/libmodbus/main.cpp)8
-rw-r--r--config.tests/libmodbus_byteswap/libmodbus_byteswap.pro3
-rw-r--r--config.tests/libmodbus_byteswap/main.cpp41
-rw-r--r--config.tests/libmodbus_rs485/libmodbus_rs485.pro3
-rw-r--r--config.tests/libmodbus_rs485/main.cpp44
-rw-r--r--config.tests/libmodbus_strlcpy/libmodbus_strlcpy.pro3
-rw-r--r--config.tests/libmodbus_strlcpy/main.cpp42
-rw-r--r--config.tests/libmodbus_tiocmrts/libmodbus_tiocmrts.pro3
-rw-r--r--config.tests/libmodbus_tiocmrts/main.cpp44
11 files changed, 190 insertions, 10 deletions
diff --git a/config.tests/libmodbus/libmodbus.pro b/config.tests/libmodbus/libmodbus.pro
deleted file mode 100644
index 9af89b9..0000000
--- a/config.tests/libmodbus/libmodbus.pro
+++ /dev/null
@@ -1,6 +0,0 @@
-TEMPLATE = app
-
-CONFIG += link_pkgconfig
-PKGCONFIG += libmodbus
-
-SOURCES += main.cpp
diff --git a/config.tests/libmodbus_accept4/libmodbus_accept4.pro b/config.tests/libmodbus_accept4/libmodbus_accept4.pro
new file mode 100644
index 0000000..9f0da76
--- /dev/null
+++ b/config.tests/libmodbus_accept4/libmodbus_accept4.pro
@@ -0,0 +1,3 @@
+TEMPLATE = app
+
+SOURCES += main.cpp
diff --git a/config.tests/libmodbus/main.cpp b/config.tests/libmodbus_accept4/main.cpp
index 889a9a0..89fb8f4 100644
--- a/config.tests/libmodbus/main.cpp
+++ b/config.tests/libmodbus_accept4/main.cpp
@@ -33,12 +33,12 @@
** $QT_END_LICENSE$
**
****************************************************************************/
-#include <modbus/modbus.h>
+#include <sys/types.h>
+#include <sys/socket.h>
int main()
{
- modbus_mapping_t *mapping;
- mapping = modbus_mapping_new(0,0,0,0);
- modbus_mapping_free(mapping);
+ socklen_t length = 0;
+ accept4(1, 0, &length, SOCK_CLOEXEC);
return 0;
}
diff --git a/config.tests/libmodbus_byteswap/libmodbus_byteswap.pro b/config.tests/libmodbus_byteswap/libmodbus_byteswap.pro
new file mode 100644
index 0000000..9f0da76
--- /dev/null
+++ b/config.tests/libmodbus_byteswap/libmodbus_byteswap.pro
@@ -0,0 +1,3 @@
+TEMPLATE = app
+
+SOURCES += main.cpp
diff --git a/config.tests/libmodbus_byteswap/main.cpp b/config.tests/libmodbus_byteswap/main.cpp
new file mode 100644
index 0000000..2a35e8b
--- /dev/null
+++ b/config.tests/libmodbus_byteswap/main.cpp
@@ -0,0 +1,41 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtSerialBus module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <byteswap.h>
+
+int main()
+{
+ return 0;
+}
diff --git a/config.tests/libmodbus_rs485/libmodbus_rs485.pro b/config.tests/libmodbus_rs485/libmodbus_rs485.pro
new file mode 100644
index 0000000..9f0da76
--- /dev/null
+++ b/config.tests/libmodbus_rs485/libmodbus_rs485.pro
@@ -0,0 +1,3 @@
+TEMPLATE = app
+
+SOURCES += main.cpp
diff --git a/config.tests/libmodbus_rs485/main.cpp b/config.tests/libmodbus_rs485/main.cpp
new file mode 100644
index 0000000..53cb3df
--- /dev/null
+++ b/config.tests/libmodbus_rs485/main.cpp
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtSerialBus module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <sys/ioctl.h>
+
+int main()
+{
+#ifndef TIOCSRS485
+#error choke here
+#endif
+ return 0;
+}
diff --git a/config.tests/libmodbus_strlcpy/libmodbus_strlcpy.pro b/config.tests/libmodbus_strlcpy/libmodbus_strlcpy.pro
new file mode 100644
index 0000000..9f0da76
--- /dev/null
+++ b/config.tests/libmodbus_strlcpy/libmodbus_strlcpy.pro
@@ -0,0 +1,3 @@
+TEMPLATE = app
+
+SOURCES += main.cpp
diff --git a/config.tests/libmodbus_strlcpy/main.cpp b/config.tests/libmodbus_strlcpy/main.cpp
new file mode 100644
index 0000000..8ab25b6
--- /dev/null
+++ b/config.tests/libmodbus_strlcpy/main.cpp
@@ -0,0 +1,42 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtSerialBus module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <string.h>
+
+int main()
+{
+ strlcpy(0, 0, 0);
+ return 0;
+}
diff --git a/config.tests/libmodbus_tiocmrts/libmodbus_tiocmrts.pro b/config.tests/libmodbus_tiocmrts/libmodbus_tiocmrts.pro
new file mode 100644
index 0000000..9f0da76
--- /dev/null
+++ b/config.tests/libmodbus_tiocmrts/libmodbus_tiocmrts.pro
@@ -0,0 +1,3 @@
+TEMPLATE = app
+
+SOURCES += main.cpp
diff --git a/config.tests/libmodbus_tiocmrts/main.cpp b/config.tests/libmodbus_tiocmrts/main.cpp
new file mode 100644
index 0000000..51c9e53
--- /dev/null
+++ b/config.tests/libmodbus_tiocmrts/main.cpp
@@ -0,0 +1,44 @@
+/****************************************************************************
+**
+** Copyright (C) 2015 The Qt Company Ltd.
+** Contact: http://www.qt.io/licensing/
+**
+** This file is part of the QtSerialBus module of the Qt Toolkit.
+**
+** $QT_BEGIN_LICENSE:LGPL3$
+** Commercial License Usage
+** Licensees holding valid commercial Qt licenses may use this file in
+** accordance with the commercial license agreement provided with the
+** Software or, alternatively, in accordance with the terms contained in
+** a written agreement between you and The Qt Company. For licensing terms
+** and conditions see http://www.qt.io/terms-conditions. For further
+** information use the contact form at http://www.qt.io/contact-us.
+**
+** GNU Lesser General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU Lesser
+** General Public License version 3 as published by the Free Software
+** Foundation and appearing in the file LICENSE.LGPLv3 included in the
+** packaging of this file. Please review the following information to
+** ensure the GNU Lesser General Public License version 3 requirements
+** will be met: https://www.gnu.org/licenses/lgpl.html.
+**
+** GNU General Public License Usage
+** Alternatively, this file may be used under the terms of the GNU
+** General Public License version 2.0 or later as published by the Free
+** Software Foundation and appearing in the file LICENSE.GPL included in
+** the packaging of this file. Please review the following information to
+** ensure the GNU General Public License version 2.0 requirements will be
+** met: http://www.gnu.org/licenses/gpl-2.0.html.
+**
+** $QT_END_LICENSE$
+**
+****************************************************************************/
+#include <sys/ioctl.h>
+
+int main()
+{
+#ifndef TIOCM_RTS
+#error choke here
+#endif
+ return 0;
+}