Skip to content

adapter_test: define _USE_MATH_DEFINES on Windows, not just with MSVC#30

Open
chris-se wants to merge 1 commit into
hudson-trading:masterfrom
chris-se:mingw-w64-fixes
Open

adapter_test: define _USE_MATH_DEFINES on Windows, not just with MSVC#30
chris-se wants to merge 1 commit into
hudson-trading:masterfrom
chris-se:mingw-w64-fixes

Conversation

@chris-se

Copy link
Copy Markdown

MinGW/GCC also follows MSVC when it comes to the behavior of <cmath>, in that _USE_MATH_DEFINES must be defined for M_PI etc. to be defined as macros after including the header.

Replace #ifdef _MSC_VER with a global check for _WIN32 (which is also defined on 64bit Windows), so that this behavior happens on Windows universally, irrespective of the compiler used.

MinGW/GCC also follows MSVC when it comes to the behavior of <cmath>,
in that _USE_MATH_DEFINES must be defined for M_PI etc. to be
defined as macros after including the header.

Replace '#ifdef _MSC_VER' with a global check for '_WIN32' (which is
also defined on 64bit Windows), so that this behavior happens on
Windows universally, irrespective of the compiler used.

Signed-off-by: Christian Seiler <c.seiler@luxflux.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant