summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2024-02-21 22:27:37 +0600
committerMike Kaganski <mike.kaganski@collabora.com>2024-02-21 21:43:15 +0100
commit6329a56f601748f5a8dd6da9f0a90d3e57efcaf2 (patch)
tree44f72fdf9e422f5e121bba67cffce72c0e541cd3 /include
parent66b30842e86fb6041bd6a453c6e3a877a3c177c1 (diff)
Implement SAL_WNODEPRECATED_DECLARATIONS_[PUSH/POP] on MSVC
Required for --disable-nss build on Windows, which needs the same fix as in commit 71d4abc51b556e147ab53a9a52b15be36fc710a3 (-Werror,-Wdeprecated-declarations (Emscripten), 2024-01-18). Change-Id: I4206cbc0cb80be7ddee1c3f21de50d853828300e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163704 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'include')
-rw-r--r--include/sal/types.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/sal/types.h b/include/sal/types.h
index df160d2eef50..c61956f647d7 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -504,6 +504,12 @@ template< typename T1, typename T2 > inline T1 static_int_cast(T2 n) {
_Pragma(SAL_STRINGIFY_ARG(GCC diagnostic ignored "-Wdeprecated-declarations"))
#define SAL_WNODEPRECATED_DECLARATIONS_POP \
_Pragma(SAL_STRINGIFY_ARG(GCC diagnostic pop))
+#elif defined LIBO_INTERNAL_ONLY && defined _MSC_VER
+#define SAL_WNODEPRECATED_DECLARATIONS_PUSH \
+ _Pragma(SAL_STRINGIFY_ARG(warning(push))) \
+ _Pragma(SAL_STRINGIFY_ARG(warning(disable : 4996)))
+#define SAL_WNODEPRECATED_DECLARATIONS_POP \
+ _Pragma(SAL_STRINGIFY_ARG(warning(pop)))
#else
# define SAL_WNODEPRECATED_DECLARATIONS_PUSH
# define SAL_WNODEPRECATED_DECLARATIONS_POP