[Spice-commits] 2 commits - client/common.h configure.ac m4/spice-compile-warnings.m4
Daniel P. Berrange
berrange at kemper.freedesktop.org
Thu Apr 26 10:46:58 PDT 2012
client/common.h | 1 -
configure.ac | 2 ++
m4/spice-compile-warnings.m4 | 5 ++++-
3 files changed, 6 insertions(+), 2 deletions(-)
New commits:
commit 91210c671fd3837a42a6358ecd21cb1e153c9855
Author: Daniel P. Berrange <berrange at redhat.com>
Date: Wed Apr 25 15:17:45 2012 +0100
Ensure __STDC_FORMAT_MACROS is always defined first
The client/common.h file defines __STDC_FORMAT_MACROS before
including inttypes.h so that the PRI* macros get defined in
C++. This is ignoring the possibility that other global
includes may have already pulled in inttypes.h
We need __STDC_FORMAT_MACROS to be defined before any header
files are included. Putting it in config.h satisfies this,
since config.h is always the first header
diff --git a/client/common.h b/client/common.h
index e9a7ea8..ca3609f 100644
--- a/client/common.h
+++ b/client/common.h
@@ -26,7 +26,6 @@
#include <errno.h>
#endif
-#define __STDC_FORMAT_MACROS
#ifndef _WIN32
#include <inttypes.h>
#endif
diff --git a/configure.ac b/configure.ac
index f5b014f..4b24c7d 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,6 +31,8 @@ AC_CHECK_HEADERS([sys/time.h])
AC_CHECK_HEADERS([execinfo.h])
AC_FUNC_ALLOCA
+AC_DEFINE([__STDC_FORMAT_MACROS],[],[Force definition of format macros for C++])
+
SPICE_LT_VERSION=m4_format("%d:%d:%d", 1, 0, 2)
AC_SUBST(SPICE_LT_VERSION)
commit 5e15aa74c65892335e6533d6ee86cc07588e5a17
Author: Daniel P. Berrange <berrange at redhat.com>
Date: Wed Apr 25 15:16:51 2012 +0100
Disable -Waggregate-return if building with SLIRP
The API design of SLIRP means that it is not practical to use
the -Waggregate-return warning flag. Disable this flag in the
(unlikely) scenario where SLIRP is actually requested at build
time
diff --git a/m4/spice-compile-warnings.m4 b/m4/spice-compile-warnings.m4
index 8de2ffd..601ecf8 100644
--- a/m4/spice-compile-warnings.m4
+++ b/m4/spice-compile-warnings.m4
@@ -148,7 +148,10 @@ AC_DEFUN([SPICE_COMPILE_WARNINGS],[
AC_SUBST([WARN_CXXFLAGS])
# These are C-only warnings
- gl_WARN_ADD([-Waggregate-return])
+ if test "x$enable_tunnel" != "xyes"; then
+ # Slirp causes pain :-(
+ gl_WARN_ADD([-Waggregate-return])
+ fi
gl_WARN_ADD([-Wstrict-prototypes])
gl_WARN_ADD([-Wold-style-definition])
gl_WARN_ADD([-Wnested-externs])
More information about the Spice-commits
mailing list