Change in openvpn[master]: platform.c: Do not depend Windows build on HAVE_CHDIR
A message that is not in the archive (sent off-list or not yet received): gerrit.1699637918000.I0c78ce452135fe2c80275da449215ba926471018@...2715...
Attention is currently required from: plaisthos.
Hello plaisthos,
I'd like you to do a code review.
Please visit
http://gerrit.openvpn.net/c/openvpn/+/425?usp=email
to review the following change.
Change subject: platform.c: Do not depend Windows build on HAVE_CHDIR
......................................................................
platform.c: Do not depend Windows build on HAVE_CHDIR
This broke in the CMake build since previously we just always set HAVE_CHDIR to 1 in the MSVC build. But actually the code should just not check HAVE_CHDIR on Windows.
---
M src/openvpn/platform.c
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/25/425/1
src/openvpn/platform.c +2 -2
@@ -392,7 +392,6 @@int platform_chdir (const char *dir) { -#ifdef HAVE_CHDIR #ifdef _WIN32int res;struct gc_arena gc =gc_new ();
@@ -400,11 +399,12 @@gc_free (&gc);return res;#else /* ifdef _WIN32 */ +#ifdef HAVE_CHDIR return chdir (dir); -#endif #else /* ifdef HAVE_CHDIR */ return -1 ;#endif +#endif }/*
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/425?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: I0c78ce452135fe2c80275da449215ba926471018
Gerrit-Change-Number: 425
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-MessageType: newchange
Attention is currently required from: flichtenheld, plaisthos.
stipa has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/425?usp=email )
Change subject: platform.c: Do not depend Windows build on HAVE_CHDIR
......................................................................
Patch Set 1: Code-Review+2
(1 comment)
Patchset:
PS1:
Makes sense, we can assume that _wchdir always exists on Windows. We still have the broken detection of chdir, though - on Windows we need to search for chdir in direct.h.
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/425?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: I0c78ce452135fe2c80275da449215ba926471018
Gerrit-Change-Number: 425
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-Reviewer: stipa <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Fri, 10 Nov 2023 17:53:31 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: Yes
Gerrit-MessageType: comment
Attention is currently required from: flichtenheld, plaisthos.
cron2 has posted comments on this change. ( http://gerrit.openvpn.net/c/openvpn/+/425?usp=email )
Change subject: platform.c: Do not depend Windows build on HAVE_CHDIR
......................................................................
Patch Set 1:
(1 comment)
Patchset:
PS1:
can we make this somewhat more radical, getting completely rid of HAVE_CHDIR across all files and platforms and autoconf/cmake config? There is no POSIX (or unix) platform without chdir()...
"HISTORY
The chdir() system call appeared in Version 1 AT&T UNIX."
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/425?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: I0c78ce452135fe2c80275da449215ba926471018
Gerrit-Change-Number: 425
Gerrit-PatchSet: 1
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-Reviewer: stipa <[email protected]...>
Gerrit-CC: cron2 <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-Attention: plaisthos <[email protected]...>
Gerrit-Attention: flichtenheld <[email protected]...>
Gerrit-Comment-Date: Fri, 10 Nov 2023 18:19:09 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
PATCH 1/1 platform.c: Do not depend Windows build on HAVE_CHDIR
In reply to a message not in the archiveFrom: Frank Lichtenheld <[email protected]...>
This broke in the CMake build since previously we just always set HAVE_CHDIR to 1 in the MSVC build. But actually the code should just not check HAVE_CHDIR on Windows.
---
This change was reviewed on Gerrit and approved by at least one developer. I request to merge it to master.
Gerrit URL: https://gerrit.openvpn.net/c/openvpn/+/425
This mail reflects revision 1 of this Change. Acked-by according to Gerrit (reflected above):
Lev Stipakov <[email protected]...>
src/openvpn/platform.c +2 -2
@@ -392,7 +392,6 @@int platform_chdir (const char *dir) { -#ifdef HAVE_CHDIR #ifdef _WIN32int res;struct gc_arena gc =gc_new ();
@@ -400,11 +399,12 @@gc_free (&gc);return res;#else /* ifdef _WIN32 */ +#ifdef HAVE_CHDIR return chdir (dir); -#endif #else /* ifdef HAVE_CHDIR */ return -1 ;#endif +#endif }/*
[Openvpn-devel] [PATCH applied] Re: platform.c: Do not depend Windows build on HAVE_CHDIR
This patch will do the job, but I think (at least for "master") we should do a bit more thorough job - as in, get rid of HAVE_CHDIR completely, in autoconf, cmake, header files. There is no platform where we have a remote chance in getting OpenVPN ported that has no chdir(), so this is all a nice excercise in achieving nothing.
I have not tested this beyond "does it compile?" but the change looks reasonable and Lev has ACKed it.
Your patch has been applied to the master and release/2.6 branch.
commit 012ea92c414282488e3d60c87452849bde64aac4 (master) commit b705517b12d14876a12593416a45756b7a952f1e (release/2.6)
Author: Frank Lichtenheld Date: Sat Nov 11 09:18:08 2023 +0100
platform.c: Do not depend Windows build on HAVE_CHDIR
Signed-off-by: Frank Lichtenheld <[email protected]...>
Acked-by: Lev Stipakov <[email protected]...>
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg27362.html
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
cron2 has uploaded a new patch set (#2) to the change originally created by flichtenheld. ( http://gerrit.openvpn.net/c/openvpn/+/425?usp=email )
The following approvals got outdated and were removed:
Code-Review+2 by stipa
Change subject: platform.c: Do not depend Windows build on HAVE_CHDIR
......................................................................
platform.c: Do not depend Windows build on HAVE_CHDIR
This broke in the CMake build since previously we just always set HAVE_CHDIR to 1 in the MSVC build. But actually the code should just not check HAVE_CHDIR on Windows.
Github: fixes OpenVPN/openvpn#448
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg27362.html
---
M src/openvpn/platform.c
1 file changed, 2 insertions(+), 2 deletions(-)
git pull ssh://gerrit.openvpn.net:29418/openvpn refs/changes/25/425/2
src/openvpn/platform.c +2 -2
@@ -392,7 +392,6 @@int platform_chdir (const char *dir) { -#ifdef HAVE_CHDIR #ifdef _WIN32int res;struct gc_arena gc =gc_new ();
@@ -400,11 +399,12 @@gc_free (&gc);return res;#else /* ifdef _WIN32 */ +#ifdef HAVE_CHDIR return chdir (dir); -#endif #else /* ifdef HAVE_CHDIR */ return -1 ;#endif +#endif }/*
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/425?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: I0c78ce452135fe2c80275da449215ba926471018
Gerrit-Change-Number: 425
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-Reviewer: stipa <[email protected]...>
Gerrit-CC: cron2 <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: newpatchset
cron2 has submitted this change. ( http://gerrit.openvpn.net/c/openvpn/+/425?usp=email )
Change subject: platform.c: Do not depend Windows build on HAVE_CHDIR
......................................................................
platform.c: Do not depend Windows build on HAVE_CHDIR
This broke in the CMake build since previously we just always set HAVE_CHDIR to 1 in the MSVC build. But actually the code should just not check HAVE_CHDIR on Windows.
Github: fixes OpenVPN/openvpn#448
Message-Id: <[email protected]...>
URL: https://www.mail-archive.com/[email protected]/msg27362.html
---
M src/openvpn/platform.c
1 file changed, 2 insertions(+), 2 deletions(-)
src/openvpn/platform.c +2 -2
@@ -392,7 +392,6 @@int platform_chdir (const char *dir) { -#ifdef HAVE_CHDIR #ifdef _WIN32int res;struct gc_arena gc =gc_new ();
@@ -400,11 +399,12 @@gc_free (&gc);return res;#else /* ifdef _WIN32 */ +#ifdef HAVE_CHDIR return chdir (dir); -#endif #else /* ifdef HAVE_CHDIR */ return -1 ;#endif +#endif }/*
--
To view, visit http://gerrit.openvpn.net/c/openvpn/+/425?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: I0c78ce452135fe2c80275da449215ba926471018
Gerrit-Change-Number: 425
Gerrit-PatchSet: 2
Gerrit-Owner: flichtenheld <[email protected]...>
Gerrit-Reviewer: plaisthos <[email protected]...>
Gerrit-Reviewer: stipa <[email protected]...>
Gerrit-CC: cron2 <[email protected]...>
Gerrit-CC: openvpn-devel <[email protected]>
Gerrit-MessageType: merged