config-win32.h (actually win/config-win32.h.in)
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:
win\config.h.in Sat Apr 09 14:51:55 2011 renamed from Git-latest\win\config.h.in Sat Apr 09 14:25:58 2011 +3 -0
@@ -26,6 +26,9 @@ * Configuration header for Win32 using the MSVC environment. */ +#ifndef OPENVPN_CONFIG_H +#define OPENVPN_CONFIG_H +
#include <windows.h>
#include <winsock2.h>
#include "autodefs.h" /* machine generated */ @@ -274,6 +277,7 @@
/* type to use in place of socklen_t if not defined */ #define socklen_t unsigned int
+#ifndef __MINGW32__
/* 32-bit unsigned type */
#define uint32_t unsigned int
@@ -282,6 +286,7 @@
/* 8-bit unsigned type */
#define uint8_t unsigned char
+#endif
/* Route command */
#define ROUTE_PATH "route"
@@ -314,3 +319,5 @@
#define HAVE_CPP_VARARG_MACRO_ISO 1
#endif
#endif
+
+#endif /* OPENVPN_CONFIG_H */
---------------
The above header-guard makes service-win32/openvpnserv.c compile since config.h is included twice for this file.
--gv
David Sommerseth
Acked-by-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 3 lines · 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:
Thanks a lot! I've ACKed and committed your changes to the git tree now. I've done a quick smoketest using mingw32 on Fedora 14, and it compiles and generates a usable binary (just smoke tested it).
commit 6a8270c29120473570ec6da4003226f36a4b71eb
Author: Gisle Vanem <[email protected]...> Date: Sat Apr 9 12:56:52 2011 +0000
Avoid re-defining uint32_t when using mingw compiler
Since MingW for quite a long time (since 3.2 in 2008?) has defined 'uint32_t' etc. in it's <stdint.h>, we need to guard against defining them again. Ideally we should figure out in what version of MingW this happened. But for now:
For the future, I would appreciate if you could commit your changes to your local tree (git add <file(s)> ; git commit -s) and then use
git format-patch to generate the patch file(s). The patch you sent was not really well accepted by git, so I had to do these changes manually.
More information about our git process can be found here:
<https://community.openvpn.net/openvpn/wiki/DeveloperDocumentation>
<https://community.openvpn.net/openvpn/wiki/GitCrashCourse>
kind regards,
David Sommerseth
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org/
iEYEARECAAYFAk2nax0ACgkQDC186MBRfrp7OgCeKaOuvWRcg+qCQF4eIjN/ZVUH 8ucAn30EufoV5yyxjQNJez+fpNXM/fxZ
=4R5V
-----END PGP SIGNATURE-----