tdf#153972 Fix color filter when cells have no content
[LibreOffice.git] / external / nss / clang-cl.patch.0
blobe20aab3b9ff1c0e474e5dc1e12bf8ef67d7411ac
1 # "#pragma deprecated" and "#pragma intrinsic" not (yet?) handled in the "if
2 # (LangOpts.MicrosoftExt)" block in Preprocessor::RegisterBuiltinPragmas in
3 # Clang's lib/Lex/Pragma.cpp:
4 --- nspr/pr/include/pratom.h
5 +++ nspr/pr/include/pratom.h
6 @@ -83,7 +83,7 @@
7  
8  #include <intrin.h>
9  
10 -#ifdef _MSC_VER
11 +#if defined _WIN32 && !defined __clang__
12  #pragma intrinsic(_InterlockedIncrement)
13  #pragma intrinsic(_InterlockedDecrement)
14  #pragma intrinsic(_InterlockedExchange)
15 --- nspr/pr/include/prbit.h
16 +++ nspr/pr/include/prbit.h
17 @@ -15,7 +15,7 @@
18  */
19  #if defined(_WIN32) && (_MSC_VER >= 1300) && \
20      (defined(_M_IX86) || defined(_M_X64) || defined(_M_ARM) || \
21 -     defined(_M_ARM64))
22 +     defined(_M_ARM64)) && !defined __clang__
23  # include <intrin.h>
24  # pragma  intrinsic(_BitScanForward,_BitScanReverse)
25  __forceinline static int __prBitScanForward32(unsigned int val)
26 @@ -33,7 +33,7 @@
27  # define pr_bitscan_ctz32(val)  __prBitScanForward32(val)
28  # define pr_bitscan_clz32(val)  __prBitScanReverse32(val)
29  # define  PR_HAVE_BUILTIN_BITSCAN32
30 -#elif ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) && \
31 +#elif defined __GNUC__ && ((__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)) && \
32         (defined(__i386__) || defined(__x86_64__) || defined(__arm__) || \
33          defined(__aarch64__))
34  # define pr_bitscan_ctz32(val)  __builtin_ctz(val)
35 @@ -138,7 +138,7 @@
36  */
38  #if defined(_MSC_VER) && (defined(_M_IX86) || defined(_M_AMD64) || \
39 -    defined(_M_X64) || defined(_M_ARM) || defined(_M_ARM64))
40 +    defined(_M_X64) || defined(_M_ARM) || defined(_M_ARM64)) && !defined __clang__
41  #include <stdlib.h>
42  #pragma intrinsic(_rotl, _rotr)
43  #define PR_ROTATE_LEFT32(a, bits) _rotl(a, bits)
44 --- nss/lib/certdb/certdb.h
45 +++ nss/lib/certdb/certdb.h
46 @@ -21,7 +21,7 @@
47  /* On Windows, Mac, and Linux (and other gcc platforms), we can give compile
48   * time deprecation warnings when applications use the old CERTDB_VALID_PEER
49   * define */
50 -#if __GNUC__ > 3
51 +#if defined __GNUC__ && __GNUC__ > 3
52  #if (__GNUC__ == 4) && (__GNUC_MINOR__ < 5)
53  typedef unsigned int __CERTDB_VALID_PEER __attribute__((deprecated));
54  #else
55 @@ -30,7 +30,7 @@
56  #endif
57  #define CERTDB_VALID_PEER ((__CERTDB_VALID_PEER)CERTDB_TERMINAL_RECORD)
58  #else
59 -#ifdef _WIN32
60 +#if defined _WIN32 && !defined __clang__
61  #pragma deprecated(CERTDB_VALID_PEER)
62  #endif
63  #define CERTDB_VALID_PEER CERTDB_TERMINAL_RECORD
64 --- nss/lib/freebl/blapit.h
65 +++ nss/lib/freebl/blapit.h
66 @@ -53,7 +53,7 @@
67   * Mark the old defines as deprecated. This will warn code that expected
68   * DSA1 only that they need to change if the are to support DSA2.
69   */
70 -#if defined(__GNUC__) && (__GNUC__ > 3)
71 +#if defined(__GNUC__) && (__GNUC__ > 3) || defined __clang__
72  /* make GCC warn when we use these #defines */
73  typedef int __BLAPI_DEPRECATED __attribute__((deprecated));
74  #define DSA_SUBPRIME_LEN ((__BLAPI_DEPRECATED)DSA1_SUBPRIME_LEN)
75 --- nss/lib/util/pkcs11n.h
76 +++ nss/lib/util/pkcs11n.h
77 @@ -563,7 +563,7 @@
78  /* keep the old value for compatibility reasons*/
79  #define CKT_NSS_MUST_VERIFY ((__CKT_NSS_MUST_VERIFY)(CKT_NSS + 4))
80  #else
81 -#ifdef _WIN32
82 +#if defined _WIN32 && !defined __clang__
83  /* This magic gets the windows compiler to give us a deprecation
84   * warning */
85  #pragma deprecated(CKT_NSS_UNTRUSTED, CKT_NSS_MUST_VERIFY, CKT_NSS_VALID)
87 # While MSVC uses
88 #  #pragma warning(disable : 4103)
89 # in the inner pkcs11p.h, clang-cl wants
90 #  #pragma clang diagnostic ignored "-Wpragma-pack"
91 # in the outer pkcs11t.h:
92 --- nss/lib/util/pkcs11t.h
93 +++ nss/lib/util/pkcs11t.h
94 @@ -78,7 +78,14 @@
95  #define CK_INVALID_HANDLE 0
97  /* pack */
98 +#if defined __clang__ && defined _MSC_VER
99 +#pragma clang diagnostic push
100 +#pragma clang diagnostic ignored "-Wpragma-pack"
101 +#endif
102  #include "pkcs11p.h"
103 +#if defined __clang__ && defined _MSC_VER
104 +#pragma clang diagnostic pop
105 +#endif
107  typedef struct CK_VERSION {
108      CK_BYTE major; /* integer portion of version number */
109 @@ -2586,6 +2593,13 @@
110  #include "pkcs11n.h"
112  /* undo packing */
113 +#if defined __clang__ && defined _MSC_VER
114 +#pragma clang diagnostic push
115 +#pragma clang diagnostic ignored "-Wpragma-pack"
116 +#endif
117  #include "pkcs11u.h"
118 +#if defined __clang__ && defined _MSC_VER
119 +#pragma clang diagnostic pop
120 +#endif
122  #endif