core.git: Branch 'distro/cib/libreoffice-6-4' - include/sal

2024-03-08 Thread Michael Stahl (via logerrit)
 include/sal/types.h |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit e969c692dd8705af5894a065674e2461ff514985
Author: Michael Stahl 
AuthorDate: Fri Mar 8 13:40:44 2024 +0100
Commit: Michael Stahl 
CommitDate: Fri Mar 8 13:40:44 2024 +0100

sal: the old MSVC doesn't know _Pragma, only __pragma

Change-Id: I139922d9cfabb3772782589f097234fd33e41809

diff --git a/include/sal/types.h b/include/sal/types.h
index f8a53ae722a5..2e8d5e8ad873 100644
--- a/include/sal/types.h
+++ b/include/sal/types.h
@@ -497,10 +497,10 @@ template< typename T1, typename T2 > inline T1 
static_int_cast(T2 n) {
 _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)))
+__pragma(warning(push)) \
+__pragma(warning(disable : 4996))
 #define SAL_WNODEPRECATED_DECLARATIONS_POP \
-_Pragma(SAL_STRINGIFY_ARG(warning(pop)))
+__pragma(warning(pop))
 #else
 #   define SAL_WNODEPRECATED_DECLARATIONS_PUSH
 #   define SAL_WNODEPRECATED_DECLARATIONS_POP


core.git: Branch 'distro/cib/libreoffice-6-4' - include/sal

2024-03-08 Thread Mike Kaganski (via logerrit)
 include/sal/types.h |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 58e4f56df42417546a5943f7149ad2a2254ba225
Author: Mike Kaganski 
AuthorDate: Wed Feb 21 22:27:37 2024 +0600
Commit: Michael Stahl 
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 
(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