From: "cron2 (Code Review)" Date: Sat, 2 Dec 2023 16:40:59 +0000 In-Reply-To: References: Reply-To: gert@...1296..., arne-openvpn@...1227..., openvpn-devel@lists.sourceforge.net, frank@...2641... Message-ID: <1fe3f08c92b029839898e153d8637691b63eda72-EmailReplacePatchSet-HTML@...2715...> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Disposition: inline Content-Type: multipart/alternative; boundary="i1RD7oYkxbA="; charset=UTF-8 Subject: [Openvpn-devel] [M] Change in openvpn[master]: Remove compat versionhelpers.h and remove cmake/configure check for it List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: plaisthos , flichtenheld Cc: openvpn-devel --i1RD7oYkxbA= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable cron2 has uploaded a new patch set (#3) to the change originally created by= plaisthos. ( http://gerrit.openvpn.net/c/openvpn/+/445?usp=3Demail ) The following approvals got outdated and were removed: Code-Review+2 by flichtenheld Change subject: Remove compat versionhelpers.h and remove cmake/configure c= heck for it ...................................................................... Remove compat versionhelpers.h and remove cmake/configure check for it The cmake file defined that file to be never present in contrast to the old msvc-config.h that always had it present. Remove also the compat implementation taken from mingw. All our current build environments already have that header in place. Change-Id: I9c85ccab6d51064ebff2c391740ba8c2d044ed1a Acked-by: Frank Lichtenheld Signed-off-by: Arne Schwabe Message-Id: <20231128103950.62407-1-frank@...2641...> URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg27= 573.html Signed-off-by: Gert Doering --- M CMakeLists.txt M config.h.cmake.in M configure.ac M src/compat/Makefile.am D src/compat/compat-versionhelpers.h M src/openvpn/win32.c M src/openvpnserv/interactive.c 7 files changed, 1 insertion(+), 131 deletions(-) git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/45/445/3 diff --git a/CMakeLists.txt b/CMakeLists.txt index e4de309..577bc5d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -316,7 +316,6 @@ src/compat/compat-dirname.c src/compat/compat-gettimeofday.c src/compat/compat-strsep.c - src/compat/compat-versionhelpers.h src/openvpn/argv.c src/openvpn/argv.h src/openvpn/base64.c diff --git a/config.h.cmake.in b/config.h.cmake.in index 2af3810..baf9556 100644 --- a/config.h.cmake.in +++ b/config.h.cmake.in @@ -372,9 +372,6 @@ /* Define to 1 if you have the header file. */ #undef HAVE_VALGRIND_MEMCHECK_H -/* Define to 1 if you have the header file. */ -#undef HAVE_VERSIONHELPERS_H - /* Define to 1 if you have the `vfork' function. */ #undef HAVE_VFORK diff --git a/configure.ac b/configure.ac index 0f667dc..54f79ab 100644 --- a/configure.ac +++ b/configure.ac @@ -454,7 +454,6 @@ unistd.h dlfcn.h \ netinet/in.h \ netinet/tcp.h arpa/inet.h netdb.h \ - versionhelpers.h \ ]) AC_CHECK_HEADERS([ \ sys/time.h sys/ioctl.h sys/stat.h \ diff --git a/src/compat/Makefile.am b/src/compat/Makefile.am index f5de451..5298dd8 100644 --- a/src/compat/Makefile.am +++ b/src/compat/Makefile.am @@ -20,5 +20,4 @@ compat-basename.c \ compat-gettimeofday.c \ compat-daemon.c \ - compat-strsep.c \ - compat-versionhelpers.h + compat-strsep.c \ No newline at end of file diff --git a/src/compat/compat-versionhelpers.h b/src/compat/compat-version= helpers.h deleted file mode 100644 index b071602..0000000 --- a/src/compat/compat-versionhelpers.h +++ /dev/null @@ -1,116 +0,0 @@ -/** - * This file is part of the mingw-w64 runtime package. - * No warranty is given; refer to the file DISCLAIMER within this package. - */ - -#ifndef _INC_VERSIONHELPERS -#define _INC_VERSIONHELPERS - -#include - -#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && !defined(__WIDL__) - -#ifdef __cplusplus -#define VERSIONHELPERAPI inline bool -#else -#define VERSIONHELPERAPI FORCEINLINE BOOL -#endif - -#define _WIN32_WINNT_WINBLUE 0x0603 - -#ifndef _WIN32_WINNT_WINTHRESHOLD -#define _WIN32_WINNT_WINTHRESHOLD 0x0A00 /* Windows 10 */ -#endif - -VERSIONHELPERAPI -IsWindowsVersionOrGreater(WORD major, WORD minor, WORD servpack) -{ - OSVERSIONINFOEXW vi =3D {sizeof(vi), major, minor, 0, 0, {0}, servpack= }; - return VerifyVersionInfoW(&vi, VER_MAJORVERSION|VER_MINORVERSION|VER_S= ERVICEPACKMAJOR, - VerSetConditionMask(VerSetConditionMask(VerS= etConditionMask(0, - = VER_MAJORVERSION, VER_GREATER_EQUAL), - VER_= MINORVERSION, VER_GREATER_EQUAL), - VER_SERVICEPACKMAJOR, VE= R_GREATER_EQUAL)); -} - -VERSIONHELPERAPI -IsWindowsXPOrGreater(void) -{ - return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINXP), LOBYTE(_W= IN32_WINNT_WINXP), 0); -} - -VERSIONHELPERAPI -IsWindowsXPSP1OrGreater(void) -{ - return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINXP), LOBYTE(_W= IN32_WINNT_WINXP), 1); -} - -VERSIONHELPERAPI -IsWindowsXPSP2OrGreater(void) -{ - return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINXP), LOBYTE(_W= IN32_WINNT_WINXP), 2); -} - -VERSIONHELPERAPI -IsWindowsXPSP3OrGreater(void) -{ - return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINXP), LOBYTE(_W= IN32_WINNT_WINXP), 3); -} - -VERSIONHELPERAPI -IsWindowsVistaOrGreater(void) -{ - return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_VISTA), LOBYTE(_W= IN32_WINNT_VISTA), 0); -} - -VERSIONHELPERAPI -IsWindowsVistaSP1OrGreater(void) -{ - return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_VISTA), LOBYTE(_W= IN32_WINNT_VISTA), 1); -} - -VERSIONHELPERAPI -IsWindowsVistaSP2OrGreater(void) -{ - return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_VISTA), LOBYTE(_W= IN32_WINNT_VISTA), 2); -} - -VERSIONHELPERAPI -IsWindows7OrGreater(void) -{ - return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WIN7), LOBYTE(_WI= N32_WINNT_WIN7), 0); -} - -VERSIONHELPERAPI -IsWindows7SP1OrGreater(void) -{ - return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WIN7), LOBYTE(_WI= N32_WINNT_WIN7), 1); -} - -VERSIONHELPERAPI -IsWindows8OrGreater(void) -{ - return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WIN8), LOBYTE(_WI= N32_WINNT_WIN8), 0); -} - -VERSIONHELPERAPI -IsWindows8Point1OrGreater(void) -{ - return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINBLUE), LOBYTE(= _WIN32_WINNT_WINBLUE), 0); -} - -VERSIONHELPERAPI -IsWindows10OrGreater() -{ - return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINTHRESHOLD), LO= BYTE(_WIN32_WINNT_WINTHRESHOLD), 0); -} - -VERSIONHELPERAPI -IsWindowsServer(void) -{ - OSVERSIONINFOEXW vi =3D {sizeof(vi), 0, 0, 0, 0, {0}, 0, 0, 0, VER_NT_= WORKSTATION}; - return !VerifyVersionInfoW(&vi, VER_PRODUCT_TYPE, VerSetConditionMask(= 0, VER_PRODUCT_TYPE, VER_EQUAL)); -} - -#endif /* if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) && !defined= (__WIDL__) */ -#endif /* ifndef _INC_VERSIONHELPERS */ diff --git a/src/openvpn/win32.c b/src/openvpn/win32.c index 47eb1fc..e998d90 100644 --- a/src/openvpn/win32.c +++ b/src/openvpn/win32.c @@ -45,11 +45,7 @@ #include "memdbg.h" -#ifdef HAVE_VERSIONHELPERS_H #include -#else -#include "compat-versionhelpers.h" -#endif #include "block_dns.h" diff --git a/src/openvpnserv/interactive.c b/src/openvpnserv/interactive.c index a47db8a..32c8996 100644 --- a/src/openvpnserv/interactive.c +++ b/src/openvpnserv/interactive.c @@ -34,11 +34,7 @@ #include #include -#ifdef HAVE_VERSIONHELPERS_H #include -#else -#include "compat-versionhelpers.h" -#endif #include "openvpn-msg.h" #include "validate.h" -- To view, visit http://gerrit.openvpn.net/c/openvpn/+/445?usp=3Demail To unsubscribe, or for help writing mail filters, visit http://gerrit.openv= pn.net/settings Gerrit-Project: openvpn Gerrit-Branch: master Gerrit-Change-Id: I9c85ccab6d51064ebff2c391740ba8c2d044ed1a Gerrit-Change-Number: 445 Gerrit-PatchSet: 3 Gerrit-Owner: plaisthos Gerrit-Reviewer: flichtenheld Gerrit-CC: openvpn-devel Gerrit-MessageType: newpatchset --i1RD7oYkxbA= Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable

cron2 uploaded patch set #3 to the change originally cr= eated by plaisthos.

View Change

The following approvals got outdated= and were removed: Code-Review+2 by flichtenheld

Remove compat versionhelpers.h and remove cma=
ke/configure check for it

The cmake file defined that file to be nev= er present in contrast to the
old msvc-config.h that always had it prese= nt.
Remove also the compat implementation taken from mingw. All our curr= ent
build environments already have that header in place.

Change-= Id: I9c85ccab6d51064ebff2c391740ba8c2d044ed1a
Acked-by: Frank Lichtenhel= d <frank@...2641...>
Signed-off-by: Arne Schwabe <arne@...2639...= ..>
Message-Id: <20231128103950.62407-1-frank@...2641...>
UR= L: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg2757= 3.html
Signed-off-by: Gert Doering <gert@...1296...>
---
M C= MakeLists.txt
M config.h.cmake.in
M configure.ac
M src/compat/Make= file.am
D src/compat/compat-versionhelpers.h
M src/openvpn/win32.cM src/openvpnserv/interactive.c
7 files changed, 1 insertion(+), 131 de= letions(-)

git pull ssh://gerrit.openvpn.net:29418/openvpn refs/c=
hanges/45/445/3
diff --git a/CMakeLists.txt b/CMakeLists.txt=

index e4de309..577bc5d 100644
--- a/CMakeLists.tx= t
+++ b/CMakeLists.txt
@@ -316,7 +316,6 @@<= /span>
src/compat/compat-dirname.c
src/c= ompat/compat-gettimeofday.c
src/compat/compat-strsep.c=
- src/compat/compat= -versionhelpers.h
src/openvpn/argv.c
= src/openvpn/argv.h
src/openvpn/base64.c
= diff --git a/config.h.cmake.in b/config.h.cmake.in
in= dex 2af3810..baf9556 100644
--- a/config.h.cmake.in<= br>+++ b/config.h.cmake.in
@@ -372,9 +372,6 @@=
/* Define to 1 if you have the <valgrind/memcheck.h> heade= r file. */
#undef HAVE_VALGRIND_MEMCHECK_H

-/* Define to 1 if y= ou have the <versionhelpers.h> header file. */
-#undef HAVE_VERSIONHELPERS_H
-
/* Define to 1 if = you have the `vfork' function. */
#undef HAVE_VFORK

diff --git a/configure.ac b/configure.ac
index 0f667dc..54f79ab 100644
--- a/configure= .ac
+++ b/configure.ac
@@ -454,7 +454,6 @@<= /span>
unistd.h dlfcn.h \
netinet/in.h \
netinet/tcp.h arpa/inet.h netdb.h \
- versionhelpers.h \
]) AC_CHECK_HEADERS([ \
sys/time.h sys/ioctl.h sys/= stat.h \
diff --git a/src/compat/Makefile.am b/src/compat/M= akefile.am
index f5de451..5298dd8 100644
--= - a/src/compat/Makefile.am
+++ b/src/compat/Makefile.am
@@ -20,5 +20,4 @@
compat-basename.c \=
compat-gettimeofday.c \
compat-daemon.c \
- compat-strsep.c \=
- compat-versionhelpers.h
+ compat-strsep.c=
\ No newline at end of file
diff --git a/src/comp= at/compat-versionhelpers.h b/src/compat/compat-versionhelpers.h
<= span>deleted file mode 100644

index b071602..0000000=
--- a/src/compat/compat-versionhelpers.h
+++ /dev= /null
@@ -1,116 +0,0 @@
-/**
-= * This file is part of the mingw-w64 runtime package.
- * No warranty is given; refer to the file= DISCLAIMER within this package.
- */
-=
-#ifndef _INC_VERSIONHELPERS<= /span>
-#define _INC_VERSIONHE= LPERS
-
-#include <winapifamily.h>
-
-#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DES= KTOP) && !defined(__WIDL__)
-
-#ifdef = __cplusplus
-#define VE= RSIONHELPERAPI inline bool
-#else
-#define VER= SIONHELPERAPI FORCEINLINE BOOL
-#endif
-
-#define _WIN32_WINNT_WINBLU= E 0x0603
--#ifndef _WIN32_WINNT_WINTHRESHO= LD
-#define _WIN32_WINN= T_WINTHRESHOLD 0x0A00 /* Windows 10 */
-#endif
-
-VERSIONHELPERAPI=
-IsWindowsVersionOrGre= ater(WORD major, WORD minor, WORD servpack)
-{
- OSVERSIONINFOEXW vi =3D {sizeof(vi), major, minor, 0, 0, {0}, servpac= k};
- return VerifyV= ersionInfoW(&vi, VER_MAJORVERSION|VER_MINORVERSION|VER_SERVICEPACKMAJOR= ,
- = VerSetConditionMask(VerSetConditionMask(VerSetConditionMask(0,
- = VER_MAJOR= VERSION, VER_GREATER_EQUAL),
- = VER_MINORVERSION, VER_GREATER_EQUAL),
- VER_SER= VICEPACKMAJOR, VER_GREATER_EQUAL));
-}
-
-VERSIONHELPERAPI
= -IsWindowsXPOrGreater(void)
-{
- return IsWindowsVersionOrGreater(HIBYTE(_WI= N32_WINNT_WINXP), LOBYTE(_WIN32_WINNT_WINXP), 0);
-}
-
-VERSIONHELPER= API
-IsWindowsXPSP1OrGr= eater(void)
-{- return IsWindowsVersionOrG= reater(HIBYTE(_WIN32_WINNT_WINXP), LOBYTE(_WIN32_WINNT_WINXP), 1);-}
-
-VERSIONHELPERAPI
-I= sWindowsXPSP2OrGreater(void)
-{
- return Is= WindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINXP), LOBYTE(_WIN32_WINNT_WIN= XP), 2);
-}
<= span style=3D"color: hsl(0, 100%, 40%);">-

-VERSIONHELPERAPI
-IsWindowsXPSP3OrGreater(void)
-{
- return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINXP), LOBYTE= (_WIN32_WINNT_WINXP), 3);
-}
-
-VERSIONHELPERAPI

-IsWindowsVistaOrGreater(void)
-{

- return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WIN= NT_VISTA), LOBYTE(_WIN32_WINNT_VISTA), 0);
-}
= -
-VERSIONHELPERAPI
-IsWindowsVistaSP1OrGreate= r(void)
-{
- return IsWindowsVersionOrGreat= er(HIBYTE(_WIN32_WINNT_VISTA), LOBYTE(_WIN32_WINNT_VISTA), 1);

-}

-
-= VERSIONHELPERAPI
-IsWin= dowsVistaSP2OrGreater(void)
-{
- return IsW= indowsVersionOrGreater(HIBYTE(_WIN32_WINNT_VISTA), LOBYTE(_WIN32_WINNT_VIST= A), 2);
-}
-

-VERSIONHELPERAPI
-IsWindows7OrGreater(void)
-{
- = return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WIN7), LOBYTE(_WIN3= 2_WINNT_WIN7), 0);
-}
-
-VERSIONHELPERAPI
-IsWindows7SP1OrGreater(void)
-{
- return IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WIN7= ), LOBYTE(_WIN32_WINNT_WIN7), 1);
-}
-<= br>-VERSIONHELPERAPI
-IsWindows8OrGreater(void)
-{
- return IsWindowsVersionOrGreater(HIBYTE(_WIN32= _WINNT_WIN8), LOBYTE(_WIN32_WINNT_WIN8), 0);
-}
-VERSIONHELPERAPI
-IsWindows8Point1OrGreat= er(void)
-{
<= span style=3D"color: hsl(0, 100%, 40%);">- return IsWindowsVersionOrGrea= ter(HIBYTE(_WIN32_WINNT_WINBLUE), LOBYTE(_WIN32_WINNT_WINBLUE), 0);
<= br>-}
-
-VERSIONHELPERAPI
-= IsWindows10OrGreater()
= -{
- return IsWindow= sVersionOrGreater(HIBYTE(_WIN32_WINNT_WINTHRESHOLD), LOBYTE(_WIN32_WINNT_WI= NTHRESHOLD), 0);
-}
-
-VERSIONHELPERAPI
-IsWindowsServer(void)
-{
- OSVERSIONINFOEXW vi =3D {sizeof(vi), 0, 0, 0, 0, {0}, 0, 0, 0, VER_= NT_WORKSTATION};
- r= eturn !VerifyVersionInfoW(&vi, VER_PRODUCT_TYPE, VerSetConditionMask(0,= VER_PRODUCT_TYPE, VER_EQUAL));
-}
--#endif /* if WINAPI_FAMILY_PART= ITION(WINAPI_PARTITION_DESKTOP) && !defined(__WIDL__) */
= -#endif /* ifndef _INC_VERSIONHEL= PERS */
diff --git a/src/openvpn/win32.c b/src/openvpn/win3= 2.c
index 47eb1fc..e998d90 100644
--- a/src= /openvpn/win32.c
+++ b/src/openvpn/win32.c
= @@ -45,11 +45,7 @@

#include "memdbg= .h"

-#ifdef HAVE_VERSIONHELPERS_H
#include <versionhelp= ers.h>
-#else=
-#include "compat-versio= nhelpers.h"
-#endi= f

#include "block_dns.h"

diff --git a/src/openvpnserv/interactive.c b/s= rc/openvpnserv/interactive.c
index a47db8a..32c8996 100644<= /span>
--- a/src/openvpnserv/interactive.c
+++ b/s= rc/openvpnserv/interactive.c
@@ -34,11 +34,7 @@
<= span> #include <shellapi.h>

#include <mstcpip.h&g= t;

-#= ifdef HAVE_VERSIONHELPERS_H
#include <versionhelpers.h&= gt;
-#else
-#include "compat-versionhelpe= rs.h"

-#endif


#include "openvpn-msg.h" #include "validate.h"

To view, visit change 445. To unsubscribe, or for help writing mail filters, vi= sit settings.

Gerrit-Project: openvpn
Gerrit-Branch: master
Gerrit-Change-Id: I9c85ccab6d51064ebff2c391740= ba8c2d044ed1a
Gerrit-Change-Number: 445
Gerrit-PatchSet: 3
Gerrit-Owner: plaisthos <arne-openvpn@...1711...= 27...>
Gerrit-Reviewer: flichtenheld <frank@...2716...= 1...>
Gerrit-CC: openvpn-devel <openvpn-devel@...1484...= ts.sourceforge.net>
Gerrit-MessageType: newpatchset
--i1RD7oYkxbA=--