[Libreoffice-commits] .: Branch 'libreoffice-3-6' - 4 commits - solenv/gbuild ucb/source
Michael Stahl
mst at kemper.freedesktop.org
Thu Jun 7 05:34:10 PDT 2012
solenv/gbuild/InstallModule.mk | 2 +-
solenv/gbuild/InternalUnoApi.mk | 6 +++++-
solenv/gbuild/Package.mk | 11 ++++++++---
solenv/gbuild/UnoApi.mk | 4 ++--
ucb/source/inc/regexpmap.tpt | 35 ++++++++++++++++++++++++++++++++++-
5 files changed, 50 insertions(+), 8 deletions(-)
New commits:
commit c5ec146a759cdbf7d38714ceb382fba1b59ce67a
Author: Michael Stahl <mstahl at redhat.com>
Date: Thu Jun 7 14:04:06 2012 +0200
gbuild: introduce gb_Package_Package_internal:
The gb_InternalUnoApi_set_xmlfile function creates a new package, which
registers at the current Module, overwriting the InternalUnoApi targets set
there and causing make clean not to clean the InternalUnoApi.
Change-Id: I46e9b4437788a479701187334325fe1e065e612c
(cherry picked from commit 31a353719851b08664b7f13ca59f39a993e66ba6)
diff --git a/solenv/gbuild/InstallModule.mk b/solenv/gbuild/InstallModule.mk
index c04e151..f1b9dbe 100644
--- a/solenv/gbuild/InstallModule.mk
+++ b/solenv/gbuild/InstallModule.mk
@@ -40,7 +40,7 @@ $(call gb_InstallModule_get_clean_target,%) :
define gb_InstallModule_InstallModule
$(call gb_InstallModuleTarget_InstallModuleTarget,$(1))
-$(call gb_Package_Package,$(1)_par,$(call gb_InstallModuleTarget_get_workdir,$(1)))
+$(call gb_Package_Package_internal,$(1)_par,$(call gb_InstallModuleTarget_get_workdir,$(1)))
$(call gb_InstallModule_get_target,$(1)) : $(call gb_InstallModuleTarget_get_target,$(1))
$(call gb_InstallModule_get_target,$(1)) : $(call gb_Package_get_target,$(1)_par)
diff --git a/solenv/gbuild/InternalUnoApi.mk b/solenv/gbuild/InternalUnoApi.mk
index f5c2aa2..a32984f 100644
--- a/solenv/gbuild/InternalUnoApi.mk
+++ b/solenv/gbuild/InternalUnoApi.mk
@@ -113,8 +113,12 @@ endef
define gb_InternalUnoApi_set_xmlfile
$(call gb_UnoApiTarget_set_xmlfile,$(1)_out,$(2))
-$(call gb_Package_Package,$(1)_xml,$(SRCDIR))
+$(call gb_Package_Package_internal,$(1)_xml,$(SRCDIR))
$(call gb_Package_add_file,$(1)_xml,xml/$(notdir $(2)),$(2))
+$(call gb_InternalUnoApi_get_target,$(1)) :| \
+ $(call gb_Package_get_target,$(1)_xml)
+$(call gb_InternalUnoApi_get_clean_target,$(1)) : \
+ $(call gb_Package_get_clean_target,$(1)_xml)
endef
diff --git a/solenv/gbuild/Package.mk b/solenv/gbuild/Package.mk
index 02d447c..e1d199e 100644
--- a/solenv/gbuild/Package.mk
+++ b/solenv/gbuild/Package.mk
@@ -67,15 +67,20 @@ $(call gb_Package_get_target,%) :
$(call gb_Output_announce,$*,$(true),PKG,2)
mkdir -p $(dir $@) && touch $@
-
-define gb_Package_Package
+# for other targets that want to create Packages, does not register at Module
+define gb_Package_Package_internal
gb_Package_SOURCEDIR_$(1) := $(2)
$(call gb_Package_get_clean_target,$(1)) : FILES := $(call gb_Package_get_target,$(1)) $(call gb_Package_get_preparation_target,$(1))
-$$(eval $$(call gb_Module_register_target,$(call gb_Package_get_target,$(1)),$(call gb_Package_get_clean_target,$(1))))
$(call gb_Package_get_target,$(1)) : $(call gb_Package_get_preparation_target,$(1))
endef
+define gb_Package_Package
+$(call gb_Package_Package_internal,$(1),$(2))
+$$(eval $$(call gb_Module_register_target,$(call gb_Package_get_target,$(1)),$(call gb_Package_get_clean_target,$(1))))
+
+endef
+
define gb_Package_add_file
$(call gb_Package_get_target,$(1)) : $(OUTDIR)/$(2)
$(call gb_Package_get_clean_target,$(1)) : FILES += $(OUTDIR)/$(2)
diff --git a/solenv/gbuild/UnoApi.mk b/solenv/gbuild/UnoApi.mk
index 6455999..3619e9a 100644
--- a/solenv/gbuild/UnoApi.mk
+++ b/solenv/gbuild/UnoApi.mk
@@ -33,8 +33,8 @@ $(call gb_UnoApi_get_clean_target,%) :
define gb_UnoApi_UnoApi
$(call gb_UnoApiTarget_UnoApiTarget,$(1))
$(call gb_UnoApiHeadersTarget_UnoApiHeadersTarget,$(1))
-$(call gb_Package_Package,$(1)_idl,$(SRCDIR))
-$(call gb_Package_Package,$(1)_inc,$(call gb_UnoApiHeadersTarget_get_dir,$(1)))
+$(call gb_Package_Package_internal,$(1)_idl,$(SRCDIR))
+$(call gb_Package_Package_internal,$(1)_inc,$(call gb_UnoApiHeadersTarget_get_dir,$(1)))
$(call gb_UnoApiTarget_set_root,$(1),UCR)
commit 20b7bf008b1dcdf402de81c19e3cbd1284048cb2
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Jun 6 12:41:41 2012 +0200
Do not copy etc. singular iterator values.
This also reverts previous attempts at fixing this, commits
33839f90e6f8275a584b483827585a6da05aab75 "ucb: try to fix weird STL assertion on
tinderbox" and 6506af86b5e20a860c8d2d1dd578a22914df5f53 "ucb: second try to fix
weird STL assertion on tinderbox."
Change-Id: I89d0eb87fbd164c0a4cf24d60f225767cb2bfc1a
(cherry picked from commit 9631f96acae6bd179d40ee343ce986296f490741)
diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx
index fec9972..64a412b 100644
--- a/ucb/source/core/ucb.cxx
+++ b/ucb/source/core/ucb.cxx
@@ -399,7 +399,7 @@ UniversalContentBroker::registerContentProvider(
{
osl::MutexGuard aGuard(m_aMutex);
- ProviderMap_Impl::iterator aIt(m_aProviders.end());
+ ProviderMap_Impl::iterator aIt;
try
{
aIt = m_aProviders.find(Scheme);
@@ -445,7 +445,7 @@ void SAL_CALL UniversalContentBroker::deregisterContentProvider(
{
osl::MutexGuard aGuard(m_aMutex);
- ProviderMap_Impl::iterator aMapIt(m_aProviders.end());
+ ProviderMap_Impl::iterator aMapIt;
try
{
aMapIt = m_aProviders.find(Scheme);
diff --git a/ucb/source/inc/regexpmap.hxx b/ucb/source/inc/regexpmap.hxx
index e023633..717a077 100644
--- a/ucb/source/inc/regexpmap.hxx
+++ b/ucb/source/inc/regexpmap.hxx
@@ -101,6 +101,8 @@ class RegexpMapIter: public RegexpMapConstIter< Val >
friend class RegexpMap< Val >; // to access ctor
public:
+ RegexpMapIter() {}
+
RegexpMapIter & operator ++();
RegexpMapIter operator ++(int);
diff --git a/ucb/source/inc/regexpmap.tpt b/ucb/source/inc/regexpmap.tpt
index 64abc37..b4e274a 100644
--- a/ucb/source/inc/regexpmap.tpt
+++ b/ucb/source/inc/regexpmap.tpt
@@ -74,11 +74,19 @@ public:
typedef RegexpMapImpl< Val > MapImpl;
typedef typename List< Val >::iterator ListIterator;
+ // Solaris needs these for the ctor...
+
+ inline RegexpMapIterImpl();
+
inline RegexpMapIterImpl(MapImpl * pTheMap, int nTheList,
ListIterator aTheIndex);
RegexpMapIterImpl(RegexpMapImpl< Val > * pTheMap, bool bBegin);
+ RegexpMapIterImpl(RegexpMapIterImpl const & rOther);
+
+ RegexpMapIterImpl & operator =(RegexpMapIterImpl const & rOther);
+
bool operator ==(RegexpMapIterImpl const & rOther) const;
RegexpMapImpl< Val > const * getMap() const { return m_pMap; }
@@ -92,8 +100,6 @@ public:
RegexpMapEntry< Val > & get();
private:
- RegexpMapIterImpl(); // not implemented
-
mutable RegexpMapEntry< Val > m_aEntry;
typename List< Val >::iterator m_aIndex;
RegexpMapImpl< Val > * m_pMap;
@@ -106,6 +112,14 @@ private:
}
template< typename Val >
+inline RegexpMapIterImpl< Val >::RegexpMapIterImpl():
+ m_aEntry(rtl::OUString(), 0),
+ m_pMap(0),
+ m_nList(-1),
+ m_bEntrySet(false)
+{}
+
+template< typename Val >
inline RegexpMapIterImpl< Val >::RegexpMapIterImpl(MapImpl * pTheMap,
int nTheList,
ListIterator aTheIndex):
@@ -134,11 +148,10 @@ void RegexpMapIterImpl< Val >::setEntry() const
//============================================================================
template< typename Val >
RegexpMapIterImpl< Val >::RegexpMapIterImpl(RegexpMapImpl< Val > * pTheMap,
- bool bBegin)
- : m_aEntry(rtl::OUString(), 0)
- , m_aIndex(pTheMap->m_aList[Regexp::KIND_DOMAIN].end())
- , m_pMap(pTheMap)
- , m_bEntrySet(false)
+ bool bBegin):
+ m_aEntry(rtl::OUString(), 0),
+ m_pMap(pTheMap),
+ m_bEntrySet(false)
{
if (bBegin)
{
@@ -149,17 +162,47 @@ RegexpMapIterImpl< Val >::RegexpMapIterImpl(RegexpMapImpl< Val > * pTheMap,
else
{
m_nList = Regexp::KIND_DOMAIN;
+ m_aIndex = m_pMap->m_aList[Regexp::KIND_DOMAIN].end();
}
}
//============================================================================
template< typename Val >
+RegexpMapIterImpl< Val >::RegexpMapIterImpl(RegexpMapIterImpl const & rOther):
+ m_aEntry(rOther.m_aEntry), m_pMap(rOther.m_pMap), m_nList(rOther.m_nList),
+ m_bEntrySet(rOther.m_bEntrySet)
+{
+ if (m_nList != -1)
+ m_aIndex = rOther.m_aIndex;
+}
+
+//============================================================================
+template< typename Val >
+RegexpMapIterImpl< Val > & RegexpMapIterImpl< Val >::operator =(
+ RegexpMapIterImpl const & rOther)
+{
+ if (this != &rOther)
+ {
+ m_aEntry = rOther.m_aEntry;
+ m_pMap = rOther.m_pMap;
+ m_nList = rOther.m_nList;
+ m_bEntrySet = rOther.m_bEntrySet;
+ if (m_nList == -1)
+ m_aIndex = typename List< Val >::iterator();
+ else
+ m_aIndex = rOther.m_aIndex;
+ }
+ return *this;
+}
+
+//============================================================================
+template< typename Val >
bool RegexpMapIterImpl< Val >::operator ==(RegexpMapIterImpl const & rOther)
const
{
return m_pMap == rOther.m_pMap
&& m_nList == rOther.m_nList
- && m_aIndex == rOther.m_aIndex;
+ && (m_nList == -1 || m_aIndex == rOther.m_aIndex);
}
//============================================================================
commit f28e7ef1877de10467e574edac0dd679f42ab31c
Author: Michael Stahl <mstahl at redhat.com>
Date: Wed Jun 6 11:54:24 2012 +0200
ucb: second try to fix weird STL assertion on tinderbox
It's possible that the constructor of RegexpMapIterImpl does not
initialize m_aIndex, so try to park m_aIndex on some end() iterator;
it looks like m_aIndex will not actually be used in this case, because
m_nList = -1.
Change-Id: I74cd0d1d87f3e90217c39bcd3168f157066ff3cb
(cherry picked from commit 6506af86b5e20a860c8d2d1dd578a22914df5f53)
diff --git a/ucb/source/inc/regexpmap.tpt b/ucb/source/inc/regexpmap.tpt
index 0090029..64abc37 100644
--- a/ucb/source/inc/regexpmap.tpt
+++ b/ucb/source/inc/regexpmap.tpt
@@ -134,10 +134,11 @@ void RegexpMapIterImpl< Val >::setEntry() const
//============================================================================
template< typename Val >
RegexpMapIterImpl< Val >::RegexpMapIterImpl(RegexpMapImpl< Val > * pTheMap,
- bool bBegin):
- m_aEntry(rtl::OUString(), 0),
- m_pMap(pTheMap),
- m_bEntrySet(false)
+ bool bBegin)
+ : m_aEntry(rtl::OUString(), 0)
+ , m_aIndex(pTheMap->m_aList[Regexp::KIND_DOMAIN].end())
+ , m_pMap(pTheMap)
+ , m_bEntrySet(false)
{
if (bBegin)
{
@@ -148,7 +149,6 @@ RegexpMapIterImpl< Val >::RegexpMapIterImpl(RegexpMapImpl< Val > * pTheMap,
else
{
m_nList = Regexp::KIND_DOMAIN;
- m_aIndex = m_pMap->m_aList[Regexp::KIND_DOMAIN].end();
}
}
commit b38db9ac9117e9bc5cb280f5c0faf497e9360122
Author: Michael Stahl <mstahl at redhat.com>
Date: Tue Jun 5 23:37:15 2012 +0200
ucb: try to fix weird STL assertion on tinderbox
Seems there's uninitialized iterators somewhere, let's try if removing
the silly default constructor here improves anything.
Change-Id: I2ba239df9b532805e177378f9fa35023d087716a
(cherry picked from commit 33839f90e6f8275a584b483827585a6da05aab75)
diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx
index 64a412b..fec9972 100644
--- a/ucb/source/core/ucb.cxx
+++ b/ucb/source/core/ucb.cxx
@@ -399,7 +399,7 @@ UniversalContentBroker::registerContentProvider(
{
osl::MutexGuard aGuard(m_aMutex);
- ProviderMap_Impl::iterator aIt;
+ ProviderMap_Impl::iterator aIt(m_aProviders.end());
try
{
aIt = m_aProviders.find(Scheme);
@@ -445,7 +445,7 @@ void SAL_CALL UniversalContentBroker::deregisterContentProvider(
{
osl::MutexGuard aGuard(m_aMutex);
- ProviderMap_Impl::iterator aMapIt;
+ ProviderMap_Impl::iterator aMapIt(m_aProviders.end());
try
{
aMapIt = m_aProviders.find(Scheme);
diff --git a/ucb/source/inc/regexpmap.hxx b/ucb/source/inc/regexpmap.hxx
index 717a077..e023633 100644
--- a/ucb/source/inc/regexpmap.hxx
+++ b/ucb/source/inc/regexpmap.hxx
@@ -101,8 +101,6 @@ class RegexpMapIter: public RegexpMapConstIter< Val >
friend class RegexpMap< Val >; // to access ctor
public:
- RegexpMapIter() {}
-
RegexpMapIter & operator ++();
RegexpMapIter operator ++(int);
diff --git a/ucb/source/inc/regexpmap.tpt b/ucb/source/inc/regexpmap.tpt
index 4fe69a6..0090029 100644
--- a/ucb/source/inc/regexpmap.tpt
+++ b/ucb/source/inc/regexpmap.tpt
@@ -74,10 +74,6 @@ public:
typedef RegexpMapImpl< Val > MapImpl;
typedef typename List< Val >::iterator ListIterator;
- // Solaris needs these for the ctor...
-
- inline RegexpMapIterImpl();
-
inline RegexpMapIterImpl(MapImpl * pTheMap, int nTheList,
ListIterator aTheIndex);
@@ -96,6 +92,8 @@ public:
RegexpMapEntry< Val > & get();
private:
+ RegexpMapIterImpl(); // not implemented
+
mutable RegexpMapEntry< Val > m_aEntry;
typename List< Val >::iterator m_aIndex;
RegexpMapImpl< Val > * m_pMap;
@@ -108,14 +106,6 @@ private:
}
template< typename Val >
-inline RegexpMapIterImpl< Val >::RegexpMapIterImpl():
- m_aEntry(rtl::OUString(), 0),
- m_pMap(0),
- m_nList(-1),
- m_bEntrySet(false)
-{}
-
-template< typename Val >
inline RegexpMapIterImpl< Val >::RegexpMapIterImpl(MapImpl * pTheMap,
int nTheList,
ListIterator aTheIndex):
More information about the Libreoffice-commits
mailing list