scons: Don't globally define WIN32_LEAN_AND_MEAN.
authorJosé Fonseca <jfonseca@vmware.com>
Thu, 31 Dec 2009 20:19:18 +0000 (20:19 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Fri, 1 Jan 2010 12:16:19 +0000 (12:16 +0000)
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
scons/generic.py
src/gallium/state_trackers/wgl/SConscript

index 61334f71c770560896741e3da028eaeb142e26de..f24959c12058187eef137cb49bee6244a7b971c4 100644 (file)
@@ -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 += [
index 208e3b6526906f76ff0b04fb0cb279ca05095231..149256c3db67b8d6c17e4dac682034663c13a404 100644 (file)
@@ -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 += [
index b05944a33b3e56c56c7468ff5c855c2226f324a1..352c087475eb89841d7fabcd658c087e973601ab 100644 (file)
@@ -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 = [