Add lz4 support to MSVC project.
PATCH 1/1 Add lz4 support to MSVC project.
- Include lz4 code and header in VC project files.
- Fix an issue in comp-lz4.h that prevents it from compiling under MSVC.
--- config-msvc.h | 2 ++ src/compat/compat.vcxproj | 1 + src/compat/compat.vcxproj.filters | 3 +++ src/openvpn/comp-lz4.h | 1 + src/openvpn/openvpn.vcxproj | 4 +++- src/openvpn/openvpn.vcxproj.filters | 15 +++++++++++++++ 6 files changed, 25 insertions(+), 1 deletion(-)
config-msvc.h +2 -0
@@ -12,6 +12,8 @@#define ENABLE_FRAGMENT 1#define ENABLE_HTTP_PROXY 1#define ENABLE_LZO 1 +#define ENABLE_LZ4 1 +#define NEED_COMPAT_LZ4 1#define ENABLE_MANAGEMENT 1#define ENABLE_MULTIHOME 1#define ENABLE_PKCS11 1
src/compat/compat.vcxproj +1 -0
@@ -133,6 +133,7 @@ <ClCompile Include="compat-inet_ntop.c" /> <ClCompile Include="compat-inet_pton.c" /> <ClCompile Include="compat-daemon.c" /> + <ClCompile Include="compat-lz4.c" /> </ItemGroup> <ItemGroup> <ClInclude Include="compat.h" />
src/compat/compat.vcxproj.filters +3 -0
@@ -33,6 +33,9 @@ <ClCompile Include="compat-daemon.c"> <Filter>Source Files</Filter> </ClCompile> + <ClCompile Include="compat-lz4.c"> + <Filter>Source Files</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="compat.h">
src/openvpn/comp-lz4.h +1 -0
@@ -35,6 +35,7 @@ extern const struct compress_alg lz4v2_alg;struct lz4_workspace { +int dummy; };#endif /* ENABLE_LZ4 */
src/openvpn/openvpn.vcxproj +3 -1
@@ -188,6 +188,7 @@ <ClCompile Include="base64.c" /> <ClCompile Include="buffer.c" /> <ClCompile Include="clinat.c" /> + <ClCompile Include="comp-lz4.c" /> <ClCompile Include="comp.c" /> <ClCompile Include="compstub.c" /> <ClCompile Include="console.c" />
@@ -260,9 +261,10 @@ <ClInclude Include="buffer.h" /> <ClInclude Include="circ_list.h" /> <ClInclude Include="clinat.h" /> + <ClInclude Include="common.h" /> + <ClInclude Include="comp-lz4.h" /> <ClInclude Include="comp.h" /> <ClInclude Include="compstub.h" /> - <ClInclude Include="common.h" /> <ClInclude Include="console.h" /> <ClInclude Include="crypto.h" /> <ClInclude Include="crypto_backend.h" />
src/openvpn/openvpn.vcxproj.filters +15 -0
@@ -207,6 +207,15 @@ <ClCompile Include="win32.c"> <Filter>Source Files</Filter> </ClCompile> + <ClCompile Include="comp.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="compstub.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="comp-lz4.c"> + <Filter>Source Files</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="base64.h">
@@ -461,6 +470,12 @@ <ClInclude Include="resource.h"> <Filter>Header Files</Filter> </ClInclude> + <ClInclude Include="comp.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="comp-lz4.h"> + <Filter>Header Files</Filter> + </ClInclude> </ItemGroup> <ItemGroup> <ResourceCompile Include="openvpn_win32_resources.rc">
Signature · 1 line
2.6.4
Hi,
Quoted 2 lines · Fish
- Include lz4 code and header in VC project files.
- Fix an issue incomp-lz4.hthat prevents it from compiling under MSVC.
The patch does not apply for me
Applying: Add lz4 support to MSVC project.
error: patch failed: src/openvpn/openvpn.vcxproj.filters:461
error: src/openvpn/openvpn.vcxproj.filters: patch does not apply
... because my vcxproj.filters file looks totally different in the surrounding code - mine ends with:
<ClInclude Include="tun.h">^M
<Filter>Header Files</Filter>^M
</ClInclude>^M
<ClInclude Include="win32.h">^M
<Filter>Header Files</Filter>^M
</ClInclude>^M </ItemGroup>^M
<ItemGroup>^M
<ResourceCompile Include="openvpn_win32_resources.rc">^M
<Filter>Resource Files</Filter>^M
while your context has "resource.h" as previously-last file in there...
Please re-send (and it would be nice if you could do "git commit -s" for the signed-off-by: - David can explain better what the significance of that is, but "since we all do it", it's convention)
gert
Signature · 4 lines
USENET is *not* the non-clickable part of WWW!
//www.muc.de/~gert/
Gert Doering - Munich, Germany [email protected]...
fax: +49-89-35655025 [email protected]...[Openvpn-devel] The puprose of the Signed-off-by: line
Quoted 3 lines · Gert Doering
Please re-send (and it would be nice if you could do "git commit -s" for the signed-off-by: - David can explain better what the significance of that is, but "since we all do it", it's convention)
The reason of adding the Signed-off-by is to have a better understanding of whom have been involved in particular commits/patches. While the "Author field" in the git log (git log --pretty=fuller) can only have one name, more people can have been involved in the patch. Using the Signed-off-by is a way to credit them as well.
And when everyone is consistent using the Signed-off-by line, writing tools which parses our git log is also far more easier.
The other aspect of the Signed-off-by: line has to do with juridical stuff, to protect the OpenVPN project. By adding the Signed-off-by:
line you basically sign-off to "Yes, I am the author of these changes and I am permitted to share them with the project". For more information, these pages explains it even better (same info, two different sources):
<https://git.eclipse.org/r/Documentation/user-signedoffby.html>
<https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches#n409>
Signature · 3 lines
kind regards, David Sommerseth
PATCH v2 1/1 Add lz4 support to MSVC.
In reply to Gert Doering- Include lz4 code and header in VC project files.
- Fix an issue in comp-lz4.h that prevents it from compiling under MSVC.
--- config-msvc.h | 2 ++ src/compat/compat.vcxproj | 1 + src/compat/compat.vcxproj.filters | 3 +++ src/openvpn/comp-lz4.h | 1 + src/openvpn/openvpn.vcxproj | 4 +++- src/openvpn/openvpn.vcxproj.filters | 17 ++++++++++++++++- 6 files changed, 26 insertions(+), 2 deletions(-)
config-msvc.h +2 -0
@@ -12,6 +12,8 @@#define ENABLE_FRAGMENT 1#define ENABLE_HTTP_PROXY 1#define ENABLE_LZO 1 +#define ENABLE_LZ4 1 +#define NEED_COMPAT_LZ4 1#define ENABLE_MANAGEMENT 1#define ENABLE_MULTIHOME 1#define ENABLE_PKCS11 1
src/compat/compat.vcxproj +1 -0
@@ -79,6 +79,7 @@ <ClCompile Include="compat-inet_ntop.c" /> <ClCompile Include="compat-inet_pton.c" /> <ClCompile Include="compat-daemon.c" /> + <ClCompile Include="compat-lz4.c" /> </ItemGroup> <ItemGroup> <ClInclude Include="compat.h" />
src/compat/compat.vcxproj.filters +3 -0
@@ -33,6 +33,9 @@ <ClCompile Include="compat-daemon.c"> <Filter>Source Files</Filter> </ClCompile> + <ClCompile Include="compat-lz4.c"> + <Filter>Source Files</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="compat.h">
src/openvpn/comp-lz4.h +1 -0
@@ -35,6 +35,7 @@ extern const struct compress_alg lz4v2_alg;struct lz4_workspace { +int dummy; };#endif /* ENABLE_LZ4 */
src/openvpn/openvpn.vcxproj +3 -1
@@ -102,6 +102,7 @@ <ClCompile Include="base64.c" /> <ClCompile Include="buffer.c" /> <ClCompile Include="clinat.c" /> + <ClCompile Include="comp-lz4.c" /> <ClCompile Include="comp.c" /> <ClCompile Include="compstub.c" /> <ClCompile Include="console.c" />
@@ -172,9 +173,10 @@ <ClInclude Include="buffer.h" /> <ClInclude Include="circ_list.h" /> <ClInclude Include="clinat.h" /> + <ClInclude Include="common.h" /> + <ClInclude Include="comp-lz4.h" /> <ClInclude Include="comp.h" /> <ClInclude Include="compstub.h" /> - <ClInclude Include="common.h" /> <ClInclude Include="console.h" /> <ClInclude Include="crypto.h" /> <ClInclude Include="crypto_backend.h" />
src/openvpn/openvpn.vcxproj.filters +16 -1
@@ -207,6 +207,15 @@ <ClCompile Include="win32.c"> <Filter>Source Files</Filter> </ClCompile> + <ClCompile Include="comp.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="compstub.c"> + <Filter>Source Files</Filter> + </ClCompile> + <ClCompile Include="comp-lz4.c"> + <Filter>Source Files</Filter> + </ClCompile> </ItemGroup> <ItemGroup> <ClInclude Include="base64.h">
@@ -227,6 +236,12 @@ <ClInclude Include="common.h"> <Filter>Header Files</Filter> </ClInclude> + <ClInclude Include="comp.h"> + <Filter>Header Files</Filter> + </ClInclude> + <ClInclude Include="comp-lz4.h"> + <Filter>Header Files</Filter> + </ClInclude> <ClInclude Include="console.h"> <Filter>Header Files</Filter> </ClInclude>
@@ -455,4 +470,4 @@ <Filter>Resource Files</Filter> </ResourceCompile> </ItemGroup> -</Project> +</Project>
Signature · 1 line
2.6.4
Re: [Openvpn-devel] The puprose of the Signed-off-by: line
In reply to David SommersethQuoted 10 lines
The reason of adding the Signed-off-by is to have a better understanding of whom have been involved in particular commits/patches. While the "Author field" in the git log (git log --pretty=fuller) can only have one name, more people can have been involved in the patch. Using the Signed-off-by is a way to credit them as well.
And when everyone is consistent using the Signed-off-by line, writing tools which parses our git log is also far more easier.
Quoted 8 lines
The other aspect of the Signed-off-by: line has to do with juridical stuff, to protect the OpenVPN project. By adding the Signed-off-by:
line you basically sign-off to "Yes, I am the author of these changes and I am permitted to share them with the project". For more information, these pages explains it even better (same info, two different sources):
<https://git.eclipse.org/r/Documentation/user-signedoffby.html>
<https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches#n409>
Hi David,
Looks like the rationale for Signed-off-by by is not properly documented in Trac:
<https://community.openvpn.net/openvpn/wiki/DeveloperDocumentation>
David: do you want to integrate above explanation to Trac or shall I?
Signature · 5 lines
Samuli Seppänen Community Manager OpenVPN Technologies, Inc irc freenode net: mattock
[Openvpn-devel] [PATCH applied] Re: Add lz4 support to MSVC.
In reply to FishACK, thanks.
Your patch has been applied to the master branch.
commit 6a4edc7fc09d6a321f87d4dcf331c7d5c3082a8f
Author: Fish Date: Thu Feb 25 16:14:42 2016 -0500
Add lz4 support to MSVC.
Signed-off-by: Fish <[email protected]...>
Acked-by: Gert Doering <[email protected]...>
Message-Id: <[email protected]...>
URL: http://article.gmane.org/gmane.network.openvpn.devel/11262
Signed-off-by: Gert Doering <[email protected]...>--
kind regards,
Gert Doering
Re: [Openvpn-devel] The puprose of the Signed-off-by: line
In reply to David SommersethQuoted 19 lines
Quoted 10 lines
The reason of adding the Signed-off-by is to have a better understanding of whom have been involved in particular commits/patches. While the "Author field" in the git log (git log --pretty=fuller) can only have one name, more people can have been involved in the patch. Using the Signed-off-by is a way to credit them as well.
And when everyone is consistent using the Signed-off-by line, writing tools which parses our git log is also far more easier.
Quoted 8 lines
The other aspect of the Signed-off-by: line has to do with juridical stuff, to protect the OpenVPN project. By adding the Signed-off-by:
line you basically sign-off to "Yes, I am the author of these changes and I am permitted to share them with the project". For more information, these pages explains it even better (same info, two different sources):
<https://git.eclipse.org/r/Documentation/user-signedoffby.html>
<https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches#n409>
Quoted 7 lines
Hi David,
Looks like the rationale for Signed-off-by by is not properly documented in Trac:
<https://community.openvpn.net/openvpn/wiki/DeveloperDocumentation>
David: do you want to integrate above explanation to Trac or shall I?
I intended to update the wiki page as well. It should be updated. The trouble is that I started thinking. But I think we should do some more modifications to more of this process.
There are two things I think we should agree upon first, which is slightly different compared to the wiki page.
1) It probably makes more sense to use Reviewed-by: instead of
Signed-off-by: when someone have reviewed and not added code to the commit.
2) We should probably rethink the need of Signed-off-by: lines when Gert or I do commits without modifying the patch in any way. Whom committed the patch is now also easily accessible using the --pretty=fuller argument to git log.
And it should be an explicit note which states that the committer which adds a Signed-off-by: line to an unmodified commit does not mean the same as when a patch contributor does so. The committer's
Signed-off-by: basically means "Yes, this patch has been accepted by N.N" ... That was the intention of this last Signed-off-by: line.
If we drop the additional Signed-off-by: line, we are much closer to what other projects using Signed-off-by does.
I know I'm the one to blame for all this, as I believe it was my initial suggestion. But that was many years ago; where both the git tool have improved vastly and the way git is used are nowadays somewhat more unified across projects then what it was around in 2010-ish. And I think we have all learned to use git far better over all these years as well.
Thoughts?
Signature · 8 lines
kind regards, David Sommerseth -- kind regards, David Sommerseth
Re: [Openvpn-devel] The puprose of the Signed-off-by: line
Quoted 31 lines
Quoted 19 lines
Quoted 10 lines
The reason of adding the Signed-off-by is to have a better understanding of whom have been involved in particular commits/patches. While the "Author field" in the git log (git log --pretty=fuller) can only have one name, more people can have been involved in the patch. Using the Signed-off-by is a way to credit them as well.
And when everyone is consistent using the Signed-off-by line, writing tools which parses our git log is also far more easier.
Quoted 8 lines
The other aspect of the Signed-off-by: line has to do with juridical stuff, to protect the OpenVPN project. By adding the Signed-off-by:
line you basically sign-off to "Yes, I am the author of these changes and I am permitted to share them with the project". For more information, these pages explains it even better (same info, two different sources):
<https://git.eclipse.org/r/Documentation/user-signedoffby.html>
<https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/SubmittingPatches#n409>Quoted 7 lines
Hi David,
Looks like the rationale for Signed-off-by by is not properly documented in Trac:
<https://community.openvpn.net/openvpn/wiki/DeveloperDocumentation>
David: do you want to integrate above explanation to Trac or shall I?
I intended to update the wiki page as well. It should be updated. The trouble is that I started thinking. But I think we should do some more modifications to more of this process.
Quoted 7 lines
There are two things I think we should agree upon first, which is slightly different compared to the wiki page.
1) It probably makes more sense to use Reviewed-by: instead of
Signed-off-by: when someone have reviewed and not added code to the commit.
Makes sense.
Quoted 4 lines
2) We should probably rethink the need of Signed-off-by: lines when Gert or I do commits without modifying the patch in any way. Whom committed the patch is now also easily accessible using the --pretty=fuller argument to git log.
Indeed:
commit 5f5229e41d134b659e502bb2597c711aedaf8096
Author: Leonardo Basilio <[email protected]...> AuthorDate: Wed Feb 10 11:19:39 2016 +0100 Commit: Gert Doering <[email protected]...> CommitDate: Wed Feb 10 11:19:39 2016 +0100
Correctly report TCP connection timeout on windows.
---snip---
Let's scrap the Signed-off-by lines except when actual changes have been made.
Quoted 5 lines
And it should be an explicit note which states that the committer which adds a Signed-off-by: line to an unmodified commit does not mean the same as when a patch contributor does so. The committer's
Signed-off-by: basically means "Yes, this patch has been accepted by N.N" ... That was the intention of this last Signed-off-by: line.
The difference between Acked-by and Reviewed-by seems to be the completeness of the review:
"Acked-by: does not necessarily indicate acknowledgment of the entire patch. For example, if a patch affects multiple subsystems and has an Acked-by: from one subsystem maintainer then this usually indicates acknowledgment of just the part which affects that maintainer’s code."
"A Reviewed-by tag is a statement of opinion that the patch is an appropriate modification of the kernel without any remaining serious technical issues."
These quotes are from
<https://git.eclipse.org/r/Documentation/user-signedoffby.html>
We've typically been using Acked-by for acknowledging the full patch, where we could have used Reviewed-by. And we've essentially used the committers Signed-off-by in place of Acked-by, if I'm not mistaken.
Quoted 2 lines
If we drop the additional Signed-off-by: line, we are much closer to what other projects using Signed-off-by does.
Sounds good to me. They make little sense because of "--pretty=fuller".
Quoted 6 lines
I know I'm the one to blame for all this, as I believe it was my initial suggestion. But that was many years ago; where both the git tool have improved vastly and the way git is used are nowadays somewhat more unified across projects then what it was around in 2010-ish. And I think we have all learned to use git far better over all these years as well.
+1 for following / trying to follow the instructions given here:
<https://git.eclipse.org/r/Documentation/user-signedoffby.html>
The tags (e.g. Signed-off-by) are not being used for analysis purposes, so this change of practice will not break anything.
Signature · 5 lines
Samuli Seppänen Community Manager OpenVPN Technologies, Inc irc freenode net: mattock