Fix -Wundef warnings for MINGW_HAS_SECURE_API
authorJohannes Kauffmann <19662702+JohannesKauffmann@users.noreply.github.com>
Mon, 29 Aug 2022 23:17:53 +0000 (23:17 +0000)
committerJohannes Kauffmann <19662702+JohannesKauffmann@users.noreply.github.com>
Wed, 31 Aug 2022 15:49:54 +0000 (15:49 +0000)
commitf3cf7a452c54e095d6efa3d1cf752e0c54c747e2
treec05b83a8827f93ba3e96651746cf958add972c70
parent9e78bc8108a13d4d4ed860b2c5547092059ed83e
Fix -Wundef warnings for MINGW_HAS_SECURE_API

Since 12e27e17deb3102f1f6f08ec19caf5e32becb3f8, it was assumed that the
MINGW_HAS_SECURE_API macro was unconditionally defined. This is not
always the case, and GCC produces -Wundef warnings when that happens.

Fix this, by first checking if MINGW_HAS_SECURE_API is defined, and if
so, also check that it does not evaluate to zero.

As a drive-by, place parentheses around _MSC_VER for consistency.
glslang/Include/Common.h