include/sal/types.h |    6 ++++++
 1 file changed, 6 insertions(+)

New commits:
commit 58e4f56df42417546a5943f7149ad2a2254ba225
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Wed Feb 21 22:27:37 2024 +0600
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Fri Mar 8 13:16:39 2024 +0100

    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.kagan...@collabora.com>
    (cherry picked from commit 6329a56f601748f5a8dd6da9f0a90d3e57efcaf2)

diff --git a/include/sal/types.h b/include/sal/types.h
index 1a8ba255b4b7..f8a53ae722a5 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -495,6 +495,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

Reply via email to