[Libreoffice-commits] core.git: 2 commits - compilerplugins/Makefile-clang.mk config_host.mk.in configure.ac external/clucene sc/source sd/source solenv/gbuild sw/source

Matúš Kukan matus.kukan at collabora.com
Thu Feb 20 02:35:09 PST 2014


 compilerplugins/Makefile-clang.mk      |    2 +-
 config_host.mk.in                      |    2 +-
 configure.ac                           |    5 ++---
 external/clucene/Makefile              |    4 ----
 sc/source/ui/attrdlg/scabstdlg.cxx     |    2 +-
 sc/source/ui/attrdlg/scuiexp.cxx       |    6 +-----
 sd/source/ui/dlg/sdabstdlg.cxx         |    2 +-
 sd/source/ui/dlg/sduiexp.cxx           |    6 +-----
 solenv/gbuild/platform/com_GCC_defs.mk |    2 +-
 solenv/gbuild/platform/com_MSC_defs.mk |    2 +-
 sw/source/ui/dialog/swabstdlg.cxx      |    2 +-
 sw/source/ui/dialog/swuiexp.cxx        |    6 +-----
 12 files changed, 12 insertions(+), 29 deletions(-)

New commits:
commit 52e99e9e957a228d95d55935acc96175ee494f30
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Thu Feb 20 09:40:11 2014 +0100

    Rename functions to avoid name collisions more generally.
    
    Luckily, in this case it's easy to find the only place where we load the symbol.
    
    Change-Id: I224fd1e08f268095f8be58b089a643d434bc7a98

diff --git a/sc/source/ui/attrdlg/scabstdlg.cxx b/sc/source/ui/attrdlg/scabstdlg.cxx
index 88768ed..5da6897 100644
--- a/sc/source/ui/attrdlg/scabstdlg.cxx
+++ b/sc/source/ui/attrdlg/scabstdlg.cxx
@@ -50,7 +50,7 @@ ScAbstractDialogFactory* ScAbstractDialogFactory::Create()
     if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, aStrBuf.makeStringAndClear(),
                                                              SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY ) )
         fp = ( ScAbstractDialogFactory* (SAL_CALL*)() )
-            aDialogLibrary.getFunctionSymbol( OUString("CreateDialogFactory") );
+            aDialogLibrary.getFunctionSymbol( OUString("ScCreateDialogFactory") );
 #else
     fp = ScCreateDialogFactory();
 #endif
diff --git a/sc/source/ui/attrdlg/scuiexp.cxx b/sc/source/ui/attrdlg/scuiexp.cxx
index 77e5b2e..01f1926 100644
--- a/sc/source/ui/attrdlg/scuiexp.cxx
+++ b/sc/source/ui/attrdlg/scuiexp.cxx
@@ -36,13 +36,9 @@ namespace scui
     }
 }
 
-#ifdef DISABLE_DYNLOADING
-#define CreateDialogFactory ScCreateDialogFactory
-#endif
-
 extern "C"
 {
-    SAL_DLLPUBLIC_EXPORT ScAbstractDialogFactory* CreateDialogFactory()
+    SAL_DLLPUBLIC_EXPORT ScAbstractDialogFactory* ScCreateDialogFactory()
     {
         return ::scui::GetFactory();
     }
diff --git a/sd/source/ui/dlg/sdabstdlg.cxx b/sd/source/ui/dlg/sdabstdlg.cxx
index 34b737a..0fc9320 100644
--- a/sd/source/ui/dlg/sdabstdlg.cxx
+++ b/sd/source/ui/dlg/sdabstdlg.cxx
@@ -46,7 +46,7 @@ SdAbstractDialogFactory* SdAbstractDialogFactory::Create()
     static const OUString sLibName(::vcl::unohelper::CreateLibraryName("sdui", sal_True));
     if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, sLibName ) )
         fp = ( SdAbstractDialogFactory* (SAL_CALL*)() )
-            aDialogLibrary.getFunctionSymbol( "CreateDialogFactory" );
+            aDialogLibrary.getFunctionSymbol( "SdCreateDialogFactory" );
 #else
     fp = SdCreateDialogFactory();
 #endif
diff --git a/sd/source/ui/dlg/sduiexp.cxx b/sd/source/ui/dlg/sduiexp.cxx
index d1a64e5..3c52638 100644
--- a/sd/source/ui/dlg/sduiexp.cxx
+++ b/sd/source/ui/dlg/sduiexp.cxx
@@ -20,13 +20,9 @@
 #include "sddlgfact.hxx"
 #include "sal/types.h"
 
-#ifdef DISABLE_DYNLOADING
-#define CreateDialogFactory SdCreateDialogFactory
-#endif
-
 extern "C"
 {
-    SAL_DLLPUBLIC_EXPORT SdAbstractDialogFactory* CreateDialogFactory()
+    SAL_DLLPUBLIC_EXPORT SdAbstractDialogFactory* SdCreateDialogFactory()
     {
         static SdAbstractDialogFactory_Impl aFactory;
         return &aFactory;
diff --git a/sw/source/ui/dialog/swabstdlg.cxx b/sw/source/ui/dialog/swabstdlg.cxx
index db26ac1..74fde17 100644
--- a/sw/source/ui/dialog/swabstdlg.cxx
+++ b/sw/source/ui/dialog/swabstdlg.cxx
@@ -46,7 +46,7 @@ SwAbstractDialogFactory* SwAbstractDialogFactory::Create()
     if ( aDialogLibrary.is() || aDialogLibrary.loadRelative( &thisModule, sLibName,
                                                              SAL_LOADMODULE_GLOBAL | SAL_LOADMODULE_LAZY ) )
         fp = ( SwAbstractDialogFactory* (SAL_CALL*)() )
-            aDialogLibrary.getFunctionSymbol( OUString("CreateDialogFactory"));
+            aDialogLibrary.getFunctionSymbol( OUString("SwCreateDialogFactory"));
 #else
     fp = SwCreateDialogFactory();
 #endif
diff --git a/sw/source/ui/dialog/swuiexp.cxx b/sw/source/ui/dialog/swuiexp.cxx
index 7b92e892..f2139af 100644
--- a/sw/source/ui/dialog/swuiexp.cxx
+++ b/sw/source/ui/dialog/swuiexp.cxx
@@ -33,13 +33,9 @@ namespace swui
     }
 }
 
-#ifdef DISABLE_DYNLOADING
-#define CreateDialogFactory SwCreateDialogFactory
-#endif
-
 extern "C"
 {
-    SAL_DLLPUBLIC_EXPORT SwAbstractDialogFactory* CreateDialogFactory()
+    SAL_DLLPUBLIC_EXPORT SwAbstractDialogFactory* SwCreateDialogFactory()
     {
         return ::swui::GetFactory();
     }
commit 193d15277cfa23e6bd03cf723095c00de3c630b1
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Thu Feb 20 07:57:16 2014 +0100

    EXTERNAL_WARNINGS_NOT_ERRORS -> ENABLE_WERROR and be "TRUE"/""
    
    It's easier to type 'make ENABLE_WERROR= <module>' if one wants that.
    
    Change-Id: I2bb9911259f41ecae27dc110723f3364b3ff09cf

diff --git a/compilerplugins/Makefile-clang.mk b/compilerplugins/Makefile-clang.mk
index 1121d32..b7d8212 100644
--- a/compilerplugins/Makefile-clang.mk
+++ b/compilerplugins/Makefile-clang.mk
@@ -32,7 +32,7 @@ CLANGOUTDIR=$(BUILDDIR)/compilerplugins/obj
 
 QUIET=$(if $(VERBOSE)$(verbose),,@)
 
-ifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
+ifneq ($(ENABLE_WERROR),)
 CLANGWERROR := -Werror
 endif
 
diff --git a/config_host.mk.in b/config_host.mk.in
index 5f9a751..2e81fec 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -170,11 +170,11 @@ export ENABLE_TDEAB=@ENABLE_TDEAB@
 export ENABLE_TELEPATHY=@ENABLE_TELEPATHY@
 export ENABLE_VALGRIND=@ENABLE_VALGRIND@
 export ENABLE_VLC=@ENABLE_VLC@
+export ENABLE_WERROR=@ENABLE_WERROR@
 export EPM=@EPM@
 export EPM_FLAGS=@EPM_FLAGS@
 export ETONYEK_CFLAGS=$(gb_SPACE)@ETONYEK_CFLAGS@
 export ETONYEK_LIBS=$(gb_SPACE)@ETONYEK_LIBS@
-export EXTERNAL_WARNINGS_NOT_ERRORS=@EXTERNAL_WARNINGS_NOT_ERRORS@
 export debug=@ENABLE_DEBUG@
 @x_Cygwin@ export FIND=@WIN_FIND@
 export FIREBIRD_CFLAGS=$(gb_SPACE)@FIREBIRD_CFLAGS@
diff --git a/configure.ac b/configure.ac
index 5576172..9c317cc 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4636,13 +4636,12 @@ dnl Set the ENABLE_WERROR variable. (Activate --enable-werror)
 dnl ===================================================================
 AC_MSG_CHECKING([whether to turn warnings to errors])
 if test -n "$enable_werror" -a "$enable_werror" != "no"; then
-    EXTERNAL_WARNINGS_NOT_ERRORS="FALSE"
+    ENABLE_WERROR="TRUE"
     AC_MSG_RESULT([yes])
 else
-    EXTERNAL_WARNINGS_NOT_ERRORS="TRUE"
     AC_MSG_RESULT([no])
 fi
-AC_SUBST(EXTERNAL_WARNINGS_NOT_ERRORS)
+AC_SUBST(ENABLE_WERROR)
 
 dnl Set the ASSERT_ALWAYS_ABORT variable. (Activate --enable-assert-always-abort)
 dnl ===================================================================
diff --git a/external/clucene/Makefile b/external/clucene/Makefile
index 37fff27..e4968cf 100644
--- a/external/clucene/Makefile
+++ b/external/clucene/Makefile
@@ -1,8 +1,4 @@
 # -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
-#
-
-EXTERNAL_WARNINGS_NOT_ERRORS := TRUE
-export EXTERNAL_WARNINGS_NOT_ERRORS
 
 module_directory:=$(dir $(realpath $(firstword $(MAKEFILE_LIST))))
 
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index de77c7b..e4c105c 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -92,7 +92,7 @@ gb_CXXFLAGS_COMMON += -fvisibility-inlines-hidden
 endif
 endif
 
-ifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
+ifneq ($(ENABLE_WERROR),)
 gb_CFLAGS_WERROR := -Werror
 gb_CXXFLAGS_WERROR := -Werror
 endif
diff --git a/solenv/gbuild/platform/com_MSC_defs.mk b/solenv/gbuild/platform/com_MSC_defs.mk
index f339609..9f050e9 100644
--- a/solenv/gbuild/platform/com_MSC_defs.mk
+++ b/solenv/gbuild/platform/com_MSC_defs.mk
@@ -244,7 +244,7 @@ gb_PCHWARNINGS = \
 gb_STDLIBS := \
 	advapi32.lib \
 
-ifneq ($(EXTERNAL_WARNINGS_NOT_ERRORS),TRUE)
+ifneq ($(ENABLE_WERROR),)
 gb_CFLAGS_WERROR := -WX
 gb_CXXFLAGS_WERROR := -WX
 endif


More information about the Libreoffice-commits mailing list