diff --git a/.vscode/launch.json b/.vscode/launch.json index 97ffe0b..8550dde 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -4,69 +4,76 @@ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 "version": "0.2.0", "configurations": [ - - { - "name": "(gdb) vscp-helper-lib w/ connect-test", - "type": "cppdbg", - "request": "launch", - "program": "${workspaceFolder}/tests/connecttest/build/unittest", - "args": [], - "stopAtEntry": false, - "cwd": "${workspaceFolder}", - "environment": [], - "externalConsole": false, - "MIMode": "gdb", - "setupCommands": [ - { - "description": "Enable pretty-printing for gdb", - "text": "-enable-pretty-printing", - "ignoreFailures": true - } - ], - "preLaunchTask": "clean & build vscp-helper-lib", - "miDebuggerPath": "/usr/bin/gdb" - }, - { - "name": "(gdb) vscp-helper-lib w/ long-test", - "type": "cppdbg", - "request": "launch", - "program": "${workspaceFolder}/tests/longtest/build/unittest", - "args": [], - "stopAtEntry": false, - "cwd": "${workspaceFolder}", - "environment": [], - "externalConsole": false, - "MIMode": "gdb", - "setupCommands": [ - { - "description": "Enable pretty-printing for gdb", - "text": "-enable-pretty-printing", - "ignoreFailures": true - } - ], - "preLaunchTask": "clean & build vscp-helper-lib", - "miDebuggerPath": "/usr/bin/gdb" - }, - { - "name": "(gdb) unittest", - "type": "cppdbg", - "request": "launch", - "program": "/home/akhe/development/VSCP/vscp-helper-lib/tests/unittest", - "args": [], - "stopAtEntry": false, - "cwd": "${workspaceFolder}", - "environment": [], - "externalConsole": false, - "MIMode": "gdb", - "setupCommands": [ - { - "description": "Enable pretty-printing for gdb", - "text": "-enable-pretty-printing", - "ignoreFailures": true - } - ], - "preLaunchTask": "", - "miDebuggerPath": "/usr/bin/gdb" - } + { + "name": "(gdb) vscp-helper-lib w/ connect-test", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/tests/connecttest/build/unittest", + "args": [], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ], + "preLaunchTask": "clean & build vscp-helper-lib", + "miDebuggerPath": "/usr/bin/gdb" + }, + { + "name": "(gdb) vscp-helper-lib w/ long-test", + "type": "cppdbg", + "request": "launch", + "program": "${workspaceFolder}/tests/longtest/build/unittest", + "args": [], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ], + "preLaunchTask": "clean & build vscp-helper-lib", + "miDebuggerPath": "/usr/bin/gdb" + }, + { + "name": "(gdb) unittest", + "type": "cppdbg", + "request": "launch", + "program": "/home/akhe/development/VSCP/vscp-helper-lib/tests/unittest", + "args": [], + "stopAtEntry": false, + "cwd": "${workspaceFolder}", + "environment": [], + "externalConsole": false, + "MIMode": "gdb", + "setupCommands": [ + { + "description": "Enable pretty-printing for gdb", + "text": "-enable-pretty-printing", + "ignoreFailures": true + } + ], + "preLaunchTask": "", + "miDebuggerPath": "/usr/bin/gdb" + }, + { + "type": "cmake", + "request": "launch", + "name": "Debug portfile(s)", + "cmakeDebugType": "external", + "pipeName": "\\\\.\\pipe\\vcpkg_ext_portfile_dbg", + "preLaunchTask": "Debug vcpkg commands" + } ] } \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 42dff4e..1fefb44 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -1,137 +1,149 @@ { "version": "2.0.0", "tasks": [ - { - "taskName": "Linux: Build vscp-helper-lib", - "type": "shell", - "command": "cd build; make", - "args": [], - "group": { - "kind": "build", - "isDefault": false - }, - "problemMatcher": "$gcc" + { + "taskName": "Linux: Build vscp-helper-lib", + "type": "shell", + "command": "cd build; make", + "args": [], + "group": { + "kind": "build", + "isDefault": false }, - { - "taskName": "Linux: Clean & build vscp-helper-lib", - "type": "shell", - "command": "mkdir build; cd build; rm CMakeCache.txt; cmake --clean-first .. -DCMAKE_BUILD_TYPE=Debug; make clean; make", - "args": [], - "group": { - "kind": "build", - "isDefault": false - }, - "problemMatcher": { - "owner": "cpp", - "fileLocation": ["relative", "${workspaceFolder}"], - "pattern": { - "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", - "file": 1, - "line": 2, - "column": 3, - "severity": 4, - "message": 5 - } + "problemMatcher": "$gcc" + }, + { + "taskName": "Linux: Clean & build vscp-helper-lib", + "type": "shell", + "command": "mkdir build; cd build; rm CMakeCache.txt; cmake --clean-first .. -DCMAKE_BUILD_TYPE=Debug; make clean; make", + "args": [], + "group": { + "kind": "build", + "isDefault": false + }, + "problemMatcher": { + "owner": "cpp", + "fileLocation": [ + "relative", + "${workspaceFolder}" + ], + "pattern": { + "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", + "file": 1, + "line": 2, + "column": 3, + "severity": 4, + "message": 5 } + } + }, + { + "taskName": "Windows: Build vscp-helper-lib", + "type": "shell", + "command": "cd build; msbuild libvscphelper.sln /p:Configuration=Debug", + "args": [], + "group": { + "kind": "build", + "isDefault": false }, - { - "taskName": "Windows: Build vscp-helper-lib", - "type": "shell", - "command": "cd build; msbuild libvscphelper.sln /p:Configuration=Debug", - "args": [], - "group": { - "kind": "build", - "isDefault": false - }, - "problemMatcher": "$gcc" + "problemMatcher": "$gcc" + }, + { + "taskName": "Windows: Clean & build vscp-helper-lib debug", + "type": "shell", + "command": "cd build; cmake .. -G 'Visual Studio 16 2019' -DCMAKE_BUILD_TYPE=debug -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_TOOLCHAIN_FILE=C:\\Users\\Administrator\\Desktop\\Development\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake; msbuild libvscphelper.sln /p:Configuration=Debug", + "args": [], + "group": { + "kind": "build", + "isDefault": false }, - { - "taskName": "Windows: Clean & build vscp-helper-lib debug", - "type": "shell", - "command": "cd build; cmake .. -G 'Visual Studio 16 2019' -DCMAKE_BUILD_TYPE=debug -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_TOOLCHAIN_FILE=C:\\Users\\Administrator\\Desktop\\Development\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake; msbuild libvscphelper.sln /p:Configuration=Debug", - "args": [], - "group": { - "kind": "build", - "isDefault": false - }, - "problemMatcher": "$gcc" + "problemMatcher": "$gcc" + }, + { + "taskName": "Windows: Clean & build vscp-helper-lib release", + "type": "shell", + "command": "cd build; cmake .. -G 'Visual Studio 16 2019' -DCMAKE_BUILD_TYPE=release -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_TOOLCHAIN_FILE=C:\\Users\\Administrator\\Desktop\\Development\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake; msbuild libvscphelper.sln /p:Configuration=Debug", + "args": [], + "group": { + "kind": "build", + "isDefault": false }, - { - "taskName": "Windows: Clean & build vscp-helper-lib release", - "type": "shell", - "command": "cd build; cmake .. -G 'Visual Studio 16 2019' -DCMAKE_BUILD_TYPE=release -DVCPKG_TARGET_TRIPLET=x64-windows -DCMAKE_TOOLCHAIN_FILE=C:\\Users\\Administrator\\Desktop\\Development\\vcpkg\\scripts\\buildsystems\\vcpkg.cmake; msbuild libvscphelper.sln /p:Configuration=Debug", - "args": [], - "group": { - "kind": "build", - "isDefault": false - }, - "problemMatcher": "$gcc" + "problemMatcher": "$gcc" + }, + { + "taskName": "Linux: clean & build alltest", + "type": "shell", + "command": "cd tests/alltest; mkdir build; cd build; rm CMakeCache.txt; cmake .. -DCMAKE_BUILD_TYPE=Debug; make --clean-first", + "args": [], + "group": { + "kind": "build", + "isDefault": false }, - { - "taskName": "Linux: clean & build alltest", - "type": "shell", - "command": "cd tests/alltest; mkdir build; cd build; rm CMakeCache.txt; cmake .. -DCMAKE_BUILD_TYPE=Debug; make --clean-first", - "args": [], - "group": { - "kind": "build", - "isDefault": false - }, - "problemMatcher": { - "owner": "cpp", - "fileLocation": ["relative", "${workspaceFolder}"], - "pattern": { - "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", - "file": 1, - "line": 2, - "column": 3, - "severity": 4, - "message": 5 - } + "problemMatcher": { + "owner": "cpp", + "fileLocation": [ + "relative", + "${workspaceFolder}" + ], + "pattern": { + "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", + "file": 1, + "line": 2, + "column": 3, + "severity": 4, + "message": 5 } + } + }, + { + "taskName": "Linux: clean & build connecttest", + "type": "shell", + "command": "cd tests/connecttest; mkdir build; cd build; rm CMakeCache.txt; cmake --clean-first .. -DCMAKE_BUILD_TYPE=Debug; make clean; make", + "args": [], + "group": { + "kind": "build", + "isDefault": false }, - { - "taskName": "Linux: clean & build connecttest", - "type": "shell", - "command": "cd tests/connecttest; mkdir build; cd build; rm CMakeCache.txt; cmake --clean-first .. -DCMAKE_BUILD_TYPE=Debug; make clean; make", - "args": [], - "group": { - "kind": "build", - "isDefault": false - }, - "problemMatcher": { - "owner": "cpp", - "fileLocation": ["relative", "${workspaceFolder}"], - "pattern": { - "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", - "file": 1, - "line": 2, - "column": 3, - "severity": 4, - "message": 5 - } + "problemMatcher": { + "owner": "cpp", + "fileLocation": [ + "relative", + "${workspaceFolder}" + ], + "pattern": { + "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", + "file": 1, + "line": 2, + "column": 3, + "severity": 4, + "message": 5 } + } + }, + { + "taskName": "Linux: Clean & build longtest", + "type": "shell", + "command": "cd tests/longtest; mkdir build; cd build; rm CMakeCache.txt; cmake --clean-first .. -DCMAKE_BUILD_TYPE=Debug; make clean; make", + "args": [], + "group": { + "kind": "build", + "isDefault": false }, - { - "taskName": "Linux: Clean & build longtest", - "type": "shell", - "command": "cd tests/longtest; mkdir build; cd build; rm CMakeCache.txt; cmake --clean-first .. -DCMAKE_BUILD_TYPE=Debug; make clean; make", - "args": [], - "group": { - "kind": "build", - "isDefault": false - }, - "problemMatcher": { - "owner": "cpp", - "fileLocation": ["relative", "${workspaceFolder}"], - "pattern": { - "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", - "file": 1, - "line": 2, - "column": 3, - "severity": 4, - "message": 5 - } + "problemMatcher": { + "owner": "cpp", + "fileLocation": [ + "relative", + "${workspaceFolder}" + ], + "pattern": { + "regexp": "^(.*):(\\d+):(\\d+):\\s+(warning|error):\\s+(.*)$", + "file": 1, + "line": 2, + "column": 3, + "severity": 4, + "message": 5 } + } } ] } \ No newline at end of file diff --git a/windows/libvscphelper.cpp b/windows/libvscphelper.cpp index 7b49070..342bd2d 100644 --- a/windows/libvscphelper.cpp +++ b/windows/libvscphelper.cpp @@ -4,7 +4,7 @@ // // The MIT License (MIT) // -// Copyright (c) 2000-2022 Ake Hedman, the VSCP Project +// Copyright (c) 2000-2024 Ake Hedman, the VSCP Project // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -40,7 +40,7 @@ #include #include -#include +#include #include #include diff --git a/windows/libvscphelper.h b/windows/libvscphelper.h index 3821786..ed7c1fe 100644 --- a/windows/libvscphelper.h +++ b/windows/libvscphelper.h @@ -4,7 +4,7 @@ // // The MIT License (MIT) // -// Copyright (c) 2000-2022 Ake Hedman, the VSCP Project +// Copyright (c) 2000-2024 Ake Hedman, the VSCP Project // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal