summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2012-04-25 15:17:45 +0100
committerDaniel P. Berrange <berrange@redhat.com>2012-04-26 18:46:52 +0100
commit91210c671fd3837a42a6358ecd21cb1e153c9855 (patch)
treea6d31203d929153c138e7fa0bac07b6ba1a51221 /configure.ac
parent5e15aa74c65892335e6533d6ee86cc07588e5a17 (diff)
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
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac2
1 files changed, 2 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index f5b014f8..4b24c7df 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)