[Libreoffice-commits] core.git: 4 commits - config_host/config_global.h.in config_host/config_graphite.h.in config_host/config_mingw.h.in config_host/config_telepathy.h.in config_host/config_vclplug.h.in config_host.mk.in config_host/README configure.ac connectivity/source cui/source desktop/source extensions/source RepositoryExternal.mk sal/inc sal/osl sal/qa sc/source shell/inc solenv/gbuild sw/source vcl/generic vcl/inc vcl/source vcl/unx vcl/win xmlreader/inc

Luboš Luňák l.lunak at suse.cz
Wed Mar 20 03:34:45 PDT 2013


 RepositoryExternal.mk                               |   84 ++++++++++----------
 config_host.mk.in                                   |    1 
 config_host/README                                  |    5 -
 config_host/config_global.h.in                      |   27 ++++++
 config_host/config_graphite.h.in                    |    3 
 config_host/config_mingw.h.in                       |    3 
 config_host/config_telepathy.h.in                   |    3 
 config_host/config_vclplug.h.in                     |   15 +++
 configure.ac                                        |   22 +++++
 connectivity/source/drivers/kab/KDEInit.h           |    2 
 cui/source/options/optgdlg.cxx                      |    8 -
 cui/source/options/optmemory.cxx                    |    2 
 desktop/source/app/app.cxx                          |    6 -
 extensions/source/plugin/inc/plugin/unx/plugcon.hxx |    2 
 extensions/source/plugin/unx/npnapi.cxx             |    8 -
 extensions/source/plugin/unx/npwrap.cxx             |   12 +-
 sal/inc/osl/interlck.h                              |    4 
 sal/inc/rtl/allocator.hxx                           |    2 
 sal/inc/rtl/instance.hxx                            |    8 -
 sal/inc/rtl/strbuf.hxx                              |    6 -
 sal/inc/rtl/string.hxx                              |    4 
 sal/inc/rtl/stringutils.hxx                         |    2 
 sal/inc/rtl/ustrbuf.hxx                             |    4 
 sal/inc/rtl/ustring.hxx                             |    2 
 sal/inc/sal/types.h                                 |    4 
 sal/osl/all/log.cxx                                 |    8 -
 sal/osl/unx/interlck.c                              |    6 -
 sal/osl/unx/salinit.cxx                             |    4 
 sal/qa/rtl/strings/test_ostring_stringliterals.cxx  |    6 -
 sc/source/ui/docshell/docsh.cxx                     |   10 +-
 sc/source/ui/inc/docsh.hxx                          |    6 -
 sc/source/ui/view/cellsh3.cxx                       |    4 
 shell/inc/shell/kde_headers.h                       |    2 
 solenv/gbuild/platform/com_GCC_defs.mk              |    2 
 sw/source/core/text/itrform2.cxx                    |    2 
 vcl/generic/glyphs/gcach_ftyp.cxx                   |   12 +-
 vcl/generic/glyphs/gcach_ftyp.hxx                   |    6 -
 vcl/generic/glyphs/glyphcache.cxx                   |    8 -
 vcl/generic/print/genpspgraphics.cxx                |    8 -
 vcl/inc/generic/glyphcache.hxx                      |    4 
 vcl/inc/win/salgdi.h                                |    8 -
 vcl/source/gdi/outdev3.cxx                          |   14 +--
 vcl/unx/generic/gdi/salgdi.cxx                      |    2 
 vcl/unx/generic/gdi/salgdi3.cxx                     |    4 
 vcl/unx/kde/FPServiceInfo.hxx                       |    2 
 vcl/unx/kde/UnxFilePicker.cxx                       |    4 
 vcl/unx/kde/fpicker/kdecommandthread.cxx            |    2 
 vcl/unx/kde/fpicker/kdecommandthread.hxx            |    4 
 vcl/unx/kde/fpicker/kdefilepicker.cxx               |    8 -
 vcl/unx/kde/fpicker/kdefilepicker.hxx               |    8 -
 vcl/unx/kde/fpicker/kdefpmain.cxx                   |    6 -
 vcl/unx/kde/fpicker/kdemodalityfilter.cxx           |    2 
 vcl/unx/kde/fpicker/kdemodalityfilter.hxx           |    4 
 vcl/unx/kde/kdedata.cxx                             |    2 
 vcl/unx/kde/salnativewidgets-kde.cxx                |    2 
 vcl/win/source/gdi/salgdi3.cxx                      |   12 +-
 vcl/win/source/gdi/winlayout.cxx                    |   12 +-
 xmlreader/inc/xmlreader/span.hxx                    |    2 
 58 files changed, 250 insertions(+), 175 deletions(-)

New commits:
commit c60b6c7665220b4383a4851708cfa74f9c2a6fcb
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Mon Mar 18 16:51:18 2013 +0100

    add -Wundef to compiler flags
    
    http://lists.freedesktop.org/archives/libreoffice/2013-March/047769.html
    
    Change-Id: I61ab4b6b536e77d153f44b9f8569b49e0be60002

diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index a691e27..d20b9f7 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -66,6 +66,7 @@ gb_CFLAGS_COMMON := \
 	-Wall \
 	-Wendif-labels \
 	-Wextra \
+	-Wundef \
 	-fmessage-length=0 \
 	-fno-common \
 	-pipe \
@@ -74,6 +75,7 @@ gb_CXXFLAGS_COMMON := \
 	-Wall \
 	-Wendif-labels \
 	-Wextra \
+	-Wundef \
 	-fmessage-length=0 \
 	-fno-common \
 	-pipe \
commit 52f8321c412cad280c9029f10f9aef03f4f20544
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Tue Mar 19 16:44:12 2013 +0100

    use #if instead of #ifdef for testing config_xxx.hxx macros
    
    http://lists.freedesktop.org/archives/libreoffice/2013-March/047769.html
    
    Change-Id: I81ed4500878ff3193e028410a1f0205e28d17fc3

diff --git a/config_host/config_global.h.in b/config_host/config_global.h.in
index 5e7150b..87033db 100644
--- a/config_host/config_global.h.in
+++ b/config_host/config_global.h.in
@@ -13,11 +13,38 @@ Any change in this header will cause a rebuild of almost everything.
 #define CONFIG_GLOBAL_H
 
 #undef HAVE_CXX11_DELETE
+#ifndef HAVE_CXX11_DELETE
+#define HAVE_CXX11_DELETE 0
+#endif
+
 #undef HAVE_CXX11_OVERRIDE
+#ifndef HAVE_CXX11_OVERRIDE
+#define HAVE_CXX11_OVERRIDE 0
+#endif
+
 #undef HAVE_CXX11_PERFECT_FORWARDING
+#ifndef HAVE_CXX11_PERFECT_FORWARDING
+#define HAVE_CXX11_PERFECT_FORWARDING 0
+#endif
+
 #undef HAVE_GCC_BUILTIN_ATOMIC
+#ifndef HAVE_GCC_BUILTIN_ATOMIC
+#define HAVE_GCC_BUILTIN_ATOMIC 0
+#endif
+
 #undef HAVE_SFINAE_ANONYMOUS_BROKEN
+#ifndef HAVE_SFINAE_ANONYMOUS_BROKEN
+#define HAVE_SFINAE_ANONYMOUS_BROKEN 0
+#endif
+
 #undef HAVE_THREADSAFE_STATICS
+#ifndef HAVE_THREADSAFE_STATICS
+#define HAVE_THREADSAFE_STATICS 0
+#endif
+
 #undef HAVE_SYSLOG_H
+#ifndef HAVE_SYSLOG_H
+#define HAVE_SYSLOG_H 0
+#endif
 
 #endif
diff --git a/config_host/config_graphite.h.in b/config_host/config_graphite.h.in
index eb7a7b3..2822abf 100644
--- a/config_host/config_graphite.h.in
+++ b/config_host/config_graphite.h.in
@@ -2,5 +2,8 @@
 #define CONFIG_GRAPHITE_H
 
 #undef ENABLE_GRAPHITE
+#ifndef ENABLE_GRAPHITE
+#define ENABLE_GRAPHITE 0
+#endif
 
 #endif
diff --git a/config_host/config_mingw.h.in b/config_host/config_mingw.h.in
index 5a05025..3747b7a 100644
--- a/config_host/config_mingw.h.in
+++ b/config_host/config_mingw.h.in
@@ -2,5 +2,8 @@
 #define CONFIG_MINGW
 
 #undef HAVE_FMERGENEUTRALITEMS
+#ifndef HAVE_FMERGENEUTRALITEMS
+#define HAVE_FMERGENEUTRALITEMS 0
+#endif
 
 #endif
diff --git a/config_host/config_telepathy.h.in b/config_host/config_telepathy.h.in
index f8752b5..22bdc15 100644
--- a/config_host/config_telepathy.h.in
+++ b/config_host/config_telepathy.h.in
@@ -2,5 +2,8 @@
 #define CONFIG_TELEPATHY
 
 #undef ENABLE_TELEPATHY
+#ifndef ENABLE_TELEPATHY
+#define ENABLE_TELEPATHY 0
+#endif
 
 #endif
diff --git a/config_host/config_vclplug.h.in b/config_host/config_vclplug.h.in
index 46c6bd1..9088a85 100644
--- a/config_host/config_vclplug.h.in
+++ b/config_host/config_vclplug.h.in
@@ -8,8 +8,23 @@ Settings about which X11 desktops have support enabled.
 #define CONFIG_VCLPLUG_H
 
 #undef ENABLE_GTK
+#ifndef ENABLE_GTK
+#define ENABLE_GTK 0
+#endif
+
 #undef ENABLE_KDE
+#ifndef ENABLE_KDE
+#define ENABLE_KDE 0
+#endif
+
 #undef ENABLE_KDE4
+#ifndef ENABLE_KDE4
+#define ENABLE_KDE4 0
+#endif
+
 #undef ENABLE_TDE
+#ifndef ENABLE_TDE
+#define ENABLE_TDE 0
+#endif
 
 #endif
diff --git a/connectivity/source/drivers/kab/KDEInit.h b/connectivity/source/drivers/kab/KDEInit.h
index 2f59b73..9be69bb 100644
--- a/connectivity/source/drivers/kab/KDEInit.h
+++ b/connectivity/source/drivers/kab/KDEInit.h
@@ -27,7 +27,7 @@
 
 #include <config_vclplug.h>
 
-#ifdef ENABLE_TDE
+#if ENABLE_TDE
 
 // the minimum TDE version which is required at runtime
 #define MIN_KDE_VERSION_MAJOR   14
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 9793bb4..fd1ffcd 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -117,7 +117,7 @@ namespace
 
             if ( rDesktopEnvironment.equalsIgnoreAsciiCase("kde4") )
             {
-                #ifdef ENABLE_KDE4
+                #if ENABLE_KDE4
                 return OUString("com.sun.star.ui.dialogs.KDE4FilePicker" );
                 #else
                 return OUString();
@@ -125,7 +125,7 @@ namespace
             }
             else if ( rDesktopEnvironment.equalsIgnoreAsciiCase("kde") )
             {
-                #ifdef ENABLE_KDE
+                #if ENABLE_KDE
                 return OUString("com.sun.star.ui.dialogs.KDEFilePicker");
                 #else
                 return OUString();
@@ -133,7 +133,7 @@ namespace
             }
             else if ( rDesktopEnvironment.equalsIgnoreAsciiCase("tde") )
             {
-                #ifdef ENABLE_TDE
+                #if ENABLE_TDE
                 return OUString("com.sun.star.ui.dialogs.TDEFilePicker");
                 #else
                 return OUString();
@@ -191,7 +191,7 @@ OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet)
     get(m_pHelpAgentResetBtn, "resethelpagent");
     if (!lcl_HasSystemFilePicker())
         get<VclContainer>("filedlgframe")->Hide();
-#if !defined(MACOSX) && !defined(ENABLE_GTK)
+#if !defined(MACOSX) && ! ENABLE_GTK
     get<VclContainer>("printdlgframe")->Hide();
 #endif
     get(m_pFileDlgCB, "filedlg");
diff --git a/cui/source/options/optmemory.cxx b/cui/source/options/optmemory.cxx
index 506372f..9e8976d 100644
--- a/cui/source/options/optmemory.cxx
+++ b/cui/source/options/optmemory.cxx
@@ -129,7 +129,7 @@ OfaMemoryOptionsPage::OfaMemoryOptionsPage(Window* pParent, const SfxItemSet& rS
     m_pQuickLaunchCB->Show();
 
     //Only available in Win or if building the gtk systray
-#if !defined(WNT) && !defined(ENABLE_GTK)
+#if !defined(WNT) && ! ENABLE_GTK
     m_pQuickStarterFrame->Hide();
 #endif
 
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index eeca5a7..d3e7b26 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -103,7 +103,7 @@
 
 #include <config_telepathy.h>
 
-#ifdef ENABLE_TELEPATHY
+#if ENABLE_TELEPATHY
 #include <tubes/manager.hxx>
 #endif
 
@@ -555,7 +555,7 @@ Desktop::Desktop()
 
 Desktop::~Desktop()
 {
-#ifdef ENABLE_TELEPATHY
+#if ENABLE_TELEPATHY
     TeleManager::finalize();
 #endif
 }
@@ -1619,7 +1619,7 @@ int Desktop::Main()
     aOptions.SetVCLSettings();
     SetSplashScreenProgress(60);
 
-#ifdef ENABLE_TELEPATHY
+#if ENABLE_TELEPATHY
     bool bListen = rCmdLineArgs.IsInvisible();
     TeleManager::init( bListen );
 #endif
diff --git a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx
index cdb8b39..cc27cc2 100644
--- a/extensions/source/plugin/inc/plugin/unx/plugcon.hxx
+++ b/extensions/source/plugin/inc/plugin/unx/plugcon.hxx
@@ -94,7 +94,7 @@ extern "C" {
 
 #include <config_vclplug.h>
 
-#ifdef ENABLE_GTK
+#if ENABLE_GTK
 #include <gtk/gtk.h>
 #include <gdk/gdkx.h>
 #else
diff --git a/extensions/source/plugin/unx/npnapi.cxx b/extensions/source/plugin/unx/npnapi.cxx
index 90b82bc..09fea92 100644
--- a/extensions/source/plugin/unx/npnapi.cxx
+++ b/extensions/source/plugin/unx/npnapi.cxx
@@ -410,7 +410,7 @@ static NPError l_NPN_GetValue( NPP, NPNVariable variable, void* value )
             SAL_INFO("extensions.plugin", "xembed requested");
             break;
         case NPNVToolkit:
-#           ifdef ENABLE_GTK
+#           if ENABLE_GTK
             *(int*)value = NPNVGtk2;
 #           else
             *(int*)value = 0;
@@ -589,7 +589,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
                              "0000", 4,
                              NULL );
 
-                #ifdef ENABLE_GTK
+                #if ENABLE_GTK
                 if( pInst->pGtkWindow )
                     g_object_unref( G_OBJECT(pInst->pGtkWindow) );
                 if( pInst->pGtkWidget )
@@ -675,7 +675,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
                         "   \"" << pInst->argn[i] << "\"=\"" << pInst->argv[i]
                             << "\"");
 
-                #ifdef ENABLE_GTK
+                #if ENABLE_GTK
                 // check if XEMBED is to be used
                 // ask for Bool. there seems to be no clear definition whether the
                 // return value should be an int or unsigned char
@@ -712,7 +712,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
                 if( pWindow->height < 1 )
                     pWindow->height = 1;
 
-                #ifdef ENABLE_GTK
+                #if ENABLE_GTK
                 if( pInst->bShouldUseXEmbed )
                 {
                     if( ! pInst->pGtkWidget )
diff --git a/extensions/source/plugin/unx/npwrap.cxx b/extensions/source/plugin/unx/npwrap.cxx
index 64798ac..a5c800f 100644
--- a/extensions/source/plugin/unx/npwrap.cxx
+++ b/extensions/source/plugin/unx/npwrap.cxx
@@ -79,7 +79,7 @@ extern "C"
         return 0;
     }
 
-    #ifndef ENABLE_GTK
+    #if ! ENABLE_GTK
     static void ThreadEventHandler( XtPointer /*client_data*/, int* /*source*/, XtInputId* id )
     {
         char buf[256];
@@ -231,7 +231,7 @@ static void signal_handler( int nSig )
     _exit(nSig);
 }
 
-#ifdef ENABLE_GTK
+#if ENABLE_GTK
 
 static gboolean noClosure( gpointer )
 {
@@ -393,7 +393,7 @@ int main( int argc, char **argv)
     }
     int nSocket = atol( argv[1] );
 
-    #ifdef ENABLE_GTK
+    #if ENABLE_GTK
     g_thread_init(NULL);
     gtk_init(&argc, &argv);
     #endif
@@ -408,7 +408,7 @@ int main( int argc, char **argv)
     pXtAppDisplay = XtOpenDisplay( app_context, NULL, "SOPlugin", "SOPlugin", NULL, 0, &argc, argv );
 
 
-    #ifdef ENABLE_GTK
+    #if ENABLE_GTK
     // integrate Xt events into GTK event loop
     GPollFD aXtPollDesc, aWakeupPollDesc;
 
@@ -481,7 +481,7 @@ int main( int argc, char **argv)
     // of XtAppMainLoop
     do
     {
-        #ifdef ENABLE_GTK
+        #if ENABLE_GTK
         g_main_context_iteration( NULL, sal_True );
         #else
         XtAppProcessEvent( app_context, XtIMAll );
@@ -490,7 +490,7 @@ int main( int argc, char **argv)
 
     SAL_INFO("extensions.plugin", "left plugin app main loop");
 
-    #ifdef ENABLE_GTK
+    #if ENABLE_GTK
     g_source_remove(xt_polling_timer_id);
     #endif
 
diff --git a/sal/inc/osl/interlck.h b/sal/inc/osl/interlck.h
index 507b752..31212de 100644
--- a/sal/inc/osl/interlck.h
+++ b/sal/inc/osl/interlck.h
@@ -56,7 +56,7 @@ SAL_DLLPUBLIC oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInte
 
     @since LibreOffice 4.0
 */
-#if defined( HAVE_GCC_BUILTIN_ATOMIC )
+#if HAVE_GCC_BUILTIN_ATOMIC
 #    define osl_atomic_increment(p)  __sync_add_and_fetch((p), 1)
 #else
 #    define osl_atomic_increment(p) osl_incrementInterlockedCount((p))
@@ -73,7 +73,7 @@ SAL_DLLPUBLIC oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInte
 
     @since LibreOffice 4.0
 */
-#if defined( HAVE_GCC_BUILTIN_ATOMIC )
+#if HAVE_GCC_BUILTIN_ATOMIC
 #    define osl_atomic_decrement(p) __sync_sub_and_fetch((p), 1)
 #else
 #    define osl_atomic_decrement(p) osl_decrementInterlockedCount((p))
diff --git a/sal/inc/rtl/allocator.hxx b/sal/inc/rtl/allocator.hxx
index 9ceb3b7..2cbf95b 100644
--- a/sal/inc/rtl/allocator.hxx
+++ b/sal/inc/rtl/allocator.hxx
@@ -129,7 +129,7 @@ public:
     }
 
     //-----------------------------------------
-#if defined HAVE_CXX11_PERFECT_FORWARDING
+#if HAVE_CXX11_PERFECT_FORWARDING
     template< typename... Args >
     void construct (pointer p, Args &&... value)
     {
diff --git a/sal/inc/rtl/instance.hxx b/sal/inc/rtl/instance.hxx
index 1336c13..912a3d4 100644
--- a/sal/inc/rtl/instance.hxx
+++ b/sal/inc/rtl/instance.hxx
@@ -381,7 +381,7 @@ namespace rtl {
               using the outer class
               (the one that derives from this base class)
 */
-#if defined HAVE_THREADSAFE_STATICS
+#if HAVE_THREADSAFE_STATICS
 template<typename T, typename Unique>
 class Static {
 public:
@@ -441,7 +441,7 @@ private:
               using the outer class
               (the one that derives from this base class)
 */
-#if defined HAVE_THREADSAFE_STATICS
+#if HAVE_THREADSAFE_STATICS
 template<typename T, typename Data, typename Unique>
 class StaticWithArg {
 public:
@@ -523,7 +523,7 @@ private:
     @tparam InitAggregate
               initializer functor class
 */
-#if defined HAVE_THREADSAFE_STATICS
+#if HAVE_THREADSAFE_STATICS
 template<typename T, typename InitAggregate>
 class StaticAggregate {
 public:
@@ -588,7 +588,7 @@ public:
               Initializer functor's return type.
               Default is T (common practice).
 */
-#if defined HAVE_THREADSAFE_STATICS
+#if HAVE_THREADSAFE_STATICS
 template<typename T, typename InitData,
          typename Unique = InitData, typename Data = T>
 class StaticWithInit {
diff --git a/sal/inc/rtl/strbuf.hxx b/sal/inc/rtl/strbuf.hxx
index b5d746e..4dabc76 100644
--- a/sal/inc/rtl/strbuf.hxx
+++ b/sal/inc/rtl/strbuf.hxx
@@ -154,7 +154,7 @@ public:
         @overload
         @since LibreOffice 3.6
      */
-#ifdef HAVE_SFINAE_ANONYMOUS_BROKEN // see the OString ctors
+#if HAVE_SFINAE_ANONYMOUS_BROKEN // see the OString ctors
     OStringBuffer( const char* value )
         : pData(NULL)
     {
@@ -454,7 +454,7 @@ public:
         @param   str   the characters to be appended.
         @return  this string buffer.
      */
-#ifdef HAVE_SFINAE_ANONYMOUS_BROKEN
+#if HAVE_SFINAE_ANONYMOUS_BROKEN
     OStringBuffer & append( const sal_Char * str )
     {
         return append( str, rtl_str_getLength( str ) );
@@ -665,7 +665,7 @@ public:
         @param      str      a character array.
         @return     this string buffer.
      */
-#ifdef HAVE_SFINAE_ANONYMOUS_BROKEN
+#if HAVE_SFINAE_ANONYMOUS_BROKEN
     OStringBuffer & insert( sal_Int32 offset, const sal_Char * str )
     {
         return insert( offset, str, rtl_str_getLength( str ) );
diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx
index 9233823..cbb8cd5 100644
--- a/sal/inc/rtl/string.hxx
+++ b/sal/inc/rtl/string.hxx
@@ -165,7 +165,7 @@ public:
 
       @param    value       a NULL-terminated character array.
     */
-#ifdef HAVE_SFINAE_ANONYMOUS_BROKEN
+#if HAVE_SFINAE_ANONYMOUS_BROKEN
     // Old gcc can try to convert anonymous enums to OString and give compile error.
     // So there's no special-cased handling of string literals.
     // These are inline functions and technically both variants should work
@@ -535,7 +535,7 @@ public:
       @return   sal_True if the strings are equal;
                 sal_False, otherwise.
     */
-#ifdef HAVE_SFINAE_ANONYMOUS_BROKEN
+#if HAVE_SFINAE_ANONYMOUS_BROKEN
     sal_Bool equalsIgnoreAsciiCase( const sal_Char * asciiStr ) const SAL_THROW(())
     {
         return rtl_str_compareIgnoreAsciiCase( pData->buffer, asciiStr ) == 0;
diff --git a/sal/inc/rtl/stringutils.hxx b/sal/inc/rtl/stringutils.hxx
index 4a4d24b..765319d 100644
--- a/sal/inc/rtl/stringutils.hxx
+++ b/sal/inc/rtl/stringutils.hxx
@@ -38,7 +38,7 @@
 // Manually defining RTL_DISABLE_FAST_STRING allows to force turning fast string concatenation off
 // (e.g. for debugging).
 #ifndef RTL_DISABLE_FAST_STRING
-#ifndef HAVE_SFINAE_ANONYMOUS_BROKEN
+#if ! HAVE_SFINAE_ANONYMOUS_BROKEN
 // This feature is not part of public API and is meant to be used only internally by LibreOffice.
 #ifdef LIBO_INTERNAL_ONLY
 // Enable fast string concatenation.
diff --git a/sal/inc/rtl/ustrbuf.hxx b/sal/inc/rtl/ustrbuf.hxx
index 5743800..95993fc 100644
--- a/sal/inc/rtl/ustrbuf.hxx
+++ b/sal/inc/rtl/ustrbuf.hxx
@@ -146,7 +146,7 @@ public:
         rtl_uStringbuffer_newFromStr_WithLength( &pData, value.getStr(), value.getLength() );
     }
 
-#ifdef HAVE_SFINAE_ANONYMOUS_BROKEN // see OUString ctors
+#if HAVE_SFINAE_ANONYMOUS_BROKEN // see OUString ctors
     template< int N >
     OUStringBuffer( const char (&literal)[ N ] )
         : pData(NULL)
@@ -588,7 +588,7 @@ public:
         sal_Unicode sz[RTL_USTR_MAX_VALUEOFBOOLEAN];
         return append( sz, rtl_ustr_valueOfBoolean( sz, b ) );
     }
-#ifndef HAVE_SFINAE_ANONYMOUS_BROKEN
+#if ! HAVE_SFINAE_ANONYMOUS_BROKEN
     // Pointer can be automatically converted to bool, which is unwanted here.
     // Explicitly delete all pointer append() overloads to prevent this
     // (except for char* and sal_Unicode* overloads, which are handled elsewhere).
diff --git a/sal/inc/rtl/ustring.hxx b/sal/inc/rtl/ustring.hxx
index 848810c..ae0af9e 100644
--- a/sal/inc/rtl/ustring.hxx
+++ b/sal/inc/rtl/ustring.hxx
@@ -193,7 +193,7 @@ public:
 
       @since LibreOffice 3.6
     */
-#ifdef HAVE_SFINAE_ANONYMOUS_BROKEN
+#if HAVE_SFINAE_ANONYMOUS_BROKEN
     // Old gcc can try to convert anonymous enums to OUString and give compile error.
     // So instead have a variant for const and non-const char[].
     template< int N >
diff --git a/sal/inc/sal/types.h b/sal/inc/sal/types.h
index fa72798..b89b056 100644
--- a/sal/inc/sal/types.h
+++ b/sal/inc/sal/types.h
@@ -394,7 +394,7 @@ namespace css = ::com::sun::star;
 
     @since LibreOffice 4.1
 */
-#if defined HAVE_CXX11_DELETE
+#if HAVE_CXX11_DELETE
 #define SAL_DELETED_FUNCTION = delete
 #else
 #define SAL_DELETED_FUNCTION
@@ -407,7 +407,7 @@ namespace css = ::com::sun::star;
 
     @since LibreOffice 4.1
 */
-#if defined HAVE_CXX11_OVERRIDE
+#if HAVE_CXX11_OVERRIDE
 #define SAL_OVERRIDE override
 #else
 #define SAL_OVERRIDE
diff --git a/sal/osl/all/log.cxx b/sal/osl/all/log.cxx
index fcf0a17..baedeb8 100644
--- a/sal/osl/all/log.cxx
+++ b/sal/osl/all/log.cxx
@@ -56,7 +56,7 @@
 #define OSL_DETAIL_GETPID getpid()
 #endif
 
-#ifdef HAVE_SYSLOG_H
+#if HAVE_SYSLOG_H
 #include <syslog.h>
 // sal/osl/unx/salinit.cxx::sal_detail_initialize updates this:
 bool sal_use_syslog;
@@ -123,7 +123,7 @@ char const * getEnvironmentVariable() {
 
 #endif
 
-#ifdef HAVE_SYSLOG_H
+#if HAVE_SYSLOG_H
 int toSyslogPriority(sal_detail_LogLevel level) {
     switch (level) {
     default:
@@ -214,7 +214,7 @@ void log(
 {
     std::ostringstream s;
 #ifndef ANDROID
-#ifdef HAVE_SYSLOG_H
+#if HAVE_SYSLOG_H
     if (!sal_use_syslog)
 #endif
         s << toString(level) << ':';
@@ -254,7 +254,7 @@ void log(
         area = "LibreOffice";
     __android_log_print(android_log_level, area, "%s", s.str().c_str());
 #else
-#ifdef HAVE_SYSLOG_H
+#if HAVE_SYSLOG_H
     if (sal_use_syslog)
         syslog(toSyslogPriority(level), "%s", s.str().c_str());
     else
diff --git a/sal/osl/unx/interlck.c b/sal/osl/unx/interlck.c
index d05827e..24d5b70 100644
--- a/sal/osl/unx/interlck.c
+++ b/sal/osl/unx/interlck.c
@@ -49,7 +49,7 @@ oslInterlockedCount SAL_CALL osl_incrementInterlockedCount(oslInterlockedCount*
         :   "memory");
         return ++nCount;
     }
-#if defined( HAVE_GCC_BUILTIN_ATOMIC )
+#if HAVE_GCC_BUILTIN_ATOMIC
     else
         return __sync_add_and_fetch (pCount, 1);
 #else
@@ -79,7 +79,7 @@ oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInterlockedCount*
         :   "memory");
         return --nCount;
     }
-#if defined( HAVE_GCC_BUILTIN_ATOMIC )
+#if HAVE_GCC_BUILTIN_ATOMIC
     else
         return __sync_sub_and_fetch (pCount, 1);
 #else
@@ -96,7 +96,7 @@ oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInterlockedCount*
     }
 #endif
 }
-#elif defined( HAVE_GCC_BUILTIN_ATOMIC )
+#elif HAVE_GCC_BUILTIN_ATOMIC
 oslInterlockedCount SAL_CALL osl_incrementInterlockedCount(oslInterlockedCount* pCount)
 {
     return __sync_add_and_fetch(pCount, 1);
diff --git a/sal/osl/unx/salinit.cxx b/sal/osl/unx/salinit.cxx
index 49fddea..327ca0e 100644
--- a/sal/osl/unx/salinit.cxx
+++ b/sal/osl/unx/salinit.cxx
@@ -29,7 +29,7 @@
 #include "sal/main.h"
 #include "sal/types.h"
 
-#ifdef HAVE_SYSLOG_H
+#if HAVE_SYSLOG_H
 #include <string.h>
 #include <syslog.h>
 // from sal/osl/all/log.cxx:
@@ -64,7 +64,7 @@ void sal_detail_initialize(int argc, char ** argv) {
         close(fd);
     }
 #endif
-#ifdef HAVE_SYSLOG_H
+#if HAVE_SYSLOG_H
     const char *use_syslog = getenv("SAL_LOG_SYSLOG");
     sal_use_syslog = use_syslog != NULL && !strcmp(use_syslog, "1");
     if (sal_use_syslog)
diff --git a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
index 1c12684..0fcbb84 100644
--- a/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
+++ b/sal/qa/rtl/strings/test_ostring_stringliterals.cxx
@@ -77,7 +77,7 @@ CPPUNIT_TEST_SUITE_END();
 void test::ostring::StringLiterals::checkCtors()
 {
 // string literal ctors do not work with SFINAE broken and are disabled
-#ifndef HAVE_SFINAE_ANONYMOUS_BROKEN
+#if ! HAVE_SFINAE_ANONYMOUS_BROKEN
     bool result_tmp;
     CPPUNIT_ASSERT( CONST_CTOR_USED( "test" ));
     const char good1[] = "test";
@@ -159,7 +159,7 @@ void test::ostring::StringLiterals::checkUsage()
     rtl_string_unittest_const_literal_function = false;
     CPPUNIT_ASSERT_EQUAL( foo, rtl::OString() = "foo" );
     CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true );
-#ifndef HAVE_SFINAE_ANONYMOUS_BROKEN
+#if ! HAVE_SFINAE_ANONYMOUS_BROKEN
     rtl_string_unittest_const_literal_function = false;
     CPPUNIT_ASSERT( FoO.equalsIgnoreAsciiCase( "fOo" ));
     CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true );
@@ -264,7 +264,7 @@ void test::ostring::StringLiterals::checkNonConstUsage()
 void test::ostring::StringLiterals::checkBuffer()
 {
     rtl::OStringBuffer buf;
-#ifndef HAVE_SFINAE_ANONYMOUS_BROKEN
+#if ! HAVE_SFINAE_ANONYMOUS_BROKEN
     rtl_string_unittest_const_literal_function = false;
     buf.append( "foo" );
     CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true );
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 67ae652..deea859 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -121,7 +121,7 @@
 
 #include <config_telepathy.h>
 
-#ifdef ENABLE_TELEPATHY
+#if ENABLE_TELEPATHY
 #include "sccollaboration.hxx"
 #endif
 
@@ -2556,7 +2556,7 @@ sal_Bool ScDocShell::HasAutomaticTableName( const String& rFilter )
         || rFilter.EqualsAscii( pFilterRtf );
 }
 
-#ifndef ENABLE_TELEPATHY
+#if ! ENABLE_TELEPATHY
 ScDocFunc *ScDocShell::CreateDocFunc()
 {
     return new ScDocFuncDirect( *this );
@@ -2592,7 +2592,7 @@ ScDocShell::ScDocShell( const ScDocShell& rShell ) :
     pSolverSaveData ( NULL ),
     pSheetSaveData  ( NULL ),
     pModificator    ( NULL )
-#ifdef ENABLE_TELEPATHY
+#if ENABLE_TELEPATHY
     , mpCollaboration( new ScCollaboration( this ) )
 #endif
 {
@@ -2641,7 +2641,7 @@ ScDocShell::ScDocShell( const sal_uInt64 i_nSfxCreationFlags ) :
     pSolverSaveData ( NULL ),
     pSheetSaveData  ( NULL ),
     pModificator    ( NULL )
-#ifdef ENABLE_TELEPATHY
+#if ENABLE_TELEPATHY
     , mpCollaboration( new ScCollaboration( this ) )
 #endif
 {
@@ -2702,7 +2702,7 @@ ScDocShell::~ScDocShell()
         OSL_FAIL("The Modificator should not exist");
         delete pModificator;
     }
-#ifdef ENABLE_TELEPATHY
+#if ENABLE_TELEPATHY
     delete mpCollaboration;
 #endif
 }
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 55054f8..a18f127 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -63,7 +63,7 @@ class ScOptSolverSave;
 class ScSheetSaveData;
 class ScFlatBoolRowSegments;
 struct ScColWidthParam;
-#ifdef ENABLE_TELEPATHY
+#if ENABLE_TELEPATHY
 class ScCollaboration;
 #endif
 
@@ -111,7 +111,7 @@ class SC_DLLPUBLIC ScDocShell: public SfxObjectShell, public SfxListener
     ScSheetSaveData*    pSheetSaveData;
 
     ScDocShellModificator* pModificator; // #109979#; is used to load XML (created in BeforeXMLLoading and destroyed in AfterXMLLoading)
-#ifdef ENABLE_TELEPATHY
+#if ENABLE_TELEPATHY
     ScCollaboration*      mpCollaboration;
 #endif
 
@@ -180,7 +180,7 @@ public:
     using SfxShell::Activate;           // with sal_Bool bMDI
     using SfxShell::Deactivate;         // with sal_Bool bMDI
 
-#ifdef ENABLE_TELEPATHY
+#if ENABLE_TELEPATHY
     SC_DLLPRIVATE ScCollaboration* GetCollaboration();
 #endif
     virtual void    Activate();
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 4d16931..4e40e4f 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -45,7 +45,7 @@
 
 #include <config_telepathy.h>
 
-#ifdef ENABLE_TELEPATHY
+#if ENABLE_TELEPATHY
 #include "sccollaboration.hxx"
 #endif
 
@@ -106,7 +106,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
             break;
 
         case SID_COLLABORATION:
-#ifdef ENABLE_TELEPATHY
+#if ENABLE_TELEPATHY
             GetViewData()->GetDocShell()->GetCollaboration()->DisplayContacts();
 #endif
             break;
diff --git a/shell/inc/shell/kde_headers.h b/shell/inc/shell/kde_headers.h
index 161e1ff..3ca3fa6 100644
--- a/shell/inc/shell/kde_headers.h
+++ b/shell/inc/shell/kde_headers.h
@@ -22,7 +22,7 @@
 
 #include <config_vclplug.h>
 
-#ifdef ENABLE_TDE
+#if ENABLE_TDE
 
 #include "shell/tde_headers.h"
 
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 04cb5a3..0e53b21 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -2620,7 +2620,7 @@ namespace {
             nReformat -= 2;
 
     #ifndef MACOSX
-    #ifndef ENABLE_GRAPHITE
+    #if ! ENABLE_GRAPHITE
             // #i28795#, #i34607#, #i38388#
             // step back six(!) more characters for complex scripts
             // this is required e.g., for Khmer (thank you, Javier!)
diff --git a/vcl/generic/glyphs/gcach_ftyp.cxx b/vcl/generic/glyphs/gcach_ftyp.cxx
index aac8088..17e089f 100644
--- a/vcl/generic/glyphs/gcach_ftyp.cxx
+++ b/vcl/generic/glyphs/gcach_ftyp.cxx
@@ -29,7 +29,7 @@
 #include <outfont.hxx>
 #include <impfont.hxx>
 #include <config_graphite.h>
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
 #include <graphite2/Font.h>
 #include <graphite_layout.hxx>
 #endif
@@ -269,7 +269,7 @@ void FtFontFile::Unmap()
     mpFileMap = NULL;
 }
 
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
 // wrap FtFontInfo's table function
 const void * graphiteFontTable(const void* appFaceHandle, unsigned int name, size_t *len)
 {
@@ -307,7 +307,7 @@ FtFontInfo::FtFontInfo( const ImplDevFontAttributes& rDevFontAttributes,
     mnFaceNum( nFaceNum ),
     mnRefCount( 0 ),
     mnSynthetic( nSynthetic ),
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
     mbCheckedGraphite(false),
     mpGraphiteFace(NULL),
 #endif
@@ -336,7 +336,7 @@ FtFontInfo::~FtFontInfo()
     delete mpExtraKernInfo;
     delete mpChar2Glyph;
     delete mpGlyph2Char;
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
     delete mpGraphiteFace;
 #endif
 }
@@ -367,7 +367,7 @@ FT_FaceRec_* FtFontInfo::GetFaceFT()
    return maFaceFT;
 }
 
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
 GraphiteFaceWrapper * FtFontInfo::GetGraphiteFace()
 {
     if (mbCheckedGraphite)
@@ -2574,7 +2574,7 @@ const unsigned char* ServerFont::GetTable(const char* pName, sal_uLong* pLength)
     return mpFontInfo->GetTable( pName, pLength );
 }
 
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
 GraphiteFaceWrapper* ServerFont::GetGraphiteFace() const
 {
     return mpFontInfo->GetGraphiteFace();
diff --git a/vcl/generic/glyphs/gcach_ftyp.hxx b/vcl/generic/glyphs/gcach_ftyp.hxx
index 9d677e1..dea75b3 100644
--- a/vcl/generic/glyphs/gcach_ftyp.hxx
+++ b/vcl/generic/glyphs/gcach_ftyp.hxx
@@ -25,7 +25,7 @@
 #include <rtl/textcvt.h>
 
 #include <config_graphite.h>
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
 class GraphiteFaceWrapper;
 #endif
 
@@ -72,7 +72,7 @@ public:
     const unsigned char*  GetTable( const char*, sal_uLong* pLength=0 ) const;
 
     FT_FaceRec_*          GetFaceFT();
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
     GraphiteFaceWrapper*  GetGraphiteFace();
 #endif
     void                  ReleaseFaceFT( FT_FaceRec_* );
@@ -101,7 +101,7 @@ private:
     const int       mnFaceNum;
     int             mnRefCount;
     const int       mnSynthetic;
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
     bool            mbCheckedGraphite;
     GraphiteFaceWrapper * mpGraphiteFace;
 #endif
diff --git a/vcl/generic/glyphs/glyphcache.cxx b/vcl/generic/glyphs/glyphcache.cxx
index bc9fb09..3ceb724 100644
--- a/vcl/generic/glyphs/glyphcache.cxx
+++ b/vcl/generic/glyphs/glyphcache.cxx
@@ -28,7 +28,7 @@
 #include <outfont.hxx>
 
 #include <config_graphite.h>
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
 #include <graphite_features.hxx>
 #endif
 
@@ -85,7 +85,7 @@ size_t GlyphCache::IFSD_Hash::operator()( const FontSelectPattern& rFontSelData
 {
     // TODO: is it worth to improve this hash function?
     sal_IntPtr nFontId = reinterpret_cast<sal_IntPtr>( rFontSelData.mpFontData );
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
     if (rFontSelData.maTargetName.indexOf(grutils::GrFeatureParser::FEAT_PREFIX)
         != -1)
     {
@@ -99,7 +99,7 @@ size_t GlyphCache::IFSD_Hash::operator()( const FontSelectPattern& rFontSelData
     nHash   += rFontSelData.mbVertical;
     nHash   += rFontSelData.GetSlant();
     nHash   += rFontSelData.GetWeight();
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
     nHash   += rFontSelData.meLanguage;
 #endif
     return nHash;
@@ -134,7 +134,7 @@ bool GlyphCache::IFSD_Equal::operator()( const FontSelectPattern& rA, const Font
     if( nAWidth != nBWidth )
         return false;
 
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
    if (rA.meLanguage != rB.meLanguage)
         return false;
    // check for features
diff --git a/vcl/generic/print/genpspgraphics.cxx b/vcl/generic/print/genpspgraphics.cxx
index 523a0e9..4149e41 100644
--- a/vcl/generic/print/genpspgraphics.cxx
+++ b/vcl/generic/print/genpspgraphics.cxx
@@ -47,7 +47,7 @@
 #include "langboost.hxx"
 
 #include <config_graphite.h>
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
 #include <graphite_layout.hxx>
 #include <graphite_serverfont.hxx>
 #endif
@@ -743,7 +743,7 @@ static void DrawPrinterLayout( const SalLayout& rLayout, ::psp::PrinterGfx& rGfx
     if (bIsPspServerFontLayout)
     {
         const PspServerFontLayout * pPspLayout = dynamic_cast<const PspServerFontLayout*>(&rLayout);
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
         const GraphiteServerFontLayout * pGrLayout = dynamic_cast<const GraphiteServerFontLayout*>(&rLayout);
 #endif
         if (pPspLayout)
@@ -752,7 +752,7 @@ static void DrawPrinterLayout( const SalLayout& rLayout, ::psp::PrinterGfx& rGfx
             nMinCharPos = pPspLayout->getMinCharPos();
             nMaxCharPos = pPspLayout->getMaxCharPos();
         }
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
         else if (pGrLayout)
         {
         }
@@ -1021,7 +1021,7 @@ SalLayout* GenPspGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLe
     if( m_pServerFont[ nFallbackLevel ]
         && !(rArgs.mnFlags & SAL_LAYOUT_DISABLE_GLYPH_PROCESSING) )
     {
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
         // Is this a Graphite font?
         if (GraphiteServerFontLayout::IsGraphiteEnabledFont(*m_pServerFont[nFallbackLevel]))
         {
diff --git a/vcl/inc/generic/glyphcache.hxx b/vcl/inc/generic/glyphcache.hxx
index 9de49e7..033b646 100644
--- a/vcl/inc/generic/glyphcache.hxx
+++ b/vcl/inc/generic/glyphcache.hxx
@@ -49,7 +49,7 @@ class ServerFontLayout;
 #include <sallayout.hxx>
 
 #include <config_graphite.h>
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
 class GraphiteFaceWrapper;
 #endif
 
@@ -206,7 +206,7 @@ public:
     GlyphData&                  GetGlyphData( int nGlyphIndex );
     const GlyphMetric&          GetGlyphMetric( int nGlyphIndex )
                                 { return GetGlyphData( nGlyphIndex ).GetMetric(); }
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
     virtual GraphiteFaceWrapper* GetGraphiteFace() const;
 #endif
 
diff --git a/vcl/inc/win/salgdi.h b/vcl/inc/win/salgdi.h
index a60b6f6..dca9497 100644
--- a/vcl/inc/win/salgdi.h
+++ b/vcl/inc/win/salgdi.h
@@ -30,7 +30,7 @@
 #include <boost/unordered_set.hpp>
 
 #include <config_graphite.h>
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
 #include <graphite2/Font.h>
 #endif
 
@@ -41,7 +41,7 @@ class ImplFontAttrCache;
 #define RGB_TO_PALRGB(nRGB)         ((nRGB)|0x02000000)
 #define PALRGB_TO_RGB(nPalRGB)      ((nPalRGB)&0x00ffffff)
 
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
 class RawFontData;
 class GrFontData
 {
@@ -86,7 +86,7 @@ public:
     bool                    SupportsArabic() const      { return mbHasArabicSupport; }
     bool                    AliasSymbolsHigh() const    { return mbAliasSymbolsHigh; }
     bool                    AliasSymbolsLow() const     { return mbAliasSymbolsLow; }
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
     bool                    SupportsGraphite() const    { return mbHasGraphiteSupport; }
     const gr_face*          GraphiteFace() const;
 #endif
@@ -107,7 +107,7 @@ private:
     mutable bool                    mbDisableGlyphApi;
     mutable bool                    mbHasKoreanRange;
     mutable bool                    mbHasCJKSupport;
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
     mutable GrFontData*             mpGraphiteData;
     mutable bool                    mbHasGraphiteSupport;
 #endif
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index 9f022ed..df1016c 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -64,7 +64,7 @@
 #include "osl/file.h"
 
 #include <config_graphite.h>
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
 #include "graphite_features.hxx"
 #endif
 
@@ -2077,7 +2077,7 @@ size_t FontSelectPatternAttributes::hashCode() const
     // TODO: does it pay off to improve this hash function?
     static FontNameHash aFontNameHash;
     size_t nHash = aFontNameHash( maSearchName );
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
     // check for features and generate a unique hash if necessary
     if (maTargetName.indexOf(grutils::GrFeatureParser::FEAT_PREFIX)
         != -1)
@@ -2175,7 +2175,7 @@ bool ImplFontCache::IFSD_Equal::operator()(const FontSelectPattern& rA, const Fo
             return false;
     }
 
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
     // check for features
     if ((rA.maTargetName.indexOf(grutils::GrFeatureParser::FEAT_PREFIX)
          != STRING_NOTFOUND ||
@@ -2373,7 +2373,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( FontSelectPattern& rFSD,
         rFSD.maTargetName = GetNextFontToken( rFSD.GetFamilyName(), nTokenPos );
         aSearchName = rFSD.maTargetName;
 
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
         // Until features are properly supported, they are appended to the
         // font name, so we need to strip them off so the font is found.
         sal_Int32 nFeat = aSearchName.indexOf(grutils::GrFeatureParser::FEAT_PREFIX);
@@ -2418,7 +2418,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( FontSelectPattern& rFSD,
             }
         }
 
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
         // restore the features to make the font selection data unique
         rFSD.maTargetName = aOrigName;
 #endif
@@ -2430,7 +2430,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( FontSelectPattern& rFSD,
         // some systems provide special customization
         // e.g. they suggest "serif" as UI-font, but this name cannot be used directly
         //      because the system wants to map it to another font first, e.g. "Helvetica"
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
         // use the target name to search in the prematch hook
         rFSD.maTargetName = aBaseFontName;
 #endif
@@ -2455,7 +2455,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( FontSelectPattern& rFSD,
             if( mpPreMatchHook->FindFontSubstitute( rFSD ) )
                 GetEnglishSearchFontName( aSearchName );
         }
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
         // the prematch hook uses the target name to search, but we now need
         // to restore the features to make the font selection data unique
         rFSD.maTargetName = aOrigName;
diff --git a/vcl/unx/generic/gdi/salgdi.cxx b/vcl/unx/generic/gdi/salgdi.cxx
index f4cba0e..bacd146 100644
--- a/vcl/unx/generic/gdi/salgdi.cxx
+++ b/vcl/unx/generic/gdi/salgdi.cxx
@@ -109,7 +109,7 @@ X11SalGraphics::X11SalGraphics()
     nTextPixel_         = 0;
     nTextColor_         = MAKE_SALCOLOR( 0x00, 0x00, 0x00 ); // Black
 
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
     // check if graphite fonts have been disabled
     static const char* pDisableGraphiteStr = getenv( "SAL_DISABLE_GRAPHITE" );
     bDisableGraphite_       = pDisableGraphiteStr ? (pDisableGraphiteStr[0]!='0') : sal_False;
diff --git a/vcl/unx/generic/gdi/salgdi3.cxx b/vcl/unx/generic/gdi/salgdi3.cxx
index 391da49..96ce72d 100644
--- a/vcl/unx/generic/gdi/salgdi3.cxx
+++ b/vcl/unx/generic/gdi/salgdi3.cxx
@@ -67,7 +67,7 @@
 #include "outdev.h"
 
 #include <config_graphite.h>
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
 #include <graphite_layout.hxx>
 #include <graphite_serverfont.hxx>
 #endif
@@ -744,7 +744,7 @@ SalLayout* X11SalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLe
     if( mpServerFont[ nFallbackLevel ]
     && !(rArgs.mnFlags & SAL_LAYOUT_DISABLE_GLYPH_PROCESSING) )
     {
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
         // Is this a Graphite font?
         if (!bDisableGraphite_ &&
             GraphiteServerFontLayout::IsGraphiteEnabledFont(*mpServerFont[nFallbackLevel]))
diff --git a/vcl/unx/kde/FPServiceInfo.hxx b/vcl/unx/kde/FPServiceInfo.hxx
index 5cddc5f..49f30c1 100644
--- a/vcl/unx/kde/FPServiceInfo.hxx
+++ b/vcl/unx/kde/FPServiceInfo.hxx
@@ -22,7 +22,7 @@
 
 #include <config_vclplug.h>
 
-#ifdef ENABLE_TDE
+#if ENABLE_TDE
 
 // the service names
 #define FILE_PICKER_SERVICE_NAME "com.sun.star.ui.dialogs.TDEFilePicker"
diff --git a/vcl/unx/kde/UnxFilePicker.cxx b/vcl/unx/kde/UnxFilePicker.cxx
index 914768a..afd4350 100644
--- a/vcl/unx/kde/UnxFilePicker.cxx
+++ b/vcl/unx/kde/UnxFilePicker.cxx
@@ -73,7 +73,7 @@ namespace
         uno::Sequence<rtl::OUString> aRet(3);
         aRet[0] = rtl::OUString("com.sun.star.ui.dialogs.FilePicker");
         aRet[1] = rtl::OUString("com.sun.star.ui.dialogs.SystemFilePicker");
-#ifdef ENABLE_TDE
+#if ENABLE_TDE
         aRet[2] = rtl::OUString("com.sun.star.ui.dialogs.TDEFilePicker");
 #else // ENABLE_TDE
         aRet[2] = rtl::OUString("com.sun.star.ui.dialogs.KDEFilePicker");
@@ -703,7 +703,7 @@ void UnxFilePicker::initFilePicker()
 #endif
 
         // The executable name
-#ifdef ENABLE_TDE
+#if ENABLE_TDE
         rtl::OUString helperurl("${ORIGIN}/tdefilepicker");
 #else // ENABLE_TDE
         rtl::OUString helperurl("${ORIGIN}/kdefilepicker");
diff --git a/vcl/unx/kde/fpicker/kdecommandthread.cxx b/vcl/unx/kde/fpicker/kdecommandthread.cxx
index 064d06c..55559d2 100644
--- a/vcl/unx/kde/fpicker/kdecommandthread.cxx
+++ b/vcl/unx/kde/fpicker/kdecommandthread.cxx
@@ -23,7 +23,7 @@
 
 #include <config_vclplug.h>
 
-#ifdef ENABLE_TDE
+#if ENABLE_TDE
 #include <tqstringlist.h>
 #include <tdeapplication.h>
 #else // ENABLE_TDE
diff --git a/vcl/unx/kde/fpicker/kdecommandthread.hxx b/vcl/unx/kde/fpicker/kdecommandthread.hxx
index acb90d8..b78592c 100644
--- a/vcl/unx/kde/fpicker/kdecommandthread.hxx
+++ b/vcl/unx/kde/fpicker/kdecommandthread.hxx
@@ -22,11 +22,11 @@
 
 #include <config_vclplug.h>
 
-#ifdef ENABLE_TDE
+#if ENABLE_TDE
 #include <shell/tde_defines.h>
 #endif // ENABLE_TDE
 
-#ifdef ENABLE_TDE
+#if ENABLE_TDE
 #include <tqevent.h>
 #include <tqmutex.h>
 #include <tqthread.h>
diff --git a/vcl/unx/kde/fpicker/kdefilepicker.cxx b/vcl/unx/kde/fpicker/kdefilepicker.cxx
index 5163079..4dafb1e 100644
--- a/vcl/unx/kde/fpicker/kdefilepicker.cxx
+++ b/vcl/unx/kde/fpicker/kdefilepicker.cxx
@@ -24,7 +24,7 @@
 
 #include <config_vclplug.h>
 
-#ifdef ENABLE_TDE
+#if ENABLE_TDE
 
 #include <tqcheckbox.h>
 #include <tqcombobox.h>
@@ -78,7 +78,7 @@
 
 #endif // ENABLE_TDE
 
-#ifdef ENABLE_TDE
+#if ENABLE_TDE
 #define QCheckBox_String    "TQCheckBox"
 #define QComboBox_String    "TQComboBox"
 #else // ENABLE_TDE
@@ -105,7 +105,7 @@ KDEFileDialog::KDEFileDialog( const QString &startDir, const QString &filter,
       m_bIsExecuting( false ),
       m_bCanNotifySelection( true )
 {
-#ifdef ENABLE_TDE
+#if ENABLE_TDE
     connect( this, SIGNAL( fileHighlighted( const TQString & ) ),
              this, SLOT( fileHighlightedCommand( const TQString & ) ) );
 #else // ENABLE_TDE
@@ -666,7 +666,7 @@ QString KDEFileDialog::localCopy( const QString &rFileName ) const
     return qDestURL.url();
 }
 
-#ifdef ENABLE_TDE
+#if ENABLE_TDE
 void KDEFileDialog::fileHighlightedCommand( const TQString & )
 #else // ENABLE_TDE
 void KDEFileDialog::fileHighlightedCommand( const QString & )
diff --git a/vcl/unx/kde/fpicker/kdefilepicker.hxx b/vcl/unx/kde/fpicker/kdefilepicker.hxx
index 046a1bc..e317a7d 100644
--- a/vcl/unx/kde/fpicker/kdefilepicker.hxx
+++ b/vcl/unx/kde/fpicker/kdefilepicker.hxx
@@ -22,13 +22,13 @@
 
 #include <config_vclplug.h>
 
-#ifdef ENABLE_TDE
+#if ENABLE_TDE
 #include <shell/tde_defines.h>
 #endif // ENABLE_TDE
 
 #include <cstddef>
 
-#ifdef ENABLE_TDE
+#if ENABLE_TDE
 #include <tdefiledialog.h>
 #include <tdefilefiltercombo.h>
 #else // ENABLE_TDE
@@ -42,7 +42,7 @@ class QVBox;
 
 class KDEFileDialog : public KFileDialog
 {
-#ifdef ENABLE_TDE
+#if ENABLE_TDE
     TQ_OBJECT
 #else // ENABLE_TDE
     Q_OBJECT
@@ -114,7 +114,7 @@ protected:
 protected slots:
 // Qt3 moc does not really understand #ifdef and would process both slots,
 // so the FILTER_OUT_FOO tags are used to remove some slots before moc sees them.
-#ifdef ENABLE_TDE
+#if ENABLE_TDE
     void                        fileHighlightedCommand( const TQString & ); // FILTER_OUT_TDE
 #else // ENABLE_TDE
     void                        fileHighlightedCommand( const QString & );  // FILTER_OUT_KDE
diff --git a/vcl/unx/kde/fpicker/kdefpmain.cxx b/vcl/unx/kde/fpicker/kdefpmain.cxx
index df39e01..8178586 100644
--- a/vcl/unx/kde/fpicker/kdefpmain.cxx
+++ b/vcl/unx/kde/fpicker/kdefpmain.cxx
@@ -23,7 +23,7 @@
 #include <kdefilepicker.hxx>
 #include <kdecommandthread.hxx>
 
-#ifdef ENABLE_TDE
+#if ENABLE_TDE
 #include <tqeventloop.h>
 #include <tdeaboutdata.h>
 #include <tdeapplication.h>
@@ -39,7 +39,7 @@
 
 #include <config_vclplug.h>
 
-#ifdef ENABLE_TDE
+#if ENABLE_TDE
 #define THIS_DESKENV_NAME_CAP "TDE"
 #define THIS_DESKENV_NAME_LOW "tde"
 #else // ENABLE_TDE
@@ -47,7 +47,7 @@
 #define THIS_DESKENV_NAME_LOW "kde"
 #endif // ENABLE_TDE
 
-#ifdef ENABLE_TDE
+#if ENABLE_TDE
 #define KAboutData TDEAboutData
 #define KCmdLineArgs TDECmdLineArgs
 #define KCmdLineOptions TDECmdLineOptions
diff --git a/vcl/unx/kde/fpicker/kdemodalityfilter.cxx b/vcl/unx/kde/fpicker/kdemodalityfilter.cxx
index 2c1f034..57e889a 100644
--- a/vcl/unx/kde/fpicker/kdemodalityfilter.cxx
+++ b/vcl/unx/kde/fpicker/kdemodalityfilter.cxx
@@ -21,7 +21,7 @@
 
 #include <kdemodalityfilter.hxx>
 
-#ifdef ENABLE_TDE
+#if ENABLE_TDE
 #include <tdeapplication.h>
 #include <kdialogbase.h>
 #else // ENABLE_TDE
diff --git a/vcl/unx/kde/fpicker/kdemodalityfilter.hxx b/vcl/unx/kde/fpicker/kdemodalityfilter.hxx
index 05331fe..fadf77d 100644
--- a/vcl/unx/kde/fpicker/kdemodalityfilter.hxx
+++ b/vcl/unx/kde/fpicker/kdemodalityfilter.hxx
@@ -22,11 +22,11 @@
 
 #include <config_vclplug.h>
 
-#ifdef ENABLE_TDE
+#if ENABLE_TDE
 #include <shell/tde_defines.h>
 #endif // ENABLE_TDE
 
-#ifdef ENABLE_TDE
+#if ENABLE_TDE
 #include <tqobject.h>
 #else // ENABLE_TDE
 #include <qobject.h>
diff --git a/vcl/unx/kde/kdedata.cxx b/vcl/unx/kde/kdedata.cxx
index 1724ac5..5151350 100644
--- a/vcl/unx/kde/kdedata.cxx
+++ b/vcl/unx/kde/kdedata.cxx
@@ -46,7 +46,7 @@
 
 #include <config_vclplug.h>
 
-#ifdef ENABLE_TDE
+#if ENABLE_TDE
 #define THIS_DESKENV_NAME_CAP "TDE"
 #define THIS_DESKENV_NAME_LOW "tde"
 #else // ENABLE_TDE
diff --git a/vcl/unx/kde/salnativewidgets-kde.cxx b/vcl/unx/kde/salnativewidgets-kde.cxx
index 7b8b4ee..1f99710 100644
--- a/vcl/unx/kde/salnativewidgets-kde.cxx
+++ b/vcl/unx/kde/salnativewidgets-kde.cxx
@@ -34,7 +34,7 @@
 
 #include <config_vclplug.h>
 
-#ifdef ENABLE_TDE
+#if ENABLE_TDE
 #define QPushButton_String      "TQPushButton"
 #define QRadioButton_String     "TQRadioButton"
 #define QCheckBox_String        "TQCheckBox"
diff --git a/vcl/win/source/gdi/salgdi3.cxx b/vcl/win/source/gdi/salgdi3.cxx
index 9a8cac9..f2bcd8e 100644
--- a/vcl/win/source/gdi/salgdi3.cxx
+++ b/vcl/win/source/gdi/salgdi3.cxx
@@ -65,7 +65,7 @@
 #include <algorithm>
 
 #include <config_graphite.h>
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
 #include <graphite2/Font.h>
 #endif
 
@@ -1046,7 +1046,7 @@ void ImplSalLogFontToFontW( HDC hDC, const LOGFONTW& rLogFont, Font& rFont )
 }
 
 // =======================================================================
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
 
 #ifdef DEBUG
 static FILE * grLogFile = NULL;
@@ -1149,7 +1149,7 @@ ImplWinFontData::ImplWinFontData( const ImplDevFontAttributes& rDFS,
     mbDisableGlyphApi( false ),
     mbHasKoreanRange( false ),
     mbHasCJKSupport( false ),
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
     mpGraphiteData(NULL),
     mbHasGraphiteSupport( false ),
 #endif
@@ -1200,7 +1200,7 @@ ImplWinFontData::~ImplWinFontData()
 
     if( mpUnicodeMap )
         mpUnicodeMap->DeReference();
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
     if (mpGraphiteData)
         mpGraphiteData->DeReference();
 #ifdef DEBUG
@@ -1232,7 +1232,7 @@ void ImplWinFontData::UpdateFromHDC( HDC hDC ) const
 
     ReadCmapTable( hDC );
     GetFontCapabilities( hDC );
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
     static const char* pDisableGraphiteText = getenv( "SAL_DISABLE_GRAPHITE" );
     if( !pDisableGraphiteText || (pDisableGraphiteText[0] == '0') )
     {
@@ -1269,7 +1269,7 @@ void ImplWinFontData::UpdateFromHDC( HDC hDC ) const
 
 }
 
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
 const gr_face* ImplWinFontData::GraphiteFace() const
 {
 #ifdef DEBUG
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 63f8a65..83bb2c3 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -51,7 +51,7 @@ typedef boost::unordered_map<int,int> IntMap;
 
 // Graphite headers
 #include <config_graphite.h>
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
 #include <i18npool/languagetag.hxx>
 #include <graphite_layout.hxx>
 #include <graphite_features.hxx>
@@ -1191,7 +1191,7 @@ bool UniscribeLayout::LayoutText( ImplLayoutArgs& rArgs )
     SCRIPT_CONTROL aScriptControl = {nLangId,false,false,false,false,false,false,false,false,0};
     aScriptControl.fNeutralOverride = aScriptState.fOverrideDirection;
     aScriptControl.fContextDigits   = (0 != (rArgs.mnFlags & SAL_LAYOUT_SUBSTITUTE_DIGITS));
-#ifdef HAVE_FMERGENEUTRALITEMS
+#if HAVE_FMERGENEUTRALITEMS
     aScriptControl.fMergeNeutralItems = true;
 #endif
     // determine relevant substring and work only on it
@@ -2671,7 +2671,7 @@ bool UniscribeLayout::IsKashidaPosValid ( int nCharPos ) const
     return true;
 }
 
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
 
 class GraphiteLayoutWinImpl : public GraphiteLayout
 {
@@ -2897,7 +2897,7 @@ SalLayout* WinSalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLe
     if( !(rArgs.mnFlags & SAL_LAYOUT_COMPLEX_DISABLED)
     &&   (bUspInited || InitUSP()) )   // CTL layout engine
     {
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
         if (rFontFace.SupportsGraphite())
         {
             pWinLayout = new GraphiteWinLayout(mhDC, rFontFace, rFontInstance);
@@ -2923,7 +2923,7 @@ SalLayout* WinSalGraphics::GetTextLayout( ImplLayoutArgs& rArgs, int nFallbackLe
         BYTE eCharSet = ANSI_CHARSET;
         if( mpLogFont )
             eCharSet = mpLogFont->lfCharSet;
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
         if (rFontFace.SupportsGraphite())
             pWinLayout = new GraphiteWinLayout(mhDC, rFontFace, rFontInstance);
         else
@@ -3038,7 +3038,7 @@ PhysicalFontFace* ImplWinFontData::Clone() const
 {
     if( mpUnicodeMap )
         mpUnicodeMap->AddReference();
-#ifdef ENABLE_GRAPHITE
+#if ENABLE_GRAPHITE
     if ( mpGraphiteData )
         mpGraphiteData->AddReference();
 #endif
diff --git a/xmlreader/inc/xmlreader/span.hxx b/xmlreader/inc/xmlreader/span.hxx
index 23df2ba..fbb4834 100644
--- a/xmlreader/inc/xmlreader/span.hxx
+++ b/xmlreader/inc/xmlreader/span.hxx
@@ -59,7 +59,7 @@ struct OOO_DLLPUBLIC_XMLREADER Span {
             begin, length, text.getStr(), text.getLength()) == 0;
     }
 
-#ifndef HAVE_SFINAE_ANONYMOUS_BROKEN
+#if ! HAVE_SFINAE_ANONYMOUS_BROKEN
     /**
      @overload
      This function accepts an ASCII string literal as its argument.
commit 151abb8b2b9d3a22229b98cec12e29484d12109b
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Tue Mar 19 16:39:49 2013 +0100

    use -isystem instead of -I for 3rd party headers
    
    This should avoid gcc warnings in external code we don't care about,
    so there'll be no need to fix them for WaE.
    
    Change-Id: I629dc2672c075908294609249183f27ad2984325

diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index 2d1d75d..6fad496 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -99,7 +99,7 @@ else #!SYSTEM_NPAPI_HEADERS
 define gb_LinkTarget__use_npapi_headers
 $(call gb_LinkTarget_use_package,$(1),npapi)
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(OUTDIR)/inc/external/npsdk \
+	$(ISYSTEM)$(OUTDIR)/inc/external/npsdk \
 	$$(INCLUDE) \
 )
 
@@ -134,7 +134,7 @@ else
 define gb_LinkTarget__use_vigra_headers
 $(call gb_LinkTarget_use_unpacked,$(1),vigra)
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(call gb_UnpackedTarball_get_dir,vigra/include) \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,vigra/include) \
 	$$(INCLUDE) \
 )
 
@@ -151,7 +151,7 @@ else
 define gb_LinkTarget__use_mdds_headers
 $(call gb_LinkTarget_use_unpacked,$(1),mdds)
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(call gb_UnpackedTarball_get_dir,mdds/include) \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,mdds/include) \
 	$$(INCLUDE) \
 )
 
@@ -203,7 +203,7 @@ $(call gb_LinkTarget_use_libraries,$(1),\
     cppunit \
 )
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(call gb_UnpackedTarball_get_dir,cppunit/include)\
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,cppunit/include)\
 	$$(INCLUDE) \
 )
 
@@ -274,8 +274,8 @@ $(call gb_LinkTarget_add_defs,$(1),\
 )
 
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(call gb_UnpackedTarball_get_dir,mysqlcppconn) \
-	-I$(call gb_UnpackedTarball_get_dir,mysqlcppconn)/cppconn \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,mysqlcppconn) \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,mysqlcppconn)/cppconn \
 	$$(INCLUDE) \
 )
 
@@ -315,7 +315,7 @@ $(call gb_LinkTarget_use_packages,$(1),\
 )
 
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(OUTDIR)/inc/external/zlib \
+	$(ISYSTEM)$(OUTDIR)/inc/external/zlib \
 	$$(INCLUDE) \
 )
 
@@ -363,7 +363,7 @@ $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
 define gb_LinkTarget__use_jpeg
 $(call gb_LinkTarget_set_include,$(1),\
 	$$(INCLUDE) \
-	-I$(OUTDIR)/inc/external/jpeg \
+	$(ISYSTEM)$(OUTDIR)/inc/external/jpeg \
 )
 
 $(call gb_LinkTarget_use_static_libraries,$(1),\
@@ -430,7 +430,7 @@ define gb_LinkTarget__use_expat
 $(if $(2),,$(error gb_LinkTarget__use_expat needs additional parameter))
 
 $(call gb_LinkTarget_set_include,$(1),\
-    -I$(OUTDIR)/inc/external/expat \
+    $(ISYSTEM)$(OUTDIR)/inc/external/expat \
     $$(INCLUDE) \
 )
 
@@ -481,7 +481,7 @@ $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
 define gb_LinkTarget__use_hyphen
 $(call gb_LinkTarget_use_unpacked,$(1),hyphen)
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(call gb_UnpackedTarball_get_dir,hyphen)\
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,hyphen)\
 	$$(INCLUDE) \
 )
 $(call gb_LinkTarget_use_static_libraries,$(1),\
@@ -515,7 +515,7 @@ $(call gb_LinkTarget_add_defs,$(1),\
 )
 $(call gb_LinkTarget_use_unpacked,$(1),hunspell)
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,hunspell/src/hunspell)\
 	$$(INCLUDE) \
 )
 $(call gb_LinkTarget_use_static_libraries,$(1),\
@@ -592,7 +592,7 @@ endef
 define gb_LinkTarget__use_boost_headers
 $(call gb_LinkTarget_use_unpacked,$(1),boost)
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(call gb_UnpackedTarball_get_dir,boost) \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,boost) \
 	$$(INCLUDE) \
 )
 
@@ -673,7 +673,7 @@ $(call gb_LinkTarget_use_static_libraries,$(1),\
 )
 
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(call gb_UnpackedTarball_get_dir,exttextcat/src) \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,exttextcat/src) \
 	$$(INCLUDE) \
 )
 
@@ -710,7 +710,7 @@ $(call gb_LinkTarget_use_libraries,$(1),\
 )
 $(call gb_LinkTarget_set_include,$(1),\
 	$$(INCLUDE) \
-	-I$(call gb_UnpackedTarball_get_dir,xml2)/include \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,xml2)/include \
 )
 
 endef
@@ -754,7 +754,7 @@ define gb_LinkTarget__use_libxslt
 $(call gb_LinkTarget_use_package,$(1),xslt)
 $(call gb_LinkTarget_set_include,$(1),\
 	$$(INCLUDE) \
-	-I$(call gb_UnpackedTarball_get_dir,xslt) \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,xslt) \
 )
 $(call gb_LinkTarget_use_libraries,$(1),\
 	xslt \
@@ -766,7 +766,7 @@ define gb_LinkTarget__use_libexslt
 $(call gb_LinkTarget_use_package,$(1),xslt)
 $(call gb_LinkTarget_set_include,$(1),\
 	$$(INCLUDE) \
-	-I$(call gb_UnpackedTarball_get_dir,xslt) \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,xslt) \
 )
 
 $(call gb_LinkTarget_use_libraries,$(1),\
@@ -804,7 +804,7 @@ $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
 define gb_LinkTarget__use_liblangtag
 $(call gb_LinkTarget_use_unpacked,$(1),langtag)
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(call gb_UnpackedTarball_get_dir,langtag) \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,langtag) \
 	$$(INCLUDE) \
 )
 $(call gb_LinkTarget_use_static_libraries,$(1),\
@@ -842,7 +842,7 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO,\
 define gb_LinkTarget__use_neon
 $(call gb_LinkTarget_use_unpacked,$(1),neon)
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(call gb_UnpackedTarball_get_dir,neon/src) \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,neon/src) \
 	$$(INCLUDE) \
 )
 $(call gb_LinkTarget_use_libraries,$(1),\
@@ -878,7 +878,7 @@ else # !SYSTEM_REDLAND
 
 define gb_LinkTarget__use_redland_headers
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(call gb_UnpackedTarball_get_dir,redland)/librdf \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,redland)/librdf \
 	$$(INCLUDE) \
 )
 
@@ -886,7 +886,7 @@ endef
 
 define gb_LinkTarget__use_raptor_headers
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(call gb_UnpackedTarball_get_dir,raptor)/src \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,raptor)/src \
 	$$(INCLUDE) \
 )
 
@@ -894,7 +894,7 @@ endef
 
 define gb_LinkTarget__use_rasqal_headers
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(call gb_UnpackedTarball_get_dir,rasqal)/src \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,rasqal)/src \
 	$$(INCLUDE) \
 )
 
@@ -968,8 +968,8 @@ define gb_LinkTarget__use_cairo
 $(call gb_LinkTarget_use_package,$(1),cairo)
 $(call gb_LinkTarget_use_package,$(1),pixman)
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(call gb_UnpackedTarball_get_dir,cairo) \
-	-I$(call gb_UnpackedTarball_get_dir,cairo)/src \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,cairo) \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,cairo)/src \
 	$(FREETYPE_CFLAGS) \
 	$$(INCLUDE) \
 )
@@ -1031,7 +1031,7 @@ $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
 define gb_LinkTarget__use_graphite
 $(call gb_LinkTarget_use_unpacked,$(1),graphite)
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(call gb_UnpackedTarball_get_dir,graphite/include) \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,graphite/include) \
 	$$(INCLUDE) \
 )
 $(call gb_LinkTarget_use_static_libraries,$(1),\
@@ -1083,7 +1083,7 @@ endif
 define gb_LinkTarget__use_icu_headers
 $(call gb_LinkTarget_use_package,$(1),icu)
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(OUTDIR)/inc/external \
+	$(ISYSTEM)$(OUTDIR)/inc/external \
 	$$(INCLUDE) \
 )
 
@@ -1203,7 +1203,7 @@ endef
 
 define gb_LinkTarget__use_openssl_headers
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(call gb_UnpackedTarball_get_dir,openssl)/include \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,openssl)/include \
 	$$(INCLUDE) \
 )
 
@@ -1487,7 +1487,7 @@ $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS, \
 define gb_LinkTarget__use_lcms2
 $(call gb_LinkTarget_use_package,$(1),lcms2)
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,lcms2/include) \
 	$$(INCLUDE) \
 )
 $(call gb_LinkTarget_use_static_libraries,$(1),\
@@ -1505,7 +1505,7 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
 define gb_LinkTarget__use_lcms2
 $(call gb_LinkTarget_use_package,$(1),lcms2)
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(call gb_UnpackedTarball_get_dir,lcms2/include) \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,lcms2/include) \
 	$$(INCLUDE) \
 )
 $(call gb_LinkTarget_use_libraries,$(1),\
@@ -1540,7 +1540,7 @@ $(call gb_LinkTarget_use_libraries,$(1),\
 	lpsolve55 \
 )
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(call gb_UnpackedTarball_get_dir,lpsolve) \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,lpsolve) \
 	$$(INCLUDE) \
 )
 
@@ -1751,7 +1751,7 @@ $(eval $(call gb_Helper_register_libraries,PLAINLIBS_OOO, \
 define gb_LinkTarget__use_curl
 $(call gb_LinkTarget_use_package,$(1),curl)
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(call gb_UnpackedTarball_get_dir,curl/include) \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,curl/include) \
 	$$(INCLUDE) \
 )
 $(call gb_LinkTarget_use_libraries,$(1),\
@@ -1814,9 +1814,9 @@ define gb_LinkTarget__use_poppler
 $(call gb_LinkTarget_use_package,$(1),xpdf)
 
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(call gb_UnpackedTarball_get_dir,xpdf) \
-	-I$(call gb_UnpackedTarball_get_dir,xpdf)/xpdf \
-	-I$(call gb_UnpackedTarball_get_dir,xpdf)/goo \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,xpdf) \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,xpdf)/xpdf \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,xpdf)/goo \
 	$$(INCLUDE) \
 )
 
@@ -1927,7 +1927,7 @@ $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS,\
 define gb_LinkTarget__use_openldap
 $(call gb_LinkTarget_use_unpacked,$(1),openldap)
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(call gb_UnpackedTarball_get_dir,openldap/include) \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,openldap/include) \
 	$$(INCLUDE) \
 )
 $(call gb_LinkTarget_use_package,$(1),openldap)
@@ -1969,7 +1969,7 @@ $(call gb_LinkTarget_use_packages,$(1),\
 )
 
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(OUTDIR)/inc/postgresql \
+	$(ISYSTEM)$(OUTDIR)/inc/postgresql \
 	$$(INCLUDE) \
 )
 
@@ -2004,7 +2004,7 @@ $(call gb_LinkTarget_add_defs,$(1),\
 
 $(call gb_LinkTarget_set_include,$(1),\
 	$$(INCLUDE) \
-	-I$(OUTDIR)/inc/mozilla \
+	$(ISYSTEM)$(OUTDIR)/inc/mozilla \
 )
 
 $(call gb_LinkTarget_use_libraries,$(1),\
@@ -2220,9 +2220,9 @@ define gb_LinkTarget__use_python_headers
 $(call gb_LinkTarget_use_package,$(1),python3)
 $(call gb_LinkTarget_use_external_project,$(1),python3)
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(call gb_UnpackedTarball_get_dir,python3) \
-	-I$(call gb_UnpackedTarball_get_dir,python3)/PC \
-	-I$(call gb_UnpackedTarball_get_dir,python3)/Include \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,python3) \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,python3)/PC \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,python3)/Include \
 	$$(INCLUDE) \
 )
 
@@ -2276,7 +2276,7 @@ $(eval $(call gb_Helper_register_static_libraries,PLAINLIBS,\
 define gb_LinkTarget__use_orcus
 $(call gb_LinkTarget_use_unpacked,$(1),orcus)
 $(call gb_LinkTarget_set_include,$(1),\
-	-I$(call gb_UnpackedTarball_get_dir,orcus/include) \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,orcus/include) \
 	$$(INCLUDE) \
 )
 $(call gb_LinkTarget_use_static_libraries,$(1),orcus)
@@ -2403,8 +2403,8 @@ define gb_LinkTarget__use_nss3
 $(call gb_LinkTarget_use_package,$(1),nss)
 $(call gb_LinkTarget_set_include,$(1),\
 	$$(INCLUDE) \
-	-I$(call gb_UnpackedTarball_get_dir,nss)/mozilla/dist/public/nss \
-	-I$(call gb_UnpackedTarball_get_dir,nss)/mozilla/dist/out/include \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,nss)/mozilla/dist/public/nss \
+	$(ISYSTEM)$(call gb_UnpackedTarball_get_dir,nss)/mozilla/dist/out/include \
 )
 
 $(call gb_LinkTarget_use_libraries,$(1),\
diff --git a/config_host.mk.in b/config_host.mk.in
index 496097c..5e68b41 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -252,6 +252,7 @@ export INPATH_FOR_BUILD=@INPATH_FOR_BUILD@
 export INSTALLDIR=@INSTALLDIR@
 export INSTALLDIRNAME=@INSTALLDIRNAME@
 export INTRO_BITMAP=@INTRO_BITMAP@
+export ISYSTEM=@ISYSTEM@
 export JAVACISGCJ=@JAVACISGCJ@
 export JAVACISKAFFE=@JAVACISKAFFE@
 export JAVACOMPILER=@JAVACOMPILER@
diff --git a/configure.ac b/configure.ac
index 9627162..8a7952b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2830,6 +2830,26 @@ printf ("hello world\n");
 fi
 AC_SUBST(HAVE_LD_BSYMBOLIC_FUNCTIONS)
 
+# Use -isystem (gcc) if possible, to avoid warnigs in 3rd party headers.
+ISYSTEM=
+if test "$GCC" = "yes"; then
+    AC_MSG_CHECKING( for -isystem )
+    save_CFLAGS=$CFLAGS
+    CFLAGS="$CFLAGS -Werror -finline-limit=0"
+    AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[ return 0; ]])],[ ISYSTEM=-isystem ],[])
+    CFLAGS=$save_CFLAGS
+    if test -n "$ISYSTEM"; then
+        AC_MSG_RESULT(yes)
+    else
+        AC_MSG_RESULT(no)
+    fi
+fi
+if test -z "$ISYSTEM"; then
+    # fall back to using -I
+    ISYSTEM=-I
+fi
+AC_SUBST(ISYSTEM)
+
 dnl ===================================================================
 dnl  Check which Visual Studio or MinGW compiler is used
 dnl ===================================================================
@@ -3901,7 +3921,7 @@ else
     WORKDIR=${BUILDDIR}/workdir/${INPATH}
 fi
 OUTDIR="${SOLARVER}/${INPATH}"
-SOLARINC="-I. -I${SOLARVER}/$INPATH/inc/external -I${SOLARVER}/$INPATH/inc -I$SRC_ROOT/solenv/inc $SOLARINC"
+SOLARINC="-I. ${ISYSTEM}${SOLARVER}/$INPATH/inc/external -I${SOLARVER}/$INPATH/inc -I$SRC_ROOT/solenv/inc $SOLARINC"
 AC_SUBST(COM)
 AC_SUBST(CPU)
 AC_SUBST(CPUNAME)
commit 594a1ca96b465ffdb688febde9e2dbd089e7bbf0
Author: Luboš Luňák <l.lunak at suse.cz>
Date:   Mon Mar 18 17:41:50 2013 +0100

    clarify when HAVE_FOO macros should have 0 fallback
    
    Change-Id: Idc6635b59851c9b1a94f11042d3a60a4822061f2

diff --git a/config_host/README b/config_host/README
index dd6aa86..05068b3 100644
--- a/config_host/README
+++ b/config_host/README
@@ -20,8 +20,9 @@ Adding a new setting:
         - add AC_CONFIG_HEADERS([config_host/config_xxx.h]) next to the others
             in configure.ac
         - add config_hxx.h to config_host/.gitignore
-- add #undef HAVE_FOO to the config_host/config_hxx.h , possibly with a comment,
-  and add the following block right after it
+- add #undef HAVE_FOO to the config_host/config_hxx.h , possibly with a comment
+- if the setting is an on/off setting (i.e. not a value of anything),
+  add the following block right after it
 #ifndef HAVE_FOO
 #define HAVE_FOO 0
 #endif


More information about the Libreoffice-commits mailing list