summaryrefslogtreecommitdiffstats
path: root/client
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2012-02-29 19:01:55 +0100
committerAlon Levy <alevy@redhat.com>2012-03-04 10:50:38 +0200
commit4ec9ac20fce858d7fe6769b14b521b62c64c828c (patch)
tree789de6d43a12f0e90c02f8d1a730595cd8b8f794 /client
parent5989e2d1c4fa997dc2dbd4ea331bf6e77a425aff (diff)
downloadspice-4ec9ac20fce858d7fe6769b14b521b62c64c828c.tar.gz
spice-4ec9ac20fce858d7fe6769b14b521b62c64c828c.tar.xz
spice-4ec9ac20fce858d7fe6769b14b521b62c64c828c.zip
mingw: #ifdef unneeded #define in common.h
common.h has some #define when doing win32 build to workaround a few missing functions on these systems. However, since mingw32 has some of these, this causes either warnings about redefining preprocessor symbols or wreak havoc in mingw headers trying to use these symbols. This commit wraps these symbols in an #ifndef __MINGW32__ to avoid using them on this platform.
Diffstat (limited to 'client')
-rw-r--r--client/common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/client/common.h b/client/common.h
index 268057a6..e9a7ea8a 100644
--- a/client/common.h
+++ b/client/common.h
@@ -44,6 +44,7 @@
#ifdef __GNUC__
#define UNICODE 1
#define _UNICODE 1
+#if !defined __MINGW32__
#define WINVER 0x0501
#define swprintf_s(_str, _len, _fmt, ...) \
swprintf(_str, _fmt, ## __VA_ARGS__)
@@ -51,6 +52,7 @@
vsnprintf(_str, _len2, _fmt, _valist)
#define _ftime_s(_t) _ftime(_t)
#endif
+#endif
#include <winsock2.h>
#include <windows.h>