[Mesa-dev] [PATCH 2/9] scons: always set __STDC_*_MACROS for C++ sources

Emil Velikov emil.l.velikov at gmail.com
Thu Jan 26 13:24:03 UTC 2017


From: Emil Velikov <emil.velikov at collabora.com>

Analogous to previous commit - just set the lot once throughout.

Cc: Jose Fonseca <jfonseca at vmware.com>
Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
---
Jose,
Appveyor seemed happy, but please check that it doesn't explode
elsewhere for you guys.
---
 scons/gallium.py | 3 ++-
 scons/llvm.py    | 2 --
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/scons/gallium.py b/scons/gallium.py
index 767766fd6f..64dfdcc9d5 100755
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -291,8 +291,9 @@ def generate(env):
     # C preprocessor options
     cppdefines = []
     cppdefines += [
-        '__STDC_LIMIT_MACROS',
         '__STDC_CONSTANT_MACROS',
+        '__STDC_FORMAT_MACROS',
+        '__STDC_LIMIT_MACROS',
         'HAVE_NO_AUTOCONF',
     ]
     if env['build'] in ('debug', 'checked'):
diff --git a/scons/llvm.py b/scons/llvm.py
index 2d0f05b027..ec816e8a57 100644
--- a/scons/llvm.py
+++ b/scons/llvm.py
@@ -100,8 +100,6 @@ def generate(env):
 
         env.Prepend(CPPPATH = [os.path.join(llvm_dir, 'include')])
         env.AppendUnique(CPPDEFINES = [
-            '__STDC_LIMIT_MACROS', 
-            '__STDC_CONSTANT_MACROS',
             'HAVE_STDINT_H',
         ])
         env.Prepend(LIBPATH = [os.path.join(llvm_dir, 'lib')])
-- 
2.11.0



More information about the mesa-dev mailing list