[Openvpn-devel] [S] Change in openvpn[master]: Use mingw compile definition also to unit tests
cron2 has uploaded a new patch set (#5) to the change originally created by plaisthos. ( http://gerrit.openvpn.net/c/openvpn/+/469?usp=email ) The following approvals got outdated and were removed: Code-Review+2 by flichtenheld Change subject: Use mingw compile definition also to unit tests .. Use mingw compile definition also to unit tests Currently we only apply the defines for windows APIs and Unicode to OpenVPN itself. We should rather treat the unit tests the same as our main binary to reduce potential differences. Change-Id: Ie5aa643ab6190262f7c8b9e614bedb398e85859b Signed-off-by: Arne Schwabe Acked-by: Frank Lichtenheld Message-Id: <20240116131831.31217-1-g...@greenie.muc.de> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28019.html Signed-off-by: Gert Doering --- M CMakeLists.txt 1 file changed, 8 insertions(+), 5 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/69/469/5 diff --git a/CMakeLists.txt b/CMakeLists.txt index bc46c27..6f370c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -290,6 +290,13 @@ endif () +if (MINGW) +target_compile_definitions(${target} PRIVATE +-DWIN32_LEAN_AND_MEAN +-DNTDDI_VERSION=NTDDI_VISTA -D_WIN32_WINNT=_WIN32_WINNT_VISTA +) +endif() + # optional dependencies target_link_libraries(${target} PUBLIC $ @@ -545,11 +552,7 @@ add_library_deps(openvpn) -if (MINGW) -target_compile_options(openvpn PRIVATE --DWIN32_LEAN_AND_MEAN --DNTDDI_VERSION=NTDDI_VISTA -D_WIN32_WINNT=_WIN32_WINNT_VISTA -) +if(MINGW) target_compile_options(openvpn PRIVATE -municode -UUNICODE) target_link_options(openvpn PRIVATE -municode) endif() -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/469?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ie5aa643ab6190262f7c8b9e614bedb398e85859b Gerrit-Change-Number: 469 Gerrit-PatchSet: 5 Gerrit-Owner: plaisthos Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel Gerrit-MessageType: newpatchset ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel
[Openvpn-devel] [S] Change in openvpn[master]: Use mingw compile definition also to unit tests
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/469?usp=email ) Change subject: Use mingw compile definition also to unit tests .. Use mingw compile definition also to unit tests Currently we only apply the defines for windows APIs and Unicode to OpenVPN itself. We should rather treat the unit tests the same as our main binary to reduce potential differences. Change-Id: Ie5aa643ab6190262f7c8b9e614bedb398e85859b Signed-off-by: Arne Schwabe Acked-by: Frank Lichtenheld Message-Id: <20240116131831.31217-1-g...@greenie.muc.de> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg28019.html Signed-off-by: Gert Doering --- M CMakeLists.txt 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bc46c27..6f370c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -290,6 +290,13 @@ endif () +if (MINGW) +target_compile_definitions(${target} PRIVATE +-DWIN32_LEAN_AND_MEAN +-DNTDDI_VERSION=NTDDI_VISTA -D_WIN32_WINNT=_WIN32_WINNT_VISTA +) +endif() + # optional dependencies target_link_libraries(${target} PUBLIC $ @@ -545,11 +552,7 @@ add_library_deps(openvpn) -if (MINGW) -target_compile_options(openvpn PRIVATE --DWIN32_LEAN_AND_MEAN --DNTDDI_VERSION=NTDDI_VISTA -D_WIN32_WINNT=_WIN32_WINNT_VISTA -) +if(MINGW) target_compile_options(openvpn PRIVATE -municode -UUNICODE) target_link_options(openvpn PRIVATE -municode) endif() -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/469?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ie5aa643ab6190262f7c8b9e614bedb398e85859b Gerrit-Change-Number: 469 Gerrit-PatchSet: 5 Gerrit-Owner: plaisthos Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel Gerrit-MessageType: merged ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel
[Openvpn-devel] [S] Change in openvpn[master]: Use mingw compile definition also to unit tests
Attention is currently required from: plaisthos. flichtenheld has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/469?usp=email ) Change subject: Use mingw compile definition also to unit tests .. Patch Set 4: Code-Review+2 -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/469?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ie5aa643ab6190262f7c8b9e614bedb398e85859b Gerrit-Change-Number: 469 Gerrit-PatchSet: 4 Gerrit-Owner: plaisthos Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Comment-Date: Mon, 08 Jan 2024 16:14:06 + Gerrit-HasComments: No Gerrit-Has-Labels: Yes Gerrit-MessageType: comment ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel
[Openvpn-devel] [S] Change in openvpn[master]: Use mingw compile definition also to unit tests
Attention is currently required from: flichtenheld. Hello flichtenheld, I'd like you to reexamine a change. Please visit http://gerrit.openvpn.net/c/openvpn/+/469?usp=email to look at the new patch set (#4). The following approvals got outdated and were removed: Code-Review-1 by flichtenheld Change subject: Use mingw compile definition also to unit tests .. Use mingw compile definition also to unit tests Currently we only apply the defines for windows APIs and Unicode to OpenVPN itself. We should rather treat the unit tests the same as our main binary to reduce potential differences. Change-Id: Ie5aa643ab6190262f7c8b9e614bedb398e85859b Signed-off-by: Arne Schwabe --- M CMakeLists.txt 1 file changed, 8 insertions(+), 5 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/69/469/4 diff --git a/CMakeLists.txt b/CMakeLists.txt index bc46c27..6f370c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -290,6 +290,13 @@ endif () +if (MINGW) +target_compile_definitions(${target} PRIVATE +-DWIN32_LEAN_AND_MEAN +-DNTDDI_VERSION=NTDDI_VISTA -D_WIN32_WINNT=_WIN32_WINNT_VISTA +) +endif() + # optional dependencies target_link_libraries(${target} PUBLIC $ @@ -545,11 +552,7 @@ add_library_deps(openvpn) -if (MINGW) -target_compile_options(openvpn PRIVATE --DWIN32_LEAN_AND_MEAN --DNTDDI_VERSION=NTDDI_VISTA -D_WIN32_WINNT=_WIN32_WINNT_VISTA -) +if(MINGW) target_compile_options(openvpn PRIVATE -municode -UUNICODE) target_link_options(openvpn PRIVATE -municode) endif() -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/469?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ie5aa643ab6190262f7c8b9e614bedb398e85859b Gerrit-Change-Number: 469 Gerrit-PatchSet: 4 Gerrit-Owner: plaisthos Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel Gerrit-Attention: flichtenheld Gerrit-MessageType: newpatchset ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel
[Openvpn-devel] [S] Change in openvpn[master]: Use mingw compile definition also to unit tests
Attention is currently required from: flichtenheld. plaisthos has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/469?usp=email ) Change subject: Use mingw compile definition also to unit tests .. Patch Set 3: (2 comments) File CMakeLists.txt: http://gerrit.openvpn.net/c/openvpn/+/469/comment/b683acf6_b1411977 : PS3, Line 293: target_compile_options(${target} PRIVATE -municode -UUNICODE) > combining -municode with -UUNICODE and main(void) just means the -municode > has no effect at all. […] I updated the patch to only use the same defines but not the -municode. After looking up -U that it undefines UNICODE I am not really sure anymore why we use that for the normal mingw build. http://gerrit.openvpn.net/c/openvpn/+/469/comment/5b8769bf_b8607c4b : PS3, Line 666: target_compile_definitions(${test_name} PRIVATE -Dmain=wmain) > Yeah, just don't use -municode in the first place. Done -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/469?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ie5aa643ab6190262f7c8b9e614bedb398e85859b Gerrit-Change-Number: 469 Gerrit-PatchSet: 3 Gerrit-Owner: plaisthos Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel Gerrit-Attention: flichtenheld Gerrit-Comment-Date: Wed, 03 Jan 2024 14:40:16 + Gerrit-HasComments: Yes Gerrit-Has-Labels: No Comment-In-Reply-To: flichtenheld Gerrit-MessageType: comment ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel
[Openvpn-devel] [S] Change in openvpn[master]: Use mingw compile definition also to unit tests
Attention is currently required from: plaisthos. flichtenheld has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/469?usp=email ) Change subject: Use mingw compile definition also to unit tests .. Patch Set 3: Code-Review-1 (2 comments) File CMakeLists.txt: http://gerrit.openvpn.net/c/openvpn/+/469/comment/b9f47f2d_bf7caf2c : PS3, Line 293: target_compile_options(${target} PRIVATE -municode -UUNICODE) combining -municode with -UUNICODE and main(void) just means the -municode has no effect at all. So I would drop that. http://gerrit.openvpn.net/c/openvpn/+/469/comment/38857a3b_fc89aeff : PS3, Line 666: target_compile_definitions(${test_name} PRIVATE -Dmain=wmain) Yeah, just don't use -municode in the first place. -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/469?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ie5aa643ab6190262f7c8b9e614bedb398e85859b Gerrit-Change-Number: 469 Gerrit-PatchSet: 3 Gerrit-Owner: plaisthos Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel Gerrit-Attention: plaisthos Gerrit-Comment-Date: Wed, 20 Dec 2023 12:25:20 + Gerrit-HasComments: Yes Gerrit-Has-Labels: Yes Gerrit-MessageType: comment ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel
[Openvpn-devel] [S] Change in openvpn[master]: Use mingw compile definition also to unit tests
Attention is currently required from: flichtenheld. Hello flichtenheld, I'd like you to do a code review. Please visit http://gerrit.openvpn.net/c/openvpn/+/469?usp=email to review the following change. Change subject: Use mingw compile definition also to unit tests .. Use mingw compile definition also to unit tests Currently we only apply the defines for windows APIs and Unicode to OpenVPN itself. We should rather treat the unit tests the same as our main binary to reduce potential differences. Change-Id: Ie5aa643ab6190262f7c8b9e614bedb398e85859b Signed-off-by: Arne Schwabe --- M CMakeLists.txt 1 file changed, 14 insertions(+), 8 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/69/469/1 diff --git a/CMakeLists.txt b/CMakeLists.txt index 577bc5d..8c24cca 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -259,6 +259,15 @@ endif () +if (MINGW) +target_compile_options(${target} PRIVATE +-DWIN32_LEAN_AND_MEAN +-DNTDDI_VERSION=NTDDI_VISTA -D_WIN32_WINNT=_WIN32_WINNT_VISTA +) +target_compile_options(${target} PRIVATE -municode -UUNICODE) +target_link_options(${target} PRIVATE -municode) +endif() + # optional dependencies target_link_libraries(${target} PUBLIC $ @@ -514,14 +523,6 @@ add_library_deps(openvpn) -if (MINGW) -target_compile_options(openvpn PRIVATE --DWIN32_LEAN_AND_MEAN --DNTDDI_VERSION=NTDDI_VISTA -D_WIN32_WINNT=_WIN32_WINNT_VISTA -) -target_compile_options(openvpn PRIVATE -municode -UUNICODE) -target_link_options(openvpn PRIVATE -municode) -endif() if (MSVC) # we have our own manifest @@ -634,6 +635,11 @@ target_include_directories(${test_name} PRIVATE src/openvpn) +if (MINGW) +# when compiling with -municode, mingw looks for wmain instead of main +target_compile_definitions(${test_name} PRIVATE -Dmain=wmain) +endif () + if (NOT ${test_name} STREQUAL "test_buffer") target_sources(${test_name} PRIVATE src/openvpn/buffer.c -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/469?usp=email To unsubscribe, or for help writing mail filters, visit http://gerrit.openvpn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: Ie5aa643ab6190262f7c8b9e614bedb398e85859b Gerrit-Change-Number: 469 Gerrit-PatchSet: 1 Gerrit-Owner: plaisthos Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel Gerrit-Attention: flichtenheld Gerrit-MessageType: newchange ___ Openvpn-devel mailing list Openvpn-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/openvpn-devel