mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 19:04:45 +00:00
Bug 1832219 - Define _USE_MATH_DEFINES and M_PI on both regular and mingw Windows builds. r=firefox-build-system-reviewers,cubeb-reviewers,glandium,padenot
Without _USE_MATH_DEFINES, Windows' math.h doesn't define M_PI. Since _USE_MATH_DEFINES is defined globally, redundant definitions of _USE_MATH_DEFINES in moz.build files can be removed. obj-build/dist/include/mozilla/ServoStyleConstsInlines.h:396:32: error: use of undeclared identifier 'M_PI' obj-build/dist/include/mozilla/StaticPrefList_apz.h:133:22: error: use of undeclared identifier 'M_PI' obj-build/dist/include/mozilla/gfx/PathHelpers.h:139:33: error: use of undeclared identifier 'M_PI' Differential Revision: https://phabricator.services.mozilla.com/D177590
This commit is contained in:
parent
8b7bd5c4ba
commit
03f125ade5
@ -60,8 +60,6 @@ if CONFIG['MOZ_USE_PTHREADS']:
|
||||
|
||||
DEFINES['PACKAGE'] = 'mozpixman'
|
||||
|
||||
DEFINES['_USE_MATH_DEFINES'] = True
|
||||
|
||||
if CONFIG['INTEL_ARCHITECTURE']:
|
||||
DEFINES['USE_X86_MMX'] = True
|
||||
DEFINES['USE_SSE2'] = True
|
||||
|
@ -110,7 +110,6 @@ case "$target" in
|
||||
|
||||
AC_DEFINE(_CRT_SECURE_NO_WARNINGS)
|
||||
AC_DEFINE(_CRT_NONSTDC_NO_WARNINGS)
|
||||
AC_DEFINE(_USE_MATH_DEFINES) # Otherwise MSVC's math.h doesn't #define M_PI.
|
||||
|
||||
MSVC_C_RUNTIME_DLL=vcruntime140.dll
|
||||
MSVC_CXX_RUNTIME_DLL=msvcp140.dll
|
||||
@ -141,6 +140,8 @@ case "$target" in
|
||||
fi
|
||||
fi # !GNU_CC
|
||||
|
||||
AC_DEFINE(_USE_MATH_DEFINES) # Otherwise Windows' math.h doesn't #define M_PI.
|
||||
|
||||
AC_DEFINE_UNQUOTED(WINVER,0x$WINVER)
|
||||
AC_DEFINE_UNQUOTED(_WIN32_WINNT,0x$WINVER)
|
||||
# Require OS features provided by IE 8.0 (Win7)
|
||||
|
@ -89,8 +89,6 @@ if CONFIG['MOZ_WASAPI']:
|
||||
"avrt",
|
||||
"ksuser",
|
||||
]
|
||||
if CONFIG['CC_TYPE'] == 'clang-cl':
|
||||
CXXFLAGS += ['-Wno-macro-redefined'] # '_USE_MATH_DEFINES' : macro redefinition
|
||||
|
||||
if CONFIG['MOZ_AAUDIO'] or CONFIG['MOZ_OPENSL']:
|
||||
SOURCES += ['cubeb-jni.cpp']
|
||||
|
@ -99,7 +99,6 @@ case "$target" in
|
||||
|
||||
AC_DEFINE(_CRT_SECURE_NO_WARNINGS)
|
||||
AC_DEFINE(_CRT_NONSTDC_NO_WARNINGS)
|
||||
AC_DEFINE(_USE_MATH_DEFINES) # Otherwise MSVC's math.h doesn't #define M_PI.
|
||||
|
||||
MSVC_C_RUNTIME_DLL=vcruntime140.dll
|
||||
MSVC_CXX_RUNTIME_DLL=msvcp140.dll
|
||||
@ -146,6 +145,8 @@ case "$target" in
|
||||
AC_DEFINE(STRSAFE_NO_DEPRECATE)
|
||||
fi # !GNU_CC
|
||||
|
||||
AC_DEFINE(_USE_MATH_DEFINES) # Otherwise Windows' math.h doesn't #define M_PI.
|
||||
|
||||
CFLAGS="$CFLAGS -D_HAS_EXCEPTIONS=0"
|
||||
CXXFLAGS="$CXXFLAGS -D_HAS_EXCEPTIONS=0"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user