]> git.ipfire.org Git - thirdparty/openvpn.git/commitdiff
Avoid re-defining uint32_t when using mingw compiler
authorGisle Vanem <gvanem@broadpark.no>
Sat, 9 Apr 2011 12:56:52 +0000 (12:56 +0000)
committerDavid Sommerseth <dazo@users.sourceforge.net>
Thu, 14 Apr 2011 21:31:43 +0000 (23:31 +0200)
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:

Signed-off-by: Gisle Vanem <gvanem@broadpark.no>
Acked-by: David Sommerseth <dazo@users.sourceforge.net>
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
win/config.h.in

index fb349d0851649f8335a0bccc61e767f2d200d999..82344a0601eff3d2381885afed38c039f32a0bb8 100644 (file)
@@ -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 @@ typedef unsigned long in_addr_t;
 /* 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 @@ typedef unsigned long in_addr_t;
 
 /* 8-bit unsigned type */
 #define uint8_t unsigned char
+#endif /* __MINGW32__ */
 
 /* Route command */
 #define ROUTE_PATH "route"
@@ -314,3 +319,5 @@ typedef int intptr_t;
 #define HAVE_CPP_VARARG_MACRO_ISO 1
 #endif
 #endif
+
+#endif /* OPENVPN_CONFIG_H */