[Openvpn-devel] Wrong FILETYPE in .rc files

2019-07-03 Thread Gisle Vanem
I noticed the .rc-files for programs uses 'FILETYPE 0x2L'. The 0x2L' is for a .DLL (VFT_DLL). Ref: Win-Kit's 'um/verrsrc.h': #define VFT_DLL 0x0002L Hence these '0x2L' should be replaced with 'VFT_APP': --- a/src/openvpn/openvpn_win32_resources.rc 2016-11-06 10:54:00 +++

Re: [Openvpn-devel] MinGW to build DLL not EXE

2018-10-10 Thread Gisle Vanem
Simon Rozman wrote: I have almost finished integrating tapctl.exe and openvpnmsica.dll utilities for MSI packaging into the OpenVPN/openvpn repo. However, I am totally new with MinGW and would need some help. How do you tell the OpenVPN's build process to create a DLL file, not an EXE?

Re: [Openvpn-devel] [PATCH 09/13] Signed/unsigned warnings of MSVC resolved

2017-12-07 Thread Gisle Vanem
Simon Rozman wrote: However, I did stare-review your code: - It does not introduce any new Windows API calls it has not used before. - It compiles fine. It also builds fine here with cl v19.11. But using clang-cl v5, I'm getting: In file included from src/openvpn/argv.c:36:

Re: [Openvpn-devel] Crash in options.c

2017-01-02 Thread Gisle Vanem
Gert Doering wrote: >> uses a 'title_string[]' as format with no parameters specified and >> thus crashes as expected. So is all code outside '!defined(ENABLE_CRYPTO)' >> really dead code or what? > > Actually, "usage_message" is the format string here... Ah, my bad. Then it's a simple fix:

[Openvpn-devel] Crash in options.c

2017-01-02 Thread Gisle Vanem
Just as an experiment, I compiled openvpn.exe using MinGW w/o 'ENABLE_CRYPTO' defined. Duh, you think. What would be the benefit of that? I ask myself the same. This code (at line 4079): #else /* ifdef ENABLE_CRYPTO */ fprintf(fp, usage_message, title_string,

Re: [Openvpn-devel] Visual Studio support?

2017-01-02 Thread Gisle Vanem
Fish Wang wrote: > I'm finishing up a patch to make sure OpenVPN compiles under Visual Studio. > I have several questions; I'm also compiling using TDM-MinGW and MSVC-2015. But since approx 2 years, the CL compiler breaks at compiling options.c: src/openvpn/options.c(7937): fatal error C1026:

Re: [Openvpn-devel] MSVC "parser stack overflow"

2015-12-10 Thread Gisle Vanem
Gert Doering wrote: > For the time being we just use a compiler that is not mainly a pain in the > back, solidly stuck in the last century before C99 - as in, none of the > core developers compile on windows, we all do cross-compilation with > mingw64 on Linux. Well, MSVC 2015 is pretty

[Openvpn-devel] MSVC "parser stack overflow"

2015-12-09 Thread Gisle Vanem
While compiling src/openvpn/options.c with MSVC 2015, I got this error: src/openvpn/options.c(5944): fatal error C1026: parser stack overflow, program too complex I've also seen such error in GeoIP-lib due to all the 'if..else if' statements. Can this be written using some kind of a

Re: [Openvpn-devel] [PATCH 1/2] define IN6_ARE_ADDR_EQUAL macro for WIN32

2011-08-10 Thread Gisle Vanem
"Heiko Hund" wrote: +#ifndef IN6_ARE_ADDR_EQUAL +#define IN6_ARE_ADDR_EQUAL(a,b) \ +__const uint32_t *) (a))[0] == ((__const uint32_t *) (b))[0]) \ + && (((__const uint32_t *) (a))[1] == ((__const uint32_t *) (b))[1]) \ + && (((__const uint32_t *) (a))[2] ==

Re: [Openvpn-devel] [Patch] config-win32.h (actually win/config-win32.h.in)

2011-04-09 Thread Gisle Vanem
Sorry for the noise. I just discovered you've switchd to Git since I was involved with OpenVPN. With the SVN-repo still there, I wrongfully assumed that was the trunk (latest top) of developement. Here is an updated patch: --- Git-latest\win\config.h.in Sat Apr 09 14:25:58 2011 +++

[Openvpn-devel] [Patch] config-win32.h

2011-04-09 Thread Gisle Vanem
Since MingW for quite a long time (since 3.2 in 2008?) has defined 'uint32_t' etc. in it's , we need to guard against defining them again. Ideally we should figure out in what version of MingW this happened. But for now: --- SVN-Latest\config-win32.h Sat Apr 09 05:59:09 2011 +++

Re: [Openvpn-devel] [PATCH 2/2] Use %SystemRoot% instead of hard-codedC:\WINDOWS for temp directory path

2011-04-08 Thread Gisle Vanem
"David Sommerseth" wrote: - /* Try to use %TEMP% or %TMP% */ - tmpdir = getenv("TEMP"); - if( !tmpdir ) { -tmpdir = getenv("TMP"); + CLEAR (tmpdir); + + /* Try to use %TEMP%, %TMP% or %SystemRoot%\Temp */ + envptr = getenv("TEMP"); + if( envptr ) { +return

Re: [Openvpn-devel] [PATCH] Change the default --tmp-dir path to a more suitable path

2011-04-07 Thread Gisle Vanem
"Alon Bar-Lev" wrote: On Thu, Apr 7, 2011 at 3:48 PM, David Sommerseth wrote: Good idea! I wasn't aware of that one. I'll fix this. I will anyway choose to fallback to C:\WINDOWS\Temp if %SystemRoot% is not found, even though I believe this is most

[Openvpn-devel] ieproxy.h and MingW

2006-02-20 Thread Gisle Vanem
MingW (ver 3.7) doesn't have the "ieproxy.h" header. But it doesn't seem to require it either since most types and prototypes are in . I patched proxy.c to make it build: --- CVS-latest\proxy.c Mon Dec 12 18:00:00 2005 +++ proxy.c Mon Feb 20 18:05:32 2006 @@ -39,7 +39,7 @@ #include

[Openvpn-devel] status.c patch

2004-12-13 Thread Gisle Vanem
It looked rather suspicious to want (S_IRUSR | S_IWUSR) for MingW when opening files in status.c. Patch: --- status.c.orig Wed Dec 08 00:52:04 2004 +++ status.cMon Dec 13 14:44:17 2004 @@ -77,7 +77,7 @@ { switch (so->flags) { -#ifdef _MSC_VER +#ifdef WIN32

[Openvpn-devel] beta-18 crash

2004-11-30 Thread Gisle Vanem
Simply running "openvpn -h" causes a SIGSEGV. I was hoping '-h' would print the help, but obviously not. Happens with '-v' too. Attached is the Dr. MingW crash dump. No config-file was present, btw. --gv openvpn.exe caused an Access Violation at location 00401688 in module openvpn.exe

[Openvpn-devel] undefined get_netsh_id

2004-11-08 Thread Gisle Vanem
I tried building latest beta16 with gcc 3.4.1 and MingW and struck what I suspect is a gcc bug. While linking I got: tun.o(.stab+0x11024): In function `ipset2ascii_all': G:/MingW32/src/inet/OpenVPN/tun.c:3321: undefined reference to `get_netsh_id'