include/sal/types.h | 6 ++++++
1 file changed, 6 insertions(+)
New commits:
commit 975261f9e86d7d78f1b5c13e8c859a734b39678c
Author: Mike Kaganski <[email protected]>
AuthorDate: Wed Feb 21 22:27:37 2024 +0600
Commit: Miklos Vajna <[email protected]>
CommitDate: Mon Mar 18 14:36:56 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 <[email protected]>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/164836
Tested-by: Jenkins CollaboraOffice <[email protected]>
Reviewed-by: Miklos Vajna <[email protected]>
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