summaryrefslogtreecommitdiff
path: root/vcl/aqua/source/gdi
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2013-03-23 21:55:27 +0100
committerStephan Bergmann <sbergman@redhat.com>2013-03-25 08:52:54 +0100
commitfa545023ada3f2a5f79cab1ff628fd18434c7c2e (patch)
tree7bb5c0f01264f9b53724baa1b0ef7b7e80e23b3d /vcl/aqua/source/gdi
parentc940e3d8b3895c550fb37e0e9acbd19b4bb3515e (diff)
Introduce HAVE_GCC_PRAGMA_DIAGNOSTIC_{MODIFY,SCOPE}
...replacing hard-coded GCC version checks. Those checks that guard #pragma GCC diagnostic ignored "-Wnon-virtual-dtor" appear relevant only for GCC itself, not Clang (which used to fail the old guards because it typically announces itself with a rather low __GNUC__/__GNUC_MINOR__ version), see 6e67c03dc0225fc66343546b14e902b9d238b1a3 "Enable -Wnon-virtual-dtor for GCC 4.6" Change-Id: I6bfa4d5caa6192e7a203ce829682bf6bb8d61a1b
Diffstat (limited to 'vcl/aqua/source/gdi')
-rw-r--r--vcl/aqua/source/gdi/aquaprintaccessoryview.mm10
-rw-r--r--vcl/aqua/source/gdi/atsui/salatslayout.cxx9
-rw-r--r--vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx8
-rw-r--r--vcl/aqua/source/gdi/atsui/salgdi.cxx8
4 files changed, 9 insertions, 26 deletions
diff --git a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
index 67714ba3eabe..8d6f5219eed4 100644
--- a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
+++ b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include "sal/config.h"
#include "tools/resary.hxx"
@@ -1099,15 +1100,10 @@ static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO
// Make deprecation warnings just warnings in a -Werror compilation.
-#if defined LIBO_WERROR && defined __GNUC__
-#define GCC_VERSION (__GNUC__ * 10000 \
- + __GNUC_MINOR__ * 100 \
- + __GNUC_PATCHLEVEL__)
-#if GCC_VERSION >= 40201
+#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY
// #pragma GCC diagnostic push
#pragma GCC diagnostic warning "-Wdeprecated-declarations"
#endif
-#endif
@implementation AquaPrintAccessoryView
+(NSObject*)setupPrinterPanel: (NSPrintOperation*)pOp withController: (vcl::PrinterController*)pController withState: (PrintAccessoryViewState*)pState
@@ -1394,9 +1390,7 @@ static void addEdit( NSView* pCurParent, long& rCurX, long& rCurY, long nAttachO
return pCtrlTarget;
}
-#if defined LIBO_WERROR && defined __GNUC__ && GCC_VERSION >= 40201
// #pragma GCC diagnostic pop
-#endif
@end
diff --git a/vcl/aqua/source/gdi/atsui/salatslayout.cxx b/vcl/aqua/source/gdi/atsui/salatslayout.cxx
index b2f6a04dffad..dbe507afae50 100644
--- a/vcl/aqua/source/gdi/atsui/salatslayout.cxx
+++ b/vcl/aqua/source/gdi/atsui/salatslayout.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#incldue "sal/config.h"
+
#include "tools/debug.hxx"
#include "aqua/saldata.hxx"
@@ -29,14 +31,9 @@
#include <math.h>
// ATSUI is deprecated in 10.6 (or already 10.5?)
-#if defined LIBO_WERROR && defined __GNUC__
-#define GCC_VERSION (__GNUC__ * 10000 \
- + __GNUC_MINOR__ * 100 \
- + __GNUC_PATCHLEVEL__)
-#if GCC_VERSION >= 40201
+#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY
#pragma GCC diagnostic warning "-Wdeprecated-declarations"
#endif
-#endif
// =======================================================================
diff --git a/vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx b/vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx
index 502c33bbd502..1dae840c79b1 100644
--- a/vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx
+++ b/vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include "sal/config.h"
#include <boost/assert.hpp>
#include <vector>
@@ -29,14 +30,9 @@
#include "aqua/atsui/salatsuifontutils.hxx"
// ATSUI is deprecated in 10.6 (or already 10.5?)
-#if defined LIBO_WERROR && defined __GNUC__
-#define GCC_VERSION (__GNUC__ * 10000 \
- + __GNUC_MINOR__ * 100 \
- + __GNUC_PATCHLEVEL__)
-#if GCC_VERSION >= 40201
+#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY
#pragma GCC diagnostic warning "-Wdeprecated-declarations"
#endif
-#endif
// we have to get the font attributes from the name table
// since neither head's macStyle nor OS/2's panose are easily available
diff --git a/vcl/aqua/source/gdi/atsui/salgdi.cxx b/vcl/aqua/source/gdi/atsui/salgdi.cxx
index 9c9eb9d0fe0f..d0594b598098 100644
--- a/vcl/aqua/source/gdi/atsui/salgdi.cxx
+++ b/vcl/aqua/source/gdi/atsui/salgdi.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include "sal/config.h"
#include "osl/file.hxx"
#include "osl/process.h"
@@ -52,14 +53,9 @@ typedef std::vector<unsigned char> ByteVector;
// ATSUI is deprecated in 10.6 (or already 10.5?)
-#if defined LIBO_WERROR && defined __GNUC__
-#define GCC_VERSION (__GNUC__ * 10000 \
- + __GNUC_MINOR__ * 100 \
- + __GNUC_PATCHLEVEL__)
-#if GCC_VERSION >= 40201
+#if HAVE_GCC_PRAGMA_DIAGNOSTIC_MODIFY
#pragma GCC diagnostic warning "-Wdeprecated-declarations"
#endif
-#endif
// =======================================================================