configure.ac: always define __STDC_CONSTANT_MACROS
The ISO C99 standard (7.18.4) specifies that C++
implementations should define UINT64_C only when
__STDC_CONSTANT_MACROS is defined.
Because we now use UINT64_C in our cpp files (since commit
208bfc493d
), we need to add this define.
This also solves compilation errors with GCC 4.8.x on ppc64le machines.
v2: add this define to SCons build system
Signed-off-by: Oded Gabbay <oded.gabbay@gmail.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
This commit is contained in:
@@ -245,7 +245,7 @@ _SAVE_LDFLAGS="$LDFLAGS"
|
||||
_SAVE_CPPFLAGS="$CPPFLAGS"
|
||||
|
||||
dnl Compiler macros
|
||||
DEFINES="-D__STDC_LIMIT_MACROS"
|
||||
DEFINES="-D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS"
|
||||
AC_SUBST([DEFINES])
|
||||
case "$host_os" in
|
||||
linux*|*-gnu*|gnu*)
|
||||
|
@@ -300,7 +300,7 @@ def generate(env):
|
||||
|
||||
# C preprocessor options
|
||||
cppdefines = []
|
||||
cppdefines += ['__STDC_LIMIT_MACROS']
|
||||
cppdefines += ['__STDC_LIMIT_MACROS', '__STDC_CONSTANT_MACROS']
|
||||
if env['build'] in ('debug', 'checked'):
|
||||
cppdefines += ['DEBUG']
|
||||
else:
|
||||
|
Reference in New Issue
Block a user