<div dir="ltr">Hi Johannes Kauffmann,<br><br><div>Can you share the patches attached to this email?<br><br></div><div>Thanks,<br>Yaswanth</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, Jun 9, 2023 at 3:42 AM <<a href="mailto:x265-devel-request@videolan.org">x265-devel-request@videolan.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Send x265-devel mailing list submissions to<br>
        <a href="mailto:x265-devel@videolan.org" target="_blank">x265-devel@videolan.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://mailman.videolan.org/listinfo/x265-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:x265-devel-request@videolan.org" target="_blank">x265-devel-request@videolan.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:x265-devel-owner@videolan.org" target="_blank">x265-devel-owner@videolan.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of x265-devel digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. [PATCH 0/3] Fix Wundef warnings and defines in .pc file<br>
      (Johannes Kauffmann)<br>
   2. [PATCH 1/3] Fix Wundef for _MSC_VER (Johannes Kauffmann)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Fri,  9 Jun 2023 00:11:40 +0200<br>
From: Johannes Kauffmann <<a href="mailto:johanneskauffmann@hotmail.com" target="_blank">johanneskauffmann@hotmail.com</a>><br>
To: <a href="mailto:x265-devel@videolan.org" target="_blank">x265-devel@videolan.org</a><br>
Subject: [x265] [PATCH 0/3] Fix Wundef warnings and defines in .pc<br>
        file<br>
Message-ID:<br>
        <<a href="mailto:DB6PR07MB3175F6A654884FF2D32EAD73A650A@DB6PR07MB3175.eurprd07.prod.outlook.com" target="_blank">DB6PR07MB3175F6A654884FF2D32EAD73A650A@DB6PR07MB3175.eurprd07.prod.outlook.com</a>><br>
<br>
Content-Type: text/plain<br>
<br>
- Fix all Wundef warnings when building x265 client apps.<br>
- Add defines needed by both x265 and client apps to the .pc file.<br>
<br>
Johannes Kauffmann (3):<br>
  Fix Wundef for _MSC_VER<br>
  Fix Wundef for ENABLE_LIBVMAF<br>
  Add defines needed by client apps to .pc file<br>
<br>
 source/CMakeLists.txt                 | 15 +++++++++++----<br>
 source/abrEncApp.cpp                  |  4 ++--<br>
 source/common/bitstream.cpp           |  2 +-<br>
 source/common/common.h                |  4 ++--<br>
 source/common/cpu.cpp                 |  2 +-<br>
 source/common/cpu.h                   |  4 ++--<br>
 source/common/dct.cpp                 |  2 +-<br>
 source/common/ipfilter.cpp            |  2 +-<br>
 source/common/mv.h                    |  2 +-<br>
 source/common/param.cpp               |  4 ++--<br>
 source/common/picyuv.cpp              |  2 +-<br>
 source/common/pixel.cpp               |  2 +-<br>
 source/common/predict.cpp             |  2 +-<br>
 source/common/ringmem.h               |  2 +-<br>
 source/common/scaler.cpp              |  2 +-<br>
 source/common/threadpool.cpp          |  2 +-<br>
 source/common/version.cpp             |  2 +-<br>
 source/dynamicHDR10/json11/json11.cpp |  2 +-<br>
 source/encoder/api.cpp                | 20 ++++++++++----------<br>
 source/encoder/encoder.cpp            |  6 +++---<br>
 source/encoder/frameencoder.cpp       |  4 ++--<br>
 source/encoder/frameencoder.h         |  2 +-<br>
 source/encoder/motion.cpp             |  2 +-<br>
 source/encoder/ratecontrol.cpp        |  4 ++--<br>
 source/encoder/search.cpp             |  2 +-<br>
 source/input/y4m.cpp                  |  2 +-<br>
 source/input/yuv.cpp                  |  2 +-<br>
 source/output/raw.cpp                 |  2 +-<br>
 source/test/testharness.h             |  2 +-<br>
 source/x265.cpp                       |  2 +-<br>
 source/x265.h                         |  8 ++++----<br>
 source/<a href="http://x265.pc.in" rel="noreferrer" target="_blank">x265.pc.in</a>                     |  2 +-<br>
 source/x265cli.cpp                    |  6 +++---<br>
 33 files changed, 65 insertions(+), 58 deletions(-)<br>
<br>
-- <br>
2.34.1<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Fri,  9 Jun 2023 00:11:41 +0200<br>
From: Johannes Kauffmann <<a href="mailto:johanneskauffmann@hotmail.com" target="_blank">johanneskauffmann@hotmail.com</a>><br>
To: <a href="mailto:x265-devel@videolan.org" target="_blank">x265-devel@videolan.org</a><br>
Subject: [x265] [PATCH 1/3] Fix Wundef for _MSC_VER<br>
Message-ID:<br>
        <<a href="mailto:DB6PR07MB31752C630E3E870A2B1260D4A650A@DB6PR07MB3175.eurprd07.prod.outlook.com" target="_blank">DB6PR07MB31752C630E3E870A2B1260D4A650A@DB6PR07MB3175.eurprd07.prod.outlook.com</a>><br>
<br>
Content-Type: text/plain<br>
<br>
This is mainly noticable when building another application, which<br>
includes x265.h, with -Wundef, as _MSC_VER, among others, doesn't have<br>
to be defined.<br>
<br>
Additionally, also fix all cases of -Wundef warning for _MSC_VER when<br>
building x265 itself. Use #ifdef where it suffices instead of #defined()<br>
for consistency.<br>
---<br>
 source/common/bitstream.cpp           | 2 +-<br>
 source/common/common.h                | 4 ++--<br>
 source/common/cpu.cpp                 | 2 +-<br>
 source/common/cpu.h                   | 4 ++--<br>
 source/common/dct.cpp                 | 2 +-<br>
 source/common/ipfilter.cpp            | 2 +-<br>
 source/common/mv.h                    | 2 +-<br>
 source/common/param.cpp               | 4 ++--<br>
 source/common/picyuv.cpp              | 2 +-<br>
 source/common/pixel.cpp               | 2 +-<br>
 source/common/predict.cpp             | 2 +-<br>
 source/common/ringmem.h               | 2 +-<br>
 source/common/scaler.cpp              | 2 +-<br>
 source/common/threadpool.cpp          | 2 +-<br>
 source/common/version.cpp             | 2 +-<br>
 source/dynamicHDR10/json11/json11.cpp | 2 +-<br>
 source/encoder/api.cpp                | 2 +-<br>
 source/encoder/encoder.cpp            | 4 ++--<br>
 source/encoder/motion.cpp             | 2 +-<br>
 source/encoder/ratecontrol.cpp        | 4 ++--<br>
 source/encoder/search.cpp             | 2 +-<br>
 source/input/y4m.cpp                  | 2 +-<br>
 source/input/yuv.cpp                  | 2 +-<br>
 source/output/raw.cpp                 | 2 +-<br>
 source/test/testharness.h             | 2 +-<br>
 source/x265.cpp                       | 2 +-<br>
 source/x265.h                         | 2 +-<br>
 source/x265cli.cpp                    | 2 +-<br>
 28 files changed, 33 insertions(+), 33 deletions(-)<br>
<br>
diff --git a/source/common/bitstream.cpp b/source/common/bitstream.cpp<br>
index b844749f5..34030bb27 100644<br>
--- a/source/common/bitstream.cpp<br>
+++ b/source/common/bitstream.cpp<br>
@@ -4,7 +4,7 @@<br>
<br>
 using namespace X265_NS;<br>
<br>
-#if defined(_MSC_VER)<br>
+#ifdef _MSC_VER<br>
 #pragma warning(disable: 4244)<br>
 #endif<br>
<br>
diff --git a/source/common/common.h b/source/common/common.h<br>
index 37c19ae72..9285bc4d5 100644<br>
--- a/source/common/common.h<br>
+++ b/source/common/common.h<br>
@@ -116,7 +116,7 @@ namespace X265_NS { extern int g_checkFailures; }<br>
     if (fp) { fprintf(fp, "%s:%d\n", __FILE__, __LINE__); fprintf(fp, __VA_ARGS__); fclose(fp); } \<br>
     g_checkFailures++; DEBUG_BREAK(); \<br>
 }<br>
-#if _MSC_VER<br>
+#ifdef _MSC_VER<br>
 #pragma warning(disable: 4127) // some checks have constant conditions<br>
 #endif<br>
 #else<br>
@@ -241,7 +241,7 @@ typedef int16_t  coeff_t;      // transform coefficient<br>
         } \<br>
     }<br>
<br>
-#if defined(_MSC_VER)<br>
+#ifdef _MSC_VER<br>
 #define X265_LOG2F(x) (logf((float)(x)) * 1.44269504088896405f)<br>
 #define X265_LOG2(x) (log((double)(x)) * 1.4426950408889640513713538072172)<br>
 #else<br>
diff --git a/source/common/cpu.cpp b/source/common/cpu.cpp<br>
index ce428c929..e1532c5fb 100644<br>
--- a/source/common/cpu.cpp<br>
+++ b/source/common/cpu.cpp<br>
@@ -126,7 +126,7 @@ void PFX(cpu_cpuid)(uint32_t op, uint32_t *eax, uint32_t *ebx, uint32_t *ecx, ui<br>
 uint64_t PFX(cpu_xgetbv)(int xcr);<br>
 }<br>
<br>
-#if defined(_MSC_VER)<br>
+#ifdef _MSC_VER<br>
 #pragma warning(disable: 4309) // truncation of constant value<br>
 #endif<br>
<br>
diff --git a/source/common/cpu.h b/source/common/cpu.h<br>
index 52a9e9cba..c9fcd1a0a 100644<br>
--- a/source/common/cpu.h<br>
+++ b/source/common/cpu.h<br>
@@ -35,9 +35,9 @@<br>
 extern "C" void PFX(cpu_emms)(void);<br>
 extern "C" void PFX(safe_intel_cpu_indicator_init)(void);<br>
<br>
-#if _MSC_VER && _WIN64<br>
+#if defined(_MSC_VER) && _WIN64<br>
 #define x265_emms() PFX(cpu_emms)()<br>
-#elif _MSC_VER<br>
+#elif defined(_MSC_VER)<br>
 #include <mmintrin.h><br>
 #define x265_emms() _mm_empty()<br>
 #elif __GNUC__<br>
diff --git a/source/common/dct.cpp b/source/common/dct.cpp<br>
index b102b6e31..1667863ca 100644<br>
--- a/source/common/dct.cpp<br>
+++ b/source/common/dct.cpp<br>
@@ -34,7 +34,7 @@<br>
<br>
 using namespace X265_NS;<br>
<br>
-#if _MSC_VER<br>
+#ifdef _MSC_VER<br>
 #pragma warning(disable: 4127) // conditional expression is constant, typical for templated functions<br>
 #endif<br>
<br>
diff --git a/source/common/ipfilter.cpp b/source/common/ipfilter.cpp<br>
index 64f659d5f..d4760c5b0 100644<br>
--- a/source/common/ipfilter.cpp<br>
+++ b/source/common/ipfilter.cpp<br>
@@ -30,7 +30,7 @@<br>
<br>
 using namespace X265_NS;<br>
<br>
-#if _MSC_VER<br>
+#ifdef _MSC_VER<br>
 #pragma warning(disable: 4127) // conditional expression is constant, typical for templated functions<br>
 #endif<br>
<br>
diff --git a/source/common/mv.h b/source/common/mv.h<br>
index 5a8872cdd..da1dc6606 100644<br>
--- a/source/common/mv.h<br>
+++ b/source/common/mv.h<br>
@@ -30,7 +30,7 @@<br>
 namespace X265_NS {<br>
 // private x265 namespace<br>
<br>
-#if _MSC_VER<br>
+#ifdef _MSC_VER<br>
 #pragma warning(disable: 4201) // non-standard extension used (nameless struct/union)<br>
 #endif<br>
<br>
diff --git a/source/common/param.cpp b/source/common/param.cpp<br>
index 1a4df4cdc..032ef3a28 100755<br>
--- a/source/common/param.cpp<br>
+++ b/source/common/param.cpp<br>
@@ -30,7 +30,7 @@<br>
 #include "x265.h"<br>
 #include "svt.h"<br>
<br>
-#if _MSC_VER<br>
+#ifdef _MSC_VER<br>
 #pragma warning(disable: 4996) // POSIX functions are just fine, thanks<br>
 #pragma warning(disable: 4706) // assignment within conditional<br>
 #pragma warning(disable: 4127) // conditional expression is constant<br>
@@ -885,7 +885,7 @@ int x265_param_parse(x265_param* p, const char* name, const char* value)<br>
     else if (value[0] == '=')<br>
         value++;<br>
<br>
-#if defined(_MSC_VER)<br>
+#ifdef _MSC_VER<br>
 #pragma warning(disable: 4127) // conditional expression is constant<br>
 #endif<br>
 #define OPT(STR) else if (!strcmp(name, STR))<br>
diff --git a/source/common/picyuv.cpp b/source/common/picyuv.cpp<br>
index 58426a613..5f4088121 100644<br>
--- a/source/common/picyuv.cpp<br>
+++ b/source/common/picyuv.cpp<br>
@@ -574,7 +574,7 @@ void updateCRC(const pixel* plane, uint32_t& crcVal, uint32_t height, uint32_t w<br>
                 crcVal = (((crcVal << 1) + bitVal) & 0xffff) ^ (crcMsb * 0x1021);<br>
             }<br>
<br>
-#if _MSC_VER<br>
+#ifdef _MSC_VER<br>
 #pragma warning(disable: 4127) // conditional expression is constant<br>
 #endif<br>
             // take CRC of second pictureData byte if bit depth is greater than 8-bits<br>
diff --git a/source/common/pixel.cpp b/source/common/pixel.cpp<br>
index 3cd074cfa..56cc24b72 100644<br>
--- a/source/common/pixel.cpp<br>
+++ b/source/common/pixel.cpp<br>
@@ -736,7 +736,7 @@ uint64_t pixel_var(const pixel* pix, intptr_t i_stride)<br>
     return sum + ((uint64_t)sqr << 32);<br>
 }<br>
<br>
-#if defined(_MSC_VER)<br>
+#ifdef _MSC_VER<br>
 #pragma warning(disable: 4127) // conditional expression is constant<br>
 #endif<br>
<br>
diff --git a/source/common/predict.cpp b/source/common/predict.cpp<br>
index a32bd05f7..444bec113 100644<br>
--- a/source/common/predict.cpp<br>
+++ b/source/common/predict.cpp<br>
@@ -31,7 +31,7 @@<br>
<br>
 using namespace X265_NS;<br>
<br>
-#if _MSC_VER<br>
+#ifdef _MSC_VER<br>
 #pragma warning(disable: 4127) // conditional expression is constant<br>
 #endif<br>
<br>
diff --git a/source/common/ringmem.h b/source/common/ringmem.h<br>
index b14f7bee9..bec7dba74 100644<br>
--- a/source/common/ringmem.h<br>
+++ b/source/common/ringmem.h<br>
@@ -27,7 +27,7 @@<br>
 #include "common.h"<br>
 #include "threading.h"<br>
<br>
-#if _MSC_VER<br>
+#ifdef _MSC_VER<br>
 #define snprintf _snprintf<br>
 #define strdup _strdup<br>
 #endif<br>
diff --git a/source/common/scaler.cpp b/source/common/scaler.cpp<br>
index 879654793..d0c509e04 100644<br>
--- a/source/common/scaler.cpp<br>
+++ b/source/common/scaler.cpp<br>
@@ -23,7 +23,7 @@<br>
<br>
 #include "scaler.h"<br>
<br>
-#if _MSC_VER<br>
+#ifdef _MSC_VER<br>
 #pragma warning(disable: 4706) // assignment within conditional<br>
 #pragma warning(disable: 4244) // '=' : possible loss of data<br>
 #endif<br>
diff --git a/source/common/threadpool.cpp b/source/common/threadpool.cpp<br>
index 91e82a24e..8fcd75b62 100644<br>
--- a/source/common/threadpool.cpp<br>
+++ b/source/common/threadpool.cpp<br>
@@ -67,7 +67,7 @@<br>
 #if HAVE_LIBNUMA<br>
 #include <numa.h><br>
 #endif<br>
-#if defined(_MSC_VER)<br>
+#ifdef _MSC_VER<br>
 # define strcasecmp _stricmp<br>
 #endif<br>
<br>
diff --git a/source/common/version.cpp b/source/common/version.cpp<br>
index 16a546756..43c9daf8d 100644<br>
--- a/source/common/version.cpp<br>
+++ b/source/common/version.cpp<br>
@@ -49,7 +49,7 @@<br>
<br>
 #ifdef __INTEL_COMPILER<br>
 #define COMPILEDBY "[ICC " XSTR(__INTEL_COMPILER) "]"<br>
-#elif  _MSC_VER<br>
+#elif defined(_MSC_VER)<br>
 #define COMPILEDBY "[MSVC " XSTR(_MSC_VER) "]"<br>
 #endif<br>
<br>
diff --git a/source/dynamicHDR10/json11/json11.cpp b/source/dynamicHDR10/json11/json11.cpp<br>
index 762577735..e0fded87f 100644<br>
--- a/source/dynamicHDR10/json11/json11.cpp<br>
+++ b/source/dynamicHDR10/json11/json11.cpp<br>
@@ -26,7 +26,7 @@<br>
 #include <cstdio><br>
 #include <limits><br>
<br>
-#if _MSC_VER<br>
+#ifdef _MSC_VER<br>
 #pragma warning(disable: 4510) //const member cannot be default initialized<br>
 #pragma warning(disable: 4512) //assignment operator could not be generated<br>
 #pragma warning(disable: 4610) //const member cannot be default initialized<br>
diff --git a/source/encoder/api.cpp b/source/encoder/api.cpp<br>
index 15b898a3c..18edb9a70 100644<br>
--- a/source/encoder/api.cpp<br>
+++ b/source/encoder/api.cpp<br>
@@ -78,7 +78,7 @@ x265_encoder *x265_encoder_open(x265_param *p)<br>
     if (!p)<br>
         return NULL;<br>
<br>
-#if _MSC_VER<br>
+#ifdef _MSC_VER<br>
 #pragma warning(disable: 4127) // conditional expression is constant, yes I know<br>
 #endif<br>
<br>
diff --git a/source/encoder/encoder.cpp b/source/encoder/encoder.cpp<br>
index c2dd6f4e8..977ae19e3 100644<br>
--- a/source/encoder/encoder.cpp<br>
+++ b/source/encoder/encoder.cpp<br>
@@ -42,7 +42,7 @@<br>
<br>
 #include "x265.h"<br>
<br>
-#if _MSC_VER<br>
+#ifdef _MSC_VER<br>
 #pragma warning(disable: 4996) // POSIX functions are just fine, thanks<br>
 #endif<br>
<br>
@@ -3161,7 +3161,7 @@ void Encoder::finishFrameStats(Frame* curFrame, FrameEncoder *curEncoder, x265_f<br>
     }<br>
 }<br>
<br>
-#if defined(_MSC_VER)<br>
+#ifdef _MSC_VER<br>
 #pragma warning(disable: 4800) // forcing int to bool<br>
 #pragma warning(disable: 4127) // conditional expression is constant<br>
 #endif<br>
diff --git a/source/encoder/motion.cpp b/source/encoder/motion.cpp<br>
index 2bb613ec0..0edbc46dc 100644<br>
--- a/source/encoder/motion.cpp<br>
+++ b/source/encoder/motion.cpp<br>
@@ -28,7 +28,7 @@<br>
 #include "motion.h"<br>
 #include "x265.h"<br>
<br>
-#if _MSC_VER<br>
+#ifdef _MSC_VER<br>
 #pragma warning(disable: 4127) // conditional  expression is constant (macros use this construct)<br>
 #endif<br>
<br>
diff --git a/source/encoder/ratecontrol.cpp b/source/encoder/ratecontrol.cpp<br>
index 42eaa673a..5b772aae0 100644<br>
--- a/source/encoder/ratecontrol.cpp<br>
+++ b/source/encoder/ratecontrol.cpp<br>
@@ -23,7 +23,7 @@<br>
  * For more information, contact us at license @ <a href="http://x265.com" rel="noreferrer" target="_blank">x265.com</a>.<br>
  *****************************************************************************/<br>
<br>
-#if _MSC_VER<br>
+#ifdef _MSC_VER<br>
 #pragma warning(disable: 4127) // conditional expression is constant, yes I know<br>
 #endif<br>
<br>
@@ -3231,7 +3231,7 @@ int RateControl::writeRateControlFrameStats(Frame* curFrame, RateControlEntry* r<br>
     x265_log(m_param, X265_LOG_ERROR, "RatecontrolEnd: stats file write failure\n");<br>
     return 1;<br>
 }<br>
-#if defined(_MSC_VER)<br>
+#ifdef _MSC_VER<br>
 #pragma warning(disable: 4996) // POSIX function names are just fine, thank you<br>
 #endif<br>
<br>
diff --git a/source/encoder/search.cpp b/source/encoder/search.cpp<br>
index dab11fc79..a55402558 100644<br>
--- a/source/encoder/search.cpp<br>
+++ b/source/encoder/search.cpp<br>
@@ -36,7 +36,7 @@<br>
<br>
 using namespace X265_NS;<br>
<br>
-#if _MSC_VER<br>
+#ifdef _MSC_VER<br>
 #pragma warning(disable: 4800) // 'uint8_t' : forcing value to bool 'true' or 'false' (performance warning)<br>
 #pragma warning(disable: 4244) // '=' : conversion from 'int' to 'uint8_t', possible loss of data)<br>
 #pragma warning(disable: 4127) // conditional expression is constant<br>
diff --git a/source/input/y4m.cpp b/source/input/y4m.cpp<br>
index bb55b6417..9cd92422a 100644<br>
--- a/source/input/y4m.cpp<br>
+++ b/source/input/y4m.cpp<br>
@@ -32,7 +32,7 @@<br>
 #if _WIN32<br>
 #include <io.h><br>
 #include <fcntl.h><br>
-#if defined(_MSC_VER)<br>
+#ifdef _MSC_VER<br>
 #pragma warning(disable: 4996) // POSIX setmode and fileno deprecated<br>
 #endif<br>
 #endif<br>
diff --git a/source/input/yuv.cpp b/source/input/yuv.cpp<br>
index 0856a7217..382050485 100644<br>
--- a/source/input/yuv.cpp<br>
+++ b/source/input/yuv.cpp<br>
@@ -32,7 +32,7 @@<br>
 #if _WIN32<br>
 #include <io.h><br>
 #include <fcntl.h><br>
-#if defined(_MSC_VER)<br>
+#ifdef _MSC_VER<br>
 #pragma warning(disable: 4996) // POSIX setmode and fileno deprecated<br>
 #endif<br>
 #endif<br>
diff --git a/source/output/raw.cpp b/source/output/raw.cpp<br>
index 7894e22fc..17e82bdf9 100644<br>
--- a/source/output/raw.cpp<br>
+++ b/source/output/raw.cpp<br>
@@ -25,7 +25,7 @@<br>
 #if _WIN32<br>
 #include <io.h><br>
 #include <fcntl.h><br>
-#if defined(_MSC_VER)<br>
+#ifdef _MSC_VER<br>
 #pragma warning(disable: 4996) // POSIX setmode and fileno deprecated<br>
 #endif<br>
 #endif<br>
diff --git a/source/test/testharness.h b/source/test/testharness.h<br>
index c03d7c2f5..56d7b6efe 100644<br>
--- a/source/test/testharness.h<br>
+++ b/source/test/testharness.h<br>
@@ -29,7 +29,7 @@<br>
 #include "common.h"<br>
 #include "primitives.h"<br>
<br>
-#if _MSC_VER<br>
+#ifdef _MSC_VER<br>
 #pragma warning(disable: 4324) // structure was padded due to __declspec(align())<br>
 #endif<br>
<br>
diff --git a/source/x265.cpp b/source/x265.cpp<br>
index 31a627d87..a428cd29a 100644<br>
--- a/source/x265.cpp<br>
+++ b/source/x265.cpp<br>
@@ -21,7 +21,7 @@<br>
  * For more information, contact us at license @ <a href="http://x265.com" rel="noreferrer" target="_blank">x265.com</a>.<br>
  *****************************************************************************/<br>
<br>
-#if _MSC_VER<br>
+#ifdef _MSC_VER<br>
 #pragma warning(disable: 4127) // conditional expression is constant, yes I know<br>
 #endif<br>
<br>
diff --git a/source/x265.h b/source/x265.h<br>
index 1561a7a3e..901f33ded 100644<br>
--- a/source/x265.h<br>
+++ b/source/x265.h<br>
@@ -32,7 +32,7 @@<br>
 extern "C" {<br>
 #endif<br>
<br>
-#if _MSC_VER<br>
+#ifdef _MSC_VER<br>
 #pragma warning(disable: 4201) // non-standard extension used (nameless struct/union)<br>
 #endif<br>
<br>
diff --git a/source/x265cli.cpp b/source/x265cli.cpp<br>
index cbb3be593..eef101fe9 100755<br>
--- a/source/x265cli.cpp<br>
+++ b/source/x265cli.cpp<br>
@@ -21,7 +21,7 @@<br>
  * This program is also available under a commercial proprietary license.<br>
  * For more information, contact us at license @ <a href="http://x265.com" rel="noreferrer" target="_blank">x265.com</a>.<br>
  *****************************************************************************/<br>
-#if _MSC_VER<br>
+#ifdef _MSC_VER<br>
 #pragma warning(disable: 4127) // conditional expression is constant, yes I know<br>
 #endif<br>
<br>
-- <br>
2.34.1<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
x265-devel mailing list<br>
<a href="mailto:x265-devel@videolan.org" target="_blank">x265-devel@videolan.org</a><br>
<a href="https://mailman.videolan.org/listinfo/x265-devel" rel="noreferrer" target="_blank">https://mailman.videolan.org/listinfo/x265-devel</a><br>
<br>
<br>
------------------------------<br>
<br>
End of x265-devel Digest, Vol 120, Issue 2<br>
******************************************<br>
</blockquote></div>