mirror of
https://gitlab.uni-freiburg.de/opensourcevdi/spice
synced 2026-08-11 11:26:33 +00:00
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
This commit is contained in:
parent
5e15aa74c6
commit
91210c671f
@ -26,7 +26,6 @@
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
#define __STDC_FORMAT_MACROS
|
||||
#ifndef _WIN32
|
||||
#include <inttypes.h>
|
||||
#endif
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user