Bug 830801 - Part 2. Remove NOMINMAX define from moz.build. r=mshal
authorMakoto Kato <m_kato@ga2.so-net.ne.jp>
Mon, 03 Aug 2015 10:07:09 +0900
changeset 289121 0450e3e2125e841a1f9fd05572792840e912d184
parent 289120 e94582c6247b0fdd56b7d69a5018c60eb631787e
child 289122 40fb01ba8c9287c5fb982a8cbffdad6862c296fc
push id934
push userraliiev@mozilla.com
push dateMon, 26 Oct 2015 12:58:05 +0000
treeherdermozilla-release@05704e35c1d0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs830801
milestone42.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 830801 - Part 2. Remove NOMINMAX define from moz.build. r=mshal
accessible/windows/ia2/moz.build
accessible/windows/sdn/moz.build
accessible/windows/uia/moz.build
dom/canvas/compiledtest/moz.build
dom/canvas/moz.build
dom/media/directshow/moz.build
dom/media/fmp4/moz.build
dom/media/platforms/agnostic/eme/moz.build
dom/media/platforms/moz.build
dom/media/platforms/wmf/moz.build
dom/media/webrtc/moz.build
gfx/angle/moz.build
gfx/angle/src/libEGL/moz.build
gfx/angle/src/libGLESv2/moz.build
gfx/ots/src/moz.build
ipc/chromium/chromium-config.mozbuild
media/mtransport/common.build
media/mtransport/test/moz.build
security/sandbox/moz.build
security/sandbox/staticruntime/moz.build
security/sandbox/win/src/sandboxbroker/moz.build
toolkit/crashreporter/breakpad-windows-libxul/moz.build
toolkit/crashreporter/breakpad-windows-libxul/staticruntime/moz.build
toolkit/crashreporter/breakpad-windows-standalone/moz.build
toolkit/crashreporter/test/moz.build
toolkit/mozapps/update/updater/updater-common.build
--- a/accessible/windows/ia2/moz.build
+++ b/accessible/windows/ia2/moz.build
@@ -42,16 +42,11 @@ LOCAL_INCLUDES += [
     '/accessible/windows',
     '/accessible/windows/msaa',
     '/accessible/xpcom',
     '/accessible/xul',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-# The midl generated code include Windows headers which defines min and max
-# macros which conflicts with std::min/max.  Suppress the macros:
-if CONFIG['OS_ARCH'] == 'WINNT':
-    DEFINES['NOMINMAX'] = True
-
 FAIL_ON_WARNINGS = True
 
 include('/ipc/chromium/chromium-config.mozbuild')
--- a/accessible/windows/sdn/moz.build
+++ b/accessible/windows/sdn/moz.build
@@ -14,15 +14,11 @@ LOCAL_INCLUDES += [
     '/accessible/base',
     '/accessible/generic',
     '/accessible/html',
     '/accessible/windows/msaa',
     '/accessible/xpcom',
     '/accessible/xul',
 ]
 
-# The midl generated code include Windows headers which defines min and max
-# macros which conflicts with std::min/max.  Suppress the macros:
-DEFINES['NOMINMAX'] = True
-
 FINAL_LIBRARY = 'xul'
 
 FAIL_ON_WARNINGS = True
--- a/accessible/windows/uia/moz.build
+++ b/accessible/windows/uia/moz.build
@@ -14,14 +14,9 @@ LOCAL_INCLUDES += [
     '/accessible/html',
     '/accessible/windows/msaa',
     '/accessible/xpcom',
     '/accessible/xul',
 ]
 
 FINAL_LIBRARY = 'xul'
 
-# The midl generated code include Windows headers which defines min and max
-# macros which conflicts with std::min/max.  Suppress the macros:
-if CONFIG['OS_ARCH'] == 'WINNT':
-    DEFINES['NOMINMAX'] = True
-
 FAIL_ON_WARNINGS = True
--- a/dom/canvas/compiledtest/moz.build
+++ b/dom/canvas/compiledtest/moz.build
@@ -1,17 +1,14 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
-# http://support.microsoft.com/kb/143208
-DEFINES['NOMINMAX'] = True
-
 GeckoCppUnitTests([
     'TestWebGLElementArrayCache',
 ])
 
 FAIL_ON_WARNINGS = True
 
 LOCAL_INCLUDES += [
     '../',
--- a/dom/canvas/moz.build
+++ b/dom/canvas/moz.build
@@ -31,19 +31,16 @@ EXPORTS.mozilla.dom += [
     'CanvasUtils.h',
     'ImageBitmap.h',
     'ImageBitmapSource.h',
     'ImageData.h',
     'TextMetrics.h',
     'WebGLVertexArrayObject.h',
 ]
 
-# http://support.microsoft.com/kb/143208
-DEFINES['NOMINMAX'] = True
-
 # Canvas 2D and common sources
 UNIFIED_SOURCES += [
     'CanvasImageCache.cpp',
     'CanvasRenderingContext2D.cpp',
     'CanvasUtils.cpp',
     'DocumentRendererChild.cpp',
     'DocumentRendererParent.cpp',
     'ImageBitmap.cpp',
--- a/dom/media/directshow/moz.build
+++ b/dom/media/directshow/moz.build
@@ -36,11 +36,8 @@ if not CONFIG['MOZ_WEBRTC']:
     ]
 
 FAIL_ON_WARNINGS = True
 
 FINAL_LIBRARY = 'xul'
 LOCAL_INCLUDES += [
     '/media/webrtc/trunk/webrtc/modules/video_capture/windows',
 ]
-
-if CONFIG['OS_ARCH'] == 'WINNT':
-    DEFINES['NOMINMAX'] = True
--- a/dom/media/fmp4/moz.build
+++ b/dom/media/fmp4/moz.build
@@ -18,13 +18,10 @@ UNIFIED_SOURCES += [
 SOURCES += [
     'MP4Demuxer.cpp',
 ]
 
 FINAL_LIBRARY = 'xul'
 
 FAIL_ON_WARNINGS = True
 
-if CONFIG['OS_ARCH'] == 'WINNT':
-    DEFINES['NOMINMAX'] = True
-
 if CONFIG['MOZ_GONK_MEDIACODEC']:
     DEFINES['MOZ_GONK_MEDIACODEC'] = True
--- a/dom/media/platforms/agnostic/eme/moz.build
+++ b/dom/media/platforms/agnostic/eme/moz.build
@@ -18,11 +18,8 @@ UNIFIED_SOURCES += [
     'SamplesWaitingForKey.cpp',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
 FAIL_ON_WARNINGS = True
-
-if CONFIG['OS_ARCH'] == 'WINNT':
-    DEFINES['NOMINMAX'] = True
--- a/dom/media/platforms/moz.build
+++ b/dom/media/platforms/moz.build
@@ -77,11 +77,8 @@ if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'andr
     ]
     UNIFIED_SOURCES += [
         'android/AndroidDecoderModule.cpp',
     ]
 
 FINAL_LIBRARY = 'xul'
 
 FAIL_ON_WARNINGS = True
-
-if CONFIG['OS_ARCH'] == 'WINNT':
-    DEFINES['NOMINMAX'] = True
--- a/dom/media/platforms/wmf/moz.build
+++ b/dom/media/platforms/wmf/moz.build
@@ -26,14 +26,11 @@ UNIFIED_SOURCES += [
 SOURCES += [
     'WMFUtils.cpp',
 ]
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FINAL_LIBRARY = 'xul'
 
-if CONFIG['OS_ARCH'] == 'WINNT':
-    DEFINES['NOMINMAX'] = True
-
 FAIL_ON_WARNINGS = True
 
 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
--- a/dom/media/webrtc/moz.build
+++ b/dom/media/webrtc/moz.build
@@ -78,18 +78,15 @@ include('/ipc/chromium/chromium-config.m
 #    defined, which complains about important MOZ_EXPORT attributes for
 #    android API types
 if CONFIG['GNU_CC'] or CONFIG['CLANG_CL']:
   CXXFLAGS += [
     '-Wno-error=attributes'
   ]
 
 FINAL_LIBRARY = 'xul'
-if CONFIG['OS_ARCH'] == 'WINNT':
-    DEFINES['NOMINMAX'] = True
-
 
 if CONFIG['_MSC_VER']:
   CXXFLAGS += [
     '-wd4275', # non dll-interface class used as base for dll-interface class
   ]
 
 FAIL_ON_WARNINGS = True
--- a/gfx/angle/moz.build
+++ b/gfx/angle/moz.build
@@ -93,17 +93,16 @@ if CONFIG['GNU_CXX']:
         '-Wno-unknown-pragmas',
     ]
     if CONFIG['CLANG_CXX']:
         CXXFLAGS += ['-Wno-unused-private-field']
 
 if CONFIG['MOZ_DIRECTX_SDK_PATH'] and not CONFIG['MOZ_HAS_WINSDK_WITH_D3D']:
     CXXFLAGS += ['-I\'%s/include/\'' % CONFIG['MOZ_DIRECTX_SDK_PATH']]
 
-DEFINES['NOMINMAX'] = True
 DEFINES['_CRT_SECURE_NO_DEPRECATE'] = True
 DEFINES['_HAS_EXCEPTIONS'] = 0
 
 if not CONFIG['MOZ_DEBUG']:
     DEFINES['_SECURE_SCL'] = 0
 
 DEFINES['ANGLE_ENABLE_D3D9'] = True
 if CONFIG['MOZ_HAS_WINSDK_WITH_D3D']:
--- a/gfx/angle/src/libEGL/moz.build
+++ b/gfx/angle/src/libEGL/moz.build
@@ -25,17 +25,16 @@ if CONFIG['GNU_CXX']:
         '-Wno-unknown-pragmas',
     ]
     if CONFIG['CLANG_CXX']:
         CXXFLAGS += ['-Wno-unused-private-field']
 
 if CONFIG['MOZ_DIRECTX_SDK_PATH'] and not CONFIG['MOZ_HAS_WINSDK_WITH_D3D']:
     CXXFLAGS += ['-I\'%s/include/\'' % CONFIG['MOZ_DIRECTX_SDK_PATH']]
 
-DEFINES['NOMINMAX'] = True
 DEFINES['_CRT_SECURE_NO_DEPRECATE'] = True
 DEFINES['_HAS_EXCEPTIONS'] = 0
 
 if not CONFIG['MOZ_DEBUG']:
     DEFINES['_SECURE_SCL'] = 0
 
 DEFINES['ANGLE_ENABLE_D3D9'] = True
 if CONFIG['MOZ_HAS_WINSDK_WITH_D3D']:
--- a/gfx/angle/src/libGLESv2/moz.build
+++ b/gfx/angle/src/libGLESv2/moz.build
@@ -188,17 +188,16 @@ if CONFIG['GNU_CXX']:
         '-Wno-unknown-pragmas',
     ]
     if CONFIG['CLANG_CXX']:
         CXXFLAGS += ['-Wno-unused-private-field']
 
 if CONFIG['MOZ_DIRECTX_SDK_PATH'] and not CONFIG['MOZ_HAS_WINSDK_WITH_D3D']:
     CXXFLAGS += ['-I\'%s/include/\'' % CONFIG['MOZ_DIRECTX_SDK_PATH']]
 
-DEFINES['NOMINMAX'] = True
 DEFINES['_CRT_SECURE_NO_DEPRECATE'] = True
 DEFINES['_HAS_EXCEPTIONS'] = 0
 
 if not CONFIG['MOZ_DEBUG']:
     DEFINES['_SECURE_SCL'] = 0
 
 DEFINES['ANGLE_ENABLE_D3D9'] = True
 if CONFIG['MOZ_HAS_WINSDK_WITH_D3D']:
--- a/gfx/ots/src/moz.build
+++ b/gfx/ots/src/moz.build
@@ -49,17 +49,16 @@ UNIFIED_SOURCES += [
 
 if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
     NO_VISIBILITY_FLAGS = True
 
 FINAL_LIBRARY = 'gkmedias'
 
 DEFINES['PACKAGE_VERSION'] = '"moz"'
 DEFINES['PACKAGE_BUGREPORT'] = '"http://bugzilla.mozilla.org/"'
-DEFINES['NOMINMAX'] = True
 
 if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
     DEFINES['OTS_DLL'] = True
     DEFINES['OTS_DLL_EXPORTS'] = True
 
 USE_LIBS += [
     'brotli',
 ]
--- a/ipc/chromium/chromium-config.mozbuild
+++ b/ipc/chromium/chromium-config.mozbuild
@@ -18,17 +18,16 @@ if CONFIG['OS_ARCH'] == 'WINNT':
         'psapi',
         'shell32',
         'dbghelp',
     ]
 
     DEFINES.update({
         'UNICODE': True,
         '_UNICODE': True,
-        'NOMINMAX': True,
         '_CRT_RAND_S': True,
         'CERT_CHAIN_PARA_HAS_EXTRA_FIELDS': True,
         '_SECURE_ATL': True,
         'CHROMIUM_BUILD': True,
         'U_STATIC_IMPLEMENTATION': True,
         'OS_WIN': 1,
         'WIN32': True,
         '_WIN32': True,
--- a/media/mtransport/common.build
+++ b/media/mtransport/common.build
@@ -72,17 +72,16 @@ elif CONFIG['OS_TARGET'] == 'Android':
     DEFINES['ANDROID'] = True
     LOCAL_INCLUDES += [
         '/media/mtransport/third_party/nrappkit/src/port/android/include',
     ]
 elif CONFIG['OS_TARGET'] == 'WINNT':
     DEFINES['WIN'] = True
     # for stun.h
     DEFINES['WIN32'] = True
-    DEFINES['NOMINMAX'] = True
     LOCAL_INCLUDES += [
         '/media/mtransport/third_party/nrappkit/src/port/win32/include',
     ]
 
 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
     DEFINES['USE_INTERFACE_PRIORITIZER'] = True
 
 for var in ('HAVE_STRDUP', 'NR_SOCKET_IS_VOID_PTR'):
--- a/media/mtransport/test/moz.build
+++ b/media/mtransport/test/moz.build
@@ -67,17 +67,16 @@ if CONFIG['OS_TARGET'] in ('DragonFly', 
         '/media/mtransport/third_party/nrappkit/src/port/darwin/include',
     ]
 
 # SCTP DEFINES
 if CONFIG['OS_TARGET'] == 'WINNT':
     DEFINES['WIN'] = True
     # for stun.h
     DEFINES['WIN32'] = True
-    DEFINES['NOMINMAX'] = True
     DEFINES['__Userspace_os_Windows'] = 1
 else:
     # Works for Darwin, Linux, Android. Probably doesn't work for others.
     DEFINES['__Userspace_os_%s' % CONFIG['OS_TARGET']] = 1
 
 if CONFIG['OS_TARGET'] in ('Darwin', 'Android'):
     DEFINES['GTEST_USE_OWN_TR1_TUPLE'] = 1
 
--- a/security/sandbox/moz.build
+++ b/security/sandbox/moz.build
@@ -34,17 +34,17 @@ elif CONFIG['OS_ARCH'] == 'WINNT':
     include('objs.mozbuild')
     SOURCES += security_sandbox_cppsrcs
 
     # Bug 1102853 tracks looking at removing this.
     if CONFIG['CPU_ARCH'] == 'x86_64':
         SOURCES['/security/sandbox/chromium/sandbox/win/src/sharedmem_ipc_client.cc'].no_pgo = True
 
     for var in ('UNICODE', '_UNICODE', 'NS_NO_XPCOM', 'SANDBOX_EXPORTS',
-                'NOMINMAX', '_CRT_RAND_S', 'CHROMIUM_SANDBOX_BUILD'):
+                '_CRT_RAND_S', 'CHROMIUM_SANDBOX_BUILD'):
         DEFINES[var] = True
 
     LOCAL_INCLUDES += ['/security/sandbox/chromium-shim']
     LOCAL_INCLUDES += ['/security/sandbox/chromium']
     LOCAL_INCLUDES += ['/nsprpub']
 
     DISABLE_STL_WRAPPING = True
 
--- a/security/sandbox/staticruntime/moz.build
+++ b/security/sandbox/staticruntime/moz.build
@@ -12,17 +12,17 @@ if CONFIG['OS_ARCH'] == 'WINNT':
     include('../objs.mozbuild')
     SOURCES += security_sandbox_cppsrcs
 
     # Bug 1102853 tracks looking at removing this.
     if CONFIG['CPU_ARCH'] == 'x86_64':
         SOURCES['/security/sandbox/chromium/sandbox/win/src/sharedmem_ipc_client.cc'].no_pgo = True
 
     for var in ('UNICODE', '_UNICODE', 'NS_NO_XPCOM', 'SANDBOX_EXPORTS',
-                'NOMINMAX', '_CRT_RAND_S', 'CHROMIUM_SANDBOX_BUILD'):
+                '_CRT_RAND_S', 'CHROMIUM_SANDBOX_BUILD'):
         DEFINES[var] = True
 
     LOCAL_INCLUDES += ['/security/sandbox/chromium-shim']
     LOCAL_INCLUDES += ['/security/sandbox/chromium']
     LOCAL_INCLUDES += ['/nsprpub']
 
     DISABLE_STL_WRAPPING = True
 
--- a/security/sandbox/win/src/sandboxbroker/moz.build
+++ b/security/sandbox/win/src/sandboxbroker/moz.build
@@ -14,18 +14,17 @@ USE_LIBS += [
 SOURCES += [
     'sandboxBroker.cpp',
 ]
 
 EXPORTS += [
     'sandboxBroker.h',
 ]
 
-for var in ('UNICODE', '_UNICODE', 'NS_NO_XPCOM', 'NOMINMAX',
-            'SANDBOX_EXPORTS'):
+for var in ('UNICODE', '_UNICODE', 'NS_NO_XPCOM', 'SANDBOX_EXPORTS'):
     DEFINES[var] = True
 
 LOCAL_INCLUDES += [
     '/security/sandbox/chromium',
 ]
 
 DISABLE_STL_WRAPPING = True
 
--- a/toolkit/crashreporter/breakpad-windows-libxul/moz.build
+++ b/toolkit/crashreporter/breakpad-windows-libxul/moz.build
@@ -11,17 +11,17 @@ DIRS += [
 SOURCES += [
     '../google-breakpad/src/common/windows/http_upload.cc',
 ]
 
 Library('google_breakpad_libxul_s')
 
 FINAL_LIBRARY = 'xul'
 
-for var in ('UNICODE', 'UNICODE_', 'BREAKPAD_NO_TERMINATE_THREAD', 'NOMINMAX'):
+for var in ('UNICODE', 'UNICODE_', 'BREAKPAD_NO_TERMINATE_THREAD'):
     DEFINES[var] = True
 
 LOCAL_INCLUDES += [
     '/toolkit/crashreporter/google-breakpad/src',
 ]
 
 include('/toolkit/crashreporter/google-breakpad/src/common/windows/objs.mozbuild')
 include('/toolkit/crashreporter/google-breakpad/src/client/windows/handler/objs.mozbuild')
--- a/toolkit/crashreporter/breakpad-windows-libxul/staticruntime/moz.build
+++ b/toolkit/crashreporter/breakpad-windows-libxul/staticruntime/moz.build
@@ -5,17 +5,17 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 SOURCES += [
     '../../google-breakpad/src/common/windows/http_upload.cc',
 ]
 
 Library('google_breakpad_libxul_staticruntime_s')
 
-for var in ('UNICODE', 'UNICODE_', 'BREAKPAD_NO_TERMINATE_THREAD', 'NOMINMAX'):
+for var in ('UNICODE', 'UNICODE_', 'BREAKPAD_NO_TERMINATE_THREAD'):
     DEFINES[var] = True
 
 LOCAL_INCLUDES += [
     '/toolkit/crashreporter/google-breakpad/src',
 ]
 
 include('/toolkit/crashreporter/google-breakpad/src/common/windows/objs.mozbuild')
 include('/toolkit/crashreporter/google-breakpad/src/client/windows/handler/objs.mozbuild')
--- a/toolkit/crashreporter/breakpad-windows-standalone/moz.build
+++ b/toolkit/crashreporter/breakpad-windows-standalone/moz.build
@@ -1,17 +1,17 @@
 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
 # vim: set filetype=python:
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 FINAL_LIBRARY = 'breakpadinjector'
 
-for var in ('UNICODE', 'UNICODE_', 'BREAKPAD_NO_TERMINATE_THREAD', 'NOMINMAX'):
+for var in ('UNICODE', 'UNICODE_', 'BREAKPAD_NO_TERMINATE_THREAD'):
     DEFINES[var] = True
 
 LOCAL_INCLUDES += [
     '/toolkit/crashreporter/google-breakpad/src',
 ]
 
 include('/toolkit/crashreporter/google-breakpad/src/common/windows/objs.mozbuild')
 include('/toolkit/crashreporter/google-breakpad/src/client/windows/handler/objs.mozbuild')
--- a/toolkit/crashreporter/test/moz.build
+++ b/toolkit/crashreporter/test/moz.build
@@ -24,15 +24,13 @@ EXTRA_JS_MODULES += [
 ]
 
 DEFINES['SHARED_LIBRARY'] = '%s%s%s' % (
     CONFIG['DLL_PREFIX'],
     LIBRARY_NAME,
     CONFIG['DLL_SUFFIX']
 )
 
-DEFINES['NOMINMAX'] = True
-
 LOCAL_INCLUDES += [
     '../google-breakpad/src/',
 ]
 
 include('/toolkit/crashreporter/crashreporter.mozbuild')
--- a/toolkit/mozapps/update/updater/updater-common.build
+++ b/toolkit/mozapps/update/updater/updater-common.build
@@ -22,17 +22,16 @@ if CONFIG['OS_ARCH'] == 'WINNT':
     srcs += [
         'loaddlls.cpp',
         'progressui_win.cpp',
         'win_dirent.cpp',
     ]
     RCINCLUDE = '%supdater.rc' % updater_rel_path
     DEFINES['UNICODE'] = True
     DEFINES['_UNICODE'] = True
-    DEFINES['NOMINMAX'] = True
     USE_STATIC_LIBS = True
 
     # Pick up nsWindowsRestart.cpp
     LOCAL_INCLUDES += [
         '/toolkit/xre',
     ]
     USE_LIBS += [
         'updatecommon-standalone',