Mesa (master): scons: Don't globally define WIN32_LEAN_AND_MEAN.
Jose Fonseca
jrfonseca at kemper.freedesktop.org
Fri Jan 1 12:20:07 UTC 2010
Module: Mesa
Branch: master
Commit: 3d747eded475b227cc025391d0438a5dd1357cb9
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=3d747eded475b227cc025391d0438a5dd1357cb9
Author: José Fonseca <jfonseca at vmware.com>
Date: Thu Dec 31 20:19:18 2009 +0000
scons: Don't globally define WIN32_LEAN_AND_MEAN.
Some of the demo progams legitimately need the functionality
that's disabled by WIN32_LEAN_AND_MEAN.
Instead the solution should be to define WIN32_LEAN_AND_MEAN just before
including windows.h on a case by case basis.
---
scons/gallium.py | 2 --
scons/generic.py | 2 --
src/gallium/state_trackers/wgl/SConscript | 3 ++-
3 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/scons/gallium.py b/scons/gallium.py
index 61334f7..f24959c 100644
--- a/scons/gallium.py
+++ b/scons/gallium.py
@@ -153,8 +153,6 @@ def generate(env):
#'UNICODE',
('_WIN32_WINNT', '0x0501'), # minimum required OS version
('WINVER', '0x0501'),
- # http://msdn2.microsoft.com/en-us/library/6dwk3a1z.aspx,
- 'WIN32_LEAN_AND_MEAN',
]
if msvc and env['toolchain'] != 'winddk':
cppdefines += [
diff --git a/scons/generic.py b/scons/generic.py
index 208e3b6..149256c 100644
--- a/scons/generic.py
+++ b/scons/generic.py
@@ -228,8 +228,6 @@ def generate(env):
'_WINDOWS',
#'_UNICODE',
#'UNICODE',
- # http://msdn2.microsoft.com/en-us/library/6dwk3a1z.aspx,
- #'WIN32_LEAN_AND_MEAN',
]
if msvc:
cppdefines += [
diff --git a/src/gallium/state_trackers/wgl/SConscript b/src/gallium/state_trackers/wgl/SConscript
index b05944a..352c087 100644
--- a/src/gallium/state_trackers/wgl/SConscript
+++ b/src/gallium/state_trackers/wgl/SConscript
@@ -11,10 +11,11 @@ if env['platform'] in ['windows']:
'.',
])
- env.Append(CPPDEFINES = [
+ env.AppendUnique(CPPDEFINES = [
'_GDI32_', # prevent wgl* being declared __declspec(dllimport)
'BUILD_GL32', # declare gl* as __declspec(dllexport) in Mesa headers
'WIN32_THREADS', # use Win32 thread API
+ 'WIN32_LEAN_AND_MEAN', # http://msdn2.microsoft.com/en-us/library/6dwk3a1z.aspx
])
sources = [
More information about the mesa-commit
mailing list