* [Openvpn-devel] [PATCH 1/2] push.c: fix Visual Studio build
@ 2019-10-08 12:26 Lev Stipakov
2019-10-08 12:26 ` [Openvpn-devel] [PATCH 2/2] vcxproj: add missing source files Lev Stipakov
2019-10-08 12:36 ` [Openvpn-devel] [PATCH 1/2] push.c: fix Visual Studio build Arne Schwabe
0 siblings, 2 replies; 8+ messages in thread
From: Lev Stipakov @ 2019-10-08 12:26 UTC (permalink / raw)
To: openvpn-devel
From: Lev Stipakov <lev@...515...>
Visual Studio doesn't support designated initializers
for C code, so replace it with CLEAR() macro.
Signed-off-by: Lev Stipakov <lev@...515...>
---
src/openvpn/push.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/openvpn/push.c b/src/openvpn/push.c
index 49b9d1b..213e2b6 100644
--- a/src/openvpn/push.c
+++ b/src/openvpn/push.c
@@ -504,9 +504,10 @@ void
send_push_reply_auth_token(struct tls_multi *multi)
{
struct gc_arena gc = gc_new();
+ struct push_list push_list;
+ CLEAR(push_list);
- struct push_list push_list = {};
prepare_auth_token_push_reply(multi, &gc, &push_list);
/* prepare auth token should always add the auth-token option */
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Openvpn-devel] [PATCH 2/2] vcxproj: add missing source files
2019-10-08 12:26 [Openvpn-devel] [PATCH 1/2] push.c: fix Visual Studio build Lev Stipakov
@ 2019-10-08 12:26 ` Lev Stipakov
2019-10-08 12:36 ` [Openvpn-devel] [PATCH 1/2] push.c: fix Visual Studio build Arne Schwabe
1 sibling, 0 replies; 8+ messages in thread
From: Lev Stipakov @ 2019-10-08 12:26 UTC (permalink / raw)
To: openvpn-devel
From: Lev Stipakov <lev@...515...>
Commit 1b9a88a has added new C source/header files which
have to be added to VS project file.
Signed-off-by: Lev Stipakov <lev@...515...>
---
src/openvpn/openvpn.vcxproj | 2 ++
src/openvpn/openvpn.vcxproj.filters | 6 ++++++
2 files changed, 8 insertions(+)
diff --git a/src/openvpn/openvpn.vcxproj b/src/openvpn/openvpn.vcxproj
index 92d7e32..3b0ee60 100644
--- a/src/openvpn/openvpn.vcxproj
+++ b/src/openvpn/openvpn.vcxproj
@@ -124,6 +124,7 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="argv.c" />
+ <ClCompile Include="auth_token.c" />
<ClCompile Include="base64.c" />
<ClCompile Include="block_dns.c" />
<ClCompile Include="buffer.c" />
@@ -199,6 +200,7 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="argv.h" />
+ <ClInclude Include="auth_token.h" />
<ClInclude Include="base64.h" />
<ClInclude Include="basic.h" />
<ClInclude Include="block_dns.h" />
diff --git a/src/openvpn/openvpn.vcxproj.filters b/src/openvpn/openvpn.vcxproj.filters
index 7a9aa63..e6068af 100644
--- a/src/openvpn/openvpn.vcxproj.filters
+++ b/src/openvpn/openvpn.vcxproj.filters
@@ -234,6 +234,9 @@
<ClCompile Include="run_command.c">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="auth_token.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="base64.h">
@@ -488,6 +491,9 @@
<ClInclude Include="run_command.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="auth_token.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="openvpn_win32_resources.rc">
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [Openvpn-devel] [PATCH 1/2] push.c: fix Visual Studio build
2019-10-08 12:26 [Openvpn-devel] [PATCH 1/2] push.c: fix Visual Studio build Lev Stipakov
2019-10-08 12:26 ` [Openvpn-devel] [PATCH 2/2] vcxproj: add missing source files Lev Stipakov
@ 2019-10-08 12:36 ` Arne Schwabe
2019-10-08 12:42 ` Gert Doering
1 sibling, 1 reply; 8+ messages in thread
From: Arne Schwabe @ 2019-10-08 12:36 UTC (permalink / raw)
To: Lev Stipakov <lstipakov@
Am 08.10.19 um 14:26 schrieb Lev Stipakov:
> From: Lev Stipakov <lev@...515...>
>
> Visual Studio doesn't support designated initializers
> for C code, so replace it with CLEAR() macro.
>
> Signed-off-by: Lev Stipakov <lev@...515...>
> ---
> src/openvpn/push.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/src/openvpn/push.c b/src/openvpn/push.c
> index 49b9d1b..213e2b6 100644
> --- a/src/openvpn/push.c
> +++ b/src/openvpn/push.c
> @@ -504,9 +504,10 @@ void
> send_push_reply_auth_token(struct tls_multi *multi)
> {
> struct gc_arena gc = gc_new();
> + struct push_list push_list;
>
> + CLEAR(push_list);
>
> - struct push_list push_list = {};
> prepare_auth_token_push_reply(multi, &gc, &push_list);
>
> /* prepare auth token should always add the auth-token option */
>
Acked-By: Arne Schwabe
I thought we had those in other places. But I guess I was wrong.
Arne
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [Openvpn-devel] [PATCH 1/2] push.c: fix Visual Studio build
2019-10-08 12:36 ` [Openvpn-devel] [PATCH 1/2] push.c: fix Visual Studio build Arne Schwabe
@ 2019-10-08 12:42 ` Gert Doering
2019-10-08 12:52 ` [Openvpn-devel] [PATCH v2 " Lev Stipakov
0 siblings, 1 reply; 8+ messages in thread
From: Gert Doering @ 2019-10-08 12:42 UTC (permalink / raw)
To: Arne Schwabe <arne@; +Cc: Lev Stipakov <lstipakov@
[-- Attachment #1: Type: text/plain, Size: 761 bytes --]
Hi,
On Tue, Oct 08, 2019 at 02:36:28PM +0200, Arne Schwabe wrote:
> I thought we had those in other places. But I guess I was wrong.
We do, but never with {}.
Our "new style with C99" seems to be "go away from CLEAR() for
local structs", so this is a step back.
Assigning {0} should be fine with MSVC - we use this in lots of
other places and it does not fail.
gert
--
"If was one thing all people took for granted, was conviction that if you
feed honest figures into a computer, honest figures come out. Never doubted
it myself till I met a computer with a sense of humor."
Robert A. Heinlein, The Moon is a Harsh Mistress
Gert Doering - Munich, Germany gert@...1296...
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 630 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Openvpn-devel] [PATCH v2 1/2] push.c: fix Visual Studio build
2019-10-08 12:42 ` Gert Doering
@ 2019-10-08 12:52 ` Lev Stipakov
2019-10-08 12:52 ` [Openvpn-devel] [PATCH v2 2/2] vcxproj: add missing source files Lev Stipakov
2019-10-09 10:55 ` [Openvpn-devel] [PATCH applied] Re: push.c: fix Visual Studio build Gert Doering
0 siblings, 2 replies; 8+ messages in thread
From: Lev Stipakov @ 2019-10-08 12:52 UTC (permalink / raw)
To: openvpn-devel
From: Lev Stipakov <lev@...515...>
Visual Studio doesn't support empty designated initializers
for C code, so use { 0 }. Also replace existing CLEAR() call with
the new initializers.
Signed-off-by: Lev Stipakov <lev@...515...>
---
src/openvpn/push.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/src/openvpn/push.c b/src/openvpn/push.c
index 49b9d1b..368b692 100644
--- a/src/openvpn/push.c
+++ b/src/openvpn/push.c
@@ -504,9 +504,8 @@ void
send_push_reply_auth_token(struct tls_multi *multi)
{
struct gc_arena gc = gc_new();
+ struct push_list push_list = { 0 };
-
- struct push_list push_list = {};
prepare_auth_token_push_reply(multi, &gc, &push_list);
/* prepare auth token should always add the auth-token option */
@@ -734,10 +733,9 @@ process_incoming_push_request(struct context *c)
else
{
/* per-client push options - peer-id, cipher, ifconfig, ipv6-ifconfig */
- struct push_list push_list;
+ struct push_list push_list = { 0 };
struct gc_arena gc = gc_new();
- CLEAR(push_list);
if (prepare_push_reply(c, &gc, &push_list)
&& send_push_reply(c, &push_list))
{
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Openvpn-devel] [PATCH v2 2/2] vcxproj: add missing source files
2019-10-08 12:52 ` [Openvpn-devel] [PATCH v2 " Lev Stipakov
@ 2019-10-08 12:52 ` Lev Stipakov
2019-10-09 10:50 ` [Openvpn-devel] [PATCH applied] " Gert Doering
2019-10-09 10:55 ` [Openvpn-devel] [PATCH applied] Re: push.c: fix Visual Studio build Gert Doering
1 sibling, 1 reply; 8+ messages in thread
From: Lev Stipakov @ 2019-10-08 12:52 UTC (permalink / raw)
To: openvpn-devel
From: Lev Stipakov <lev@...515...>
Commit 1b9a88a has added new C source/header files which
have to be added to VS project file.
Signed-off-by: Lev Stipakov <lev@...515...>
---
src/openvpn/openvpn.vcxproj | 2 ++
src/openvpn/openvpn.vcxproj.filters | 6 ++++++
2 files changed, 8 insertions(+)
diff --git a/src/openvpn/openvpn.vcxproj b/src/openvpn/openvpn.vcxproj
index 92d7e32..3b0ee60 100644
--- a/src/openvpn/openvpn.vcxproj
+++ b/src/openvpn/openvpn.vcxproj
@@ -124,6 +124,7 @@
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="argv.c" />
+ <ClCompile Include="auth_token.c" />
<ClCompile Include="base64.c" />
<ClCompile Include="block_dns.c" />
<ClCompile Include="buffer.c" />
@@ -199,6 +200,7 @@
</ItemGroup>
<ItemGroup>
<ClInclude Include="argv.h" />
+ <ClInclude Include="auth_token.h" />
<ClInclude Include="base64.h" />
<ClInclude Include="basic.h" />
<ClInclude Include="block_dns.h" />
diff --git a/src/openvpn/openvpn.vcxproj.filters b/src/openvpn/openvpn.vcxproj.filters
index 7a9aa63..e6068af 100644
--- a/src/openvpn/openvpn.vcxproj.filters
+++ b/src/openvpn/openvpn.vcxproj.filters
@@ -234,6 +234,9 @@
<ClCompile Include="run_command.c">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="auth_token.c">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="base64.h">
@@ -488,6 +491,9 @@
<ClInclude Include="run_command.h">
<Filter>Header Files</Filter>
</ClInclude>
+ <ClInclude Include="auth_token.h">
+ <Filter>Header Files</Filter>
+ </ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="openvpn_win32_resources.rc">
--
2.7.4
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Openvpn-devel] [PATCH applied] Re: vcxproj: add missing source files
2019-10-08 12:52 ` [Openvpn-devel] [PATCH v2 2/2] vcxproj: add missing source files Lev Stipakov
@ 2019-10-09 10:50 ` Gert Doering
0 siblings, 0 replies; 8+ messages in thread
From: Gert Doering @ 2019-10-09 10:50 UTC (permalink / raw)
To: Lev Stipakov <lev@; +Cc: openvpn-devel
Acked-by: Gert Doering <gert@...1296...>
I do not have any idea about MSVC or project files, but this looks like
a trivial extrapolation of "what is there". And if you say it's needed, fine.
Your patch has been applied to the master branch.
commit a933d21a902adfaa3893bd0f6097a1696d5ccf69
Author: Lev Stipakov
Date: Tue Oct 8 15:52:34 2019 +0300
vcxproj: add missing source files
Signed-off-by: Lev Stipakov <lev@...515...>
Acked-by: Gert Doering <gert@...1296...>
Message-Id: <1570539154-31784-2-git-send-email-lstipakov@...277...>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18903.html
Signed-off-by: Gert Doering <gert@...1296...>
--
kind regards,
Gert Doering
^ permalink raw reply [flat|nested] 8+ messages in thread
* [Openvpn-devel] [PATCH applied] Re: push.c: fix Visual Studio build
2019-10-08 12:52 ` [Openvpn-devel] [PATCH v2 " Lev Stipakov
2019-10-08 12:52 ` [Openvpn-devel] [PATCH v2 2/2] vcxproj: add missing source files Lev Stipakov
@ 2019-10-09 10:55 ` Gert Doering
1 sibling, 0 replies; 8+ messages in thread
From: Gert Doering @ 2019-10-09 10:55 UTC (permalink / raw)
To: Lev Stipakov <lev@; +Cc: openvpn-devel
Acked-by: Gert Doering <gert@...1296...>
Arne has already ACKed the first one, but this is more in line with
what we've done in "more recent code" - and also thanks for changing
the other occurrence.
"Stared at code" and lightly tested on Linux and FreeBSD.
Your patch has been applied to the master branch.
commit 4431d0903d4e23ef01a5582960990b77e9522ab2
Author: Lev Stipakov
Date: Tue Oct 8 15:52:33 2019 +0300
push.c: fix Visual Studio build
Signed-off-by: Lev Stipakov <lev@...515...>
Acked-by: Gert Doering <gert@...1296...>
Message-Id: <1570539154-31784-1-git-send-email-lstipakov@...277...>
URL: https://www.mail-archive.com/openvpn-devel@lists.sourceforge.net/msg18904.html
Signed-off-by: Gert Doering <gert@...1296...>
--
kind regards,
Gert Doering
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2019-10-09 10:55 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-10-08 12:26 [Openvpn-devel] [PATCH 1/2] push.c: fix Visual Studio build Lev Stipakov
2019-10-08 12:26 ` [Openvpn-devel] [PATCH 2/2] vcxproj: add missing source files Lev Stipakov
2019-10-08 12:36 ` [Openvpn-devel] [PATCH 1/2] push.c: fix Visual Studio build Arne Schwabe
2019-10-08 12:42 ` Gert Doering
2019-10-08 12:52 ` [Openvpn-devel] [PATCH v2 " Lev Stipakov
2019-10-08 12:52 ` [Openvpn-devel] [PATCH v2 2/2] vcxproj: add missing source files Lev Stipakov
2019-10-09 10:50 ` [Openvpn-devel] [PATCH applied] " Gert Doering
2019-10-09 10:55 ` [Openvpn-devel] [PATCH applied] Re: push.c: fix Visual Studio build Gert Doering
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.