[Libreoffice-commits] .: 6 commits - config_host.mk.in configure.in connectivity/source registry/source sal/inc sal/osl sal/Package_inc.mk sal/rtl sal/textenc solenv/gbuild store/source unotools/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Sep 14 01:54:38 PDT 2012
config_host.mk.in | 1
configure.in | 17 +++++++++++
connectivity/source/drivers/odbcbase/OConnection.cxx | 2 +
registry/source/reflcnst.hxx | 6 +++-
registry/source/reflwrit.cxx | 13 +++++++--
sal/Package_inc.mk | 1
sal/inc/sal/macros.h | 27 +++++++++++--------
sal/inc/sal/saldllapi.h | 15 ----------
sal/inc/sal/types.h | 6 +++-
sal/osl/unx/pipe.c | 2 -
sal/osl/unx/security.c | 2 -
sal/rtl/source/alloc_arena.cxx | 11 ++++++-
sal/rtl/source/alloc_cache.cxx | 27 ++++++++++++++-----
sal/rtl/source/alloc_global.cxx | 2 -
sal/textenc/converter.hxx | 3 --
sal/textenc/convertsimple.hxx | 3 --
sal/textenc/handleundefinedunicodetotextchar.hxx | 3 --
solenv/gbuild/gbuild.mk | 6 ++++
store/source/stordata.hxx | 4 +-
store/source/storlckb.cxx | 21 +++++++++++---
unotools/source/ucbhelper/ucblockbytes.cxx | 5 ++-
21 files changed, 117 insertions(+), 60 deletions(-)
New commits:
commit 1126ecef0914b2fc36441d8e2fe8c9b49862db8a
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Fri Sep 14 02:05:01 2012 -0500
WaE in connectivity
Change-Id: I2c9e83611fab1e9c4c998af68648df994f89cd6b
diff --git a/connectivity/source/drivers/odbcbase/OConnection.cxx b/connectivity/source/drivers/odbcbase/OConnection.cxx
index 8f362d0..70edeb7 100644
--- a/connectivity/source/drivers/odbcbase/OConnection.cxx
+++ b/connectivity/source/drivers/odbcbase/OConnection.cxx
@@ -113,6 +113,8 @@ SQLRETURN OConnection::OpenConnection(const ::rtl::OUString& aConnectStr,sal_Int
#ifndef MACOSX
N3SQLSetConnectAttr(m_aConnectionHandle,SQL_ATTR_LOGIN_TIMEOUT,(SQLPOINTER)(sal_IntPtr)nTimeOut,SQL_IS_UINTEGER);
+#else
+ (void)nTimeOut; /* WaE */
#endif
#ifdef LINUX
commit 445c647a52f21fe402afc5c60505e151e035f019
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Fri Sep 14 02:04:07 2012 -0500
add a configure option to make assert() abort in release code
Change-Id: I93720ee3338426174b31a6ea6dba3af7ffb7e207
diff --git a/config_host.mk.in b/config_host.mk.in
index 3ad7e49..3c7d46f 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -21,6 +21,7 @@ export ANDROID_NDK_TOOLCHAIN_VERSION_SUBDIR=@ANDROID_NDK_TOOLCHAIN_VERSION_SUBDI
export ANDROID_NDK_GDBSERVER=@ANDROID_NDK_GDBSERVER@
export ANDROID_SDK_HOME=@ANDROID_SDK_HOME@
export AR=@AR@
+export ASSERT_ALWAYS_ABORT=@ASSERT_ALWAYS_ABORT@
export ATL_INCLUDE=@ATL_INCLUDE@
export ATL_LIB=@ATL_LIB@
export AWTLIB=@AWTLIB@
diff --git a/configure.in b/configure.in
index 5cb6463..64cba65 100644
--- a/configure.in
+++ b/configure.in
@@ -756,6 +756,11 @@ AC_ARG_ENABLE(werror,
of warnings as errors is disabled explicitly.)]),
,)
+AC_ARG_ENABLE(assert-always-abort,
+ AS_HELP_STRING([--enable-assert-always-abort],
+ [make assert() abort even in release code.]),
+,)
+
AC_ARG_ENABLE(debug,
AS_HELP_STRING([--enable-debug],
[Include debugging information like with --enable-symbols, disable
@@ -4011,6 +4016,18 @@ else
fi
AC_SUBST(EXTERNAL_WARNINGS_NOT_ERRORS)
+dnl Set the ASSERT_ALWAYS_ABORT variable. (Activate --enable-assert-always-abort)
+dnl ===================================================================
+AC_MSG_CHECKING([whether to have assert to abort in release code])
+if test -n "$enable_assert_always_abort" -a "$enable_assert_always_abort" = "yes"; then
+ ASSERT_ALWAYS_ABORT="TRUE"
+ AC_MSG_RESULT([yes])
+else
+ ASSERT_ALWAYS_ABORT="FALSE"
+ AC_MSG_RESULT([no])
+fi
+AC_SUBST(ASSERT_ALWAYS_ABORT)
+
dnl Set the ENABLE_DEBUG variable.
dnl ===================================================================
AC_MSG_CHECKING([whether to do a debug build])
diff --git a/sal/inc/sal/macros.h b/sal/inc/sal/macros.h
index 6f10585..bb0e46e 100644
--- a/sal/inc/sal/macros.h
+++ b/sal/inc/sal/macros.h
@@ -31,6 +31,22 @@
#include <stddef.h>
+/* we want to be able to compile release code while retaining the abort capabilities of assert().
+ * This presume that this include is called early... i.e before anyone else included assert.h
+ * which should more often than not be the case since macros.h is included by sal/types.h
+ * which is included at the top of most source (or should be)
+ */
+#ifdef ASSERT_ALWAYS_ABORT
+# ifdef NDEBUG
+# undef NDEBUG
+# include <assert.h>
+# define NDEBUG
+# else /* Ndef NDEBUG */
+# include <assert.h>
+# endif /* Ndef NDEBUG */
+#else /* NDef ASSERT_ALWAYS_ABORT */
+# include <assert.h>
+#endif /* NDef ASSERT_ALWAYS_ABORT */
#ifndef SAL_N_ELEMENTS
# if defined(__cplusplus) && ( defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L )
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index d9da37d..a073e39 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -228,6 +228,12 @@ gb_GLOBALDEFS += \
endif
endif
+ifeq ($(strip $(ASSERT_ALWAYS_ABORT)),TRUE)
+gb_GLOBALDEFS += \
+ -DASSERT_ALWAYS_ABORT \
+
+endif
+
ifneq ($(strip $(ENABLE_GTK)),)
gb_GLOBALDEFS += -DENABLE_GTK
endif
commit b42094b2b06f4837a6df65e6b87caf8139fc0d0d
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Fri Sep 14 01:42:30 2012 -0500
remove use of SAL_MIN() macro
Change-Id: Ia91118388240c9a54d010b94aef34ad528ce5761
diff --git a/registry/source/reflcnst.hxx b/registry/source/reflcnst.hxx
index fa53d8e..009dcdb 100644
--- a/registry/source/reflcnst.hxx
+++ b/registry/source/reflcnst.hxx
@@ -258,7 +258,11 @@ inline sal_uInt32 writeUtf8(sal_uInt8* buffer, const sal_Char* v)
inline sal_uInt32 readUtf8(const sal_uInt8* buffer, sal_Char* v, sal_uInt32 maxSize)
{
- sal_uInt32 size = SAL_MIN(strlen((const sal_Char*) buffer) + 1, maxSize);
+ sal_uInt32 size = strlen((const sal_Char*) buffer) + 1;
+ if(size > maxSize)
+ {
+ size = maxSize;
+ }
memcpy(v, buffer, size);
diff --git a/registry/source/reflwrit.cxx b/registry/source/reflwrit.cxx
index 1c644e9..25fbef6 100644
--- a/registry/source/reflwrit.cxx
+++ b/registry/source/reflwrit.cxx
@@ -116,10 +116,15 @@ sal_uInt32 writeString(sal_uInt8* buffer, const sal_Unicode* v)
sal_uInt32 readString(const sal_uInt8* buffer, sal_Unicode* v, sal_uInt32 maxSize)
{
- sal_uInt32 len = SAL_MIN(UINT16StringLen(buffer) + 1, maxSize / 2);
+ sal_uInt32 len = UINT16StringLen(buffer) + 1;
sal_uInt32 i;
sal_uInt8* buff = (sal_uInt8*)buffer;
+ if(len > maxSize / 2)
+ {
+ len = maxSize / 2;
+ }
+
for (i = 0; i < (len - 1); i++)
{
sal_uInt16 aChar;
@@ -615,8 +620,9 @@ void MethodEntry::reallocParams(sal_uInt16 size)
if (m_paramCount)
{
sal_uInt16 i;
+ sal_uInt16 mn = size < m_paramCount ? size : m_paramCount;
- for (i = 0; i < SAL_MIN(size, m_paramCount); i++)
+ for (i = 0; i < mn; i++)
{
newParams[i].setData(m_params[i].m_typeName, m_params[i].m_name, m_params[i].m_mode);
}
@@ -638,8 +644,9 @@ void MethodEntry::reallocExcs(sal_uInt16 size)
newExcNames = NULL;
sal_uInt16 i;
+ sal_uInt16 mn = size < m_excCount ? size : m_excCount;
- for (i = 0; i < SAL_MIN(size, m_excCount); i++)
+ for (i = 0; i < mn; i++)
{
newExcNames[i] = m_excNames[i];
}
diff --git a/sal/inc/sal/macros.h b/sal/inc/sal/macros.h
index fb52d3c..6f10585 100644
--- a/sal/inc/sal/macros.h
+++ b/sal/inc/sal/macros.h
@@ -32,10 +32,6 @@
#include <stddef.h>
-#ifndef SAL_MIN
-# define SAL_MIN(a,b) (((a) < (b)) ? (a) : (b))
-#endif
-
#ifndef SAL_N_ELEMENTS
# if defined(__cplusplus) && ( defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L )
/*
diff --git a/sal/osl/unx/pipe.c b/sal/osl/unx/pipe.c
index 48b3f38..5185590 100644
--- a/sal/osl/unx/pipe.c
+++ b/sal/osl/unx/pipe.c
@@ -179,7 +179,7 @@ cpyBootstrapSocketPath(sal_Char *name, size_t len)
OUSTRING_TO_OSTRING_CVTFLAGS);
if (pStrValue && pStrValue->length > 0)
{
- size_t nCopy = SAL_MIN (len-1, (size_t)pStrValue->length);
+ size_t nCopy = (len-1 < (size_t)pStrValue->length) ? len-1 : (size_t)pStrValue->length;
strncpy (name, pStrValue->buffer, nCopy);
name[nCopy] = '\0';
bRet = (size_t)pStrValue->length < len;
diff --git a/sal/osl/unx/security.c b/sal/osl/unx/security.c
index 96605fc..e138ba8 100644
--- a/sal/osl/unx/security.c
+++ b/sal/osl/unx/security.c
@@ -327,7 +327,7 @@ static sal_Bool SAL_CALL osl_psz_getHomeDir(oslSecurity Security, sal_Char* pszD
OUSTRING_TO_OSTRING_CVTFLAGS);
if (pStrValue && pStrValue->length > 0)
{
- sal_Int32 nCopy = SAL_MIN ((sal_Int32)(nMax-1), pStrValue->length);
+ sal_Int32 nCopy = (sal_Int32)(nMax-1) < pStrValue->length ? (sal_Int32)(nMax-1) : pStrValue->length ;
strncpy (pszDirectory, pStrValue->buffer, nCopy);
pszDirectory[nCopy] = '\0';
bRet = (size_t)pStrValue->length < nMax;
diff --git a/sal/rtl/source/alloc_cache.cxx b/sal/rtl/source/alloc_cache.cxx
index 8e68602..a29b078 100644
--- a/sal/rtl/source/alloc_cache.cxx
+++ b/sal/rtl/source/alloc_cache.cxx
@@ -658,7 +658,10 @@ rtl_cache_depot_dequeue (
/* update depot stats */
depot->m_mag_count--;
- depot->m_curr_min = SAL_MIN(depot->m_curr_min, depot->m_mag_count);
+ if(depot->m_curr_min > depot->m_mag_count)
+ {
+ depot->m_curr_min = depot->m_mag_count;
+ }
}
return (mag);
}
@@ -1470,7 +1473,7 @@ rtl_cache_depot_wsupdate (
depot->m_prev_min = depot->m_curr_min;
depot->m_curr_min = depot->m_mag_count;
- npurge = SAL_MIN(depot->m_curr_min, depot->m_prev_min);
+ npurge = depot->m_curr_min < depot->m_prev_min ? depot->m_curr_min : depot->m_prev_min;
for (; npurge > 0; npurge--)
{
rtl_cache_magazine_type * mag = rtl_cache_depot_dequeue (depot);
diff --git a/sal/rtl/source/alloc_global.cxx b/sal/rtl/source/alloc_global.cxx
index 59213a1..7ac963c 100644
--- a/sal/rtl/source/alloc_global.cxx
+++ b/sal/rtl/source/alloc_global.cxx
@@ -170,7 +170,7 @@ void * SAL_CALL rtl_reallocateMemory_CUSTOM (void * p, sal_Size n) SAL_THROW_EXT
p = rtl_allocateMemory (n);
if (p != 0)
{
- memcpy (p, p_old, SAL_MIN(n, n_old));
+ memcpy (p, p_old, (n < n_old) ? n : n_old);
rtl_freeMemory (p_old);
}
}
diff --git a/store/source/stordata.hxx b/store/source/stordata.hxx
index cbf5cd2..cbd0044 100644
--- a/store/source/stordata.hxx
+++ b/store/source/stordata.hxx
@@ -732,11 +732,11 @@ public:
return rtl_crc32 (nPath, pszName, rtl_str_getLength(pszName));
}
- sal_Size getName (sal_Char * pBuffer, sal_Size nBufsiz) const
+ sal_Size getName (sal_Char * pBuffer, sal_Size nBufsize) const
{
sal_Char const * pszName = PAGE().m_aNameBlock.m_pData;
sal_Size nLength = rtl_str_getLength(pszName);
- memcpy (pBuffer, pszName, SAL_MIN(nLength, nBufsiz));
+ memcpy (pBuffer, pszName, nLength < nBufsize ? nLength : nBufsize);
return nLength;
}
diff --git a/store/source/storlckb.cxx b/store/source/storlckb.cxx
index f9c0ff2..539bf37 100644
--- a/store/source/storlckb.cxx
+++ b/store/source/storlckb.cxx
@@ -167,8 +167,10 @@ storeError OStoreLockBytes::readAt (
nOffset, m_xNode->capacity());
sal_uInt32 nLength = sal_uInt32(aDescr.m_nLength);
- nLength = SAL_MIN(nLength, nBytes);
-
+ if(nLength > nBytes)
+ {
+ nLength = nBytes;
+ }
memcpy (
&pData[rnDone],
&m_xNode->m_pData[aDescr.m_nOffset],
@@ -186,7 +188,10 @@ storeError OStoreLockBytes::readAt (
nOffset - m_xNode->capacity(), OStoreDataPageData::capacity(m_xNode->m_aDescr)); // @@@
sal_uInt32 nLength = sal_uInt32(aDescr.m_nLength);
- nLength = SAL_MIN(nLength, nBytes);
+ if(nLength > nBytes)
+ {
+ nLength = nBytes;
+ }
storeError eErrCode = aPage.read (aDescr.m_nPage, aData, *m_xManager);
if (eErrCode != store_E_None)
@@ -259,7 +264,10 @@ storeError OStoreLockBytes::writeAt (
nOffset, m_xNode->capacity());
sal_uInt32 nLength = sal_uInt32(aDescr.m_nLength);
- nLength = SAL_MIN(nLength, nBytes);
+ if(nLength > nBytes)
+ {
+ nLength = nBytes;
+ }
memcpy (
&m_xNode->m_pData[aDescr.m_nOffset],
@@ -312,7 +320,10 @@ storeError OStoreLockBytes::writeAt (
}
// Modify data page.
- nLength = SAL_MIN(nLength, nBytes);
+ if(nLength > nBytes)
+ {
+ nLength = nBytes;
+ }
memcpy (
&xData->m_pData[aDescr.m_nOffset],
&pData[rnDone], nLength);
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
index 037d16b..e74c83d 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -1415,7 +1415,10 @@ ErrCode UcbLockBytes::ReadAt ( sal_uLong nPos, void *pBuffer, sal_uLong nCount,
Sequence<sal_Int8> aData;
sal_Int32 nSize;
- nCount = SAL_MIN(nCount, 0x7FFFFFFF);
+ if(nCount > 0x7FFFFFFF)
+ {
+ nCount = 0x7FFFFFFF;
+ }
try
{
if ( !m_bTerminated && !IsSynchronMode() )
commit e50ab7bb891cbd7b5f95c124ce29a3e595b599ee
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Fri Sep 14 00:58:55 2012 -0500
remove SAL_MAX() macros and few users
Change-Id: I5ece116a66ab37fe64aac6c60bc38244677d499a
diff --git a/sal/inc/sal/macros.h b/sal/inc/sal/macros.h
index 5ccdee3..fb52d3c 100644
--- a/sal/inc/sal/macros.h
+++ b/sal/inc/sal/macros.h
@@ -31,9 +31,6 @@
#include <stddef.h>
-#ifndef SAL_MAX
-# define SAL_MAX(a,b) (((a) > (b)) ? (a) : (b))
-#endif
#ifndef SAL_MIN
# define SAL_MIN(a,b) (((a) < (b)) ? (a) : (b))
diff --git a/sal/rtl/source/alloc_arena.cxx b/sal/rtl/source/alloc_arena.cxx
index 1223e0e..fe066df 100644
--- a/sal/rtl/source/alloc_arena.cxx
+++ b/sal/rtl/source/alloc_arena.cxx
@@ -1011,7 +1011,7 @@ SAL_CALL rtl_arena_alloc (
/* resize */
assert(segment->m_size >= size);
oversize = segment->m_size - size;
- if (oversize >= SAL_MAX(arena->m_quantum, arena->m_qcache_max))
+ if ((oversize >= arena->m_quantum) && (oversize >= arena->m_qcache_max))
{
rtl_arena_segment_type * remainder = 0;
rtl_arena_segment_get (arena, &remainder);
@@ -1174,7 +1174,14 @@ SAL_CALL rtl_machdep_alloc (
size -= (pArena->m_quantum + pArena->m_quantum); /* "red-zone" pages */
#else
/* default allocation granularity */
- size = RTL_MEMORY_P2ROUNDUP(size, SAL_MAX(pArena->m_quantum, 64 << 10));
+ if(pArena->m_quantum < (64 << 10))
+ {
+ size = RTL_MEMORY_P2ROUNDUP(size, (64 << 10));
+ }
+ else
+ {
+ size = RTL_MEMORY_P2ROUNDUP(size, pArena->m_quantum);
+ }
#endif
#if defined(SAL_UNX)
diff --git a/sal/rtl/source/alloc_cache.cxx b/sal/rtl/source/alloc_cache.cxx
index e5352bb..8e68602 100644
--- a/sal/rtl/source/alloc_cache.cxx
+++ b/sal/rtl/source/alloc_cache.cxx
@@ -838,7 +838,10 @@ rtl_cache_activate (
snprintf (cache->m_name, sizeof(cache->m_name), "%s", name);
/* ensure minimum size (embedded bufctl linkage) */
- objsize = SAL_MAX(objsize, sizeof(rtl_cache_bufctl_type*));
+ if(objsize < sizeof(rtl_cache_bufctl_type*))
+ {
+ objsize = sizeof(rtl_cache_bufctl_type*);
+ }
if (objalign == 0)
{
@@ -851,7 +854,10 @@ rtl_cache_activate (
else
{
/* ensure minimum alignment */
- objalign = SAL_MAX(objalign, RTL_MEMORY_ALIGNMENT_4);
+ if(objalign < RTL_MEMORY_ALIGNMENT_4)
+ {
+ objalign = RTL_MEMORY_ALIGNMENT_4;
+ }
}
assert(RTL_MEMORY_ISP2(objalign));
@@ -871,12 +877,18 @@ rtl_cache_activate (
if (flags & RTL_CACHE_FLAG_QUANTUMCACHE)
{
/* next power of 2 above 3 * qcache_max */
- slabsize = SAL_MAX(slabsize, (1UL << highbit(3 * source->m_qcache_max)));
+ if(slabsize < (1UL << highbit(3 * source->m_qcache_max)))
+ {
+ slabsize = (1UL << highbit(3 * source->m_qcache_max));
+ }
}
else
{
/* waste at most 1/8 of slab */
- slabsize = SAL_MAX(slabsize, cache->m_type_size * 8);
+ if(slabsize < cache->m_type_size * 8)
+ {
+ slabsize = cache->m_type_size * 8;
+ }
}
slabsize = RTL_MEMORY_P2ROUNDUP(slabsize, source->m_quantum);
commit a13c3a68df9327d3a1d0283006a3cf755291484a
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Fri Sep 14 00:56:54 2012 -0500
removed unused sal macro (SAL_FIELDOFFSET)
Change-Id: I5b4b70ecc87efc943afe8a408140ef91e108e0a3
diff --git a/sal/inc/sal/macros.h b/sal/inc/sal/macros.h
index a1f42c3..5ccdee3 100644
--- a/sal/inc/sal/macros.h
+++ b/sal/inc/sal/macros.h
@@ -39,10 +39,6 @@
# define SAL_MIN(a,b) (((a) < (b)) ? (a) : (b))
#endif
-#ifndef SAL_FIELDOFFSET
-# define SAL_FIELDOFFSET(type, field) ((sal_Int32)(&((type *)16)->field) - 16)
-#endif
-
#ifndef SAL_N_ELEMENTS
# if defined(__cplusplus) && ( defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L )
/*
commit 2dfe34ce0efef6ec0412130a32f755657710363d
Author: Norbert Thiebaud <nthiebaud at gmail.com>
Date: Thu Sep 13 23:55:31 2012 -0500
saldllapi.h is really not included outside of sal itself
furthermore sal/config.h is already included by sal/types.h
so no need to include it twice
Change-Id: Id84122eb102eececc1001ea4a56c556ff775defa
diff --git a/sal/Package_inc.mk b/sal/Package_inc.mk
index c253de7..3d4da31 100644
--- a/sal/Package_inc.mk
+++ b/sal/Package_inc.mk
@@ -113,7 +113,6 @@ $(eval $(call gb_Package_add_file,sal_inc,inc/sal/log.hxx,sal/log.hxx))
$(eval $(call gb_Package_add_file,sal_inc,inc/sal/macros.h,sal/macros.h))
$(eval $(call gb_Package_add_file,sal_inc,inc/sal/main.h,sal/main.h))
$(eval $(call gb_Package_add_file,sal_inc,inc/sal/mathconf.h,sal/mathconf.h))
-$(eval $(call gb_Package_add_file,sal_inc,inc/sal/saldllapi.h,sal/saldllapi.h))
$(eval $(call gb_Package_add_file,sal_inc,inc/sal/types.h,sal/types.h))
$(eval $(call gb_Package_add_file,sal_inc,inc/sal/detail/log.h,sal/detail/log.h))
$(eval $(call gb_Package_add_file,sal_inc,inc/systools/win32/comptr.hxx,systools/win32/comptr.hxx))
diff --git a/sal/inc/sal/saldllapi.h b/sal/inc/sal/saldllapi.h
deleted file mode 100644
index a3de15f..0000000
--- a/sal/inc/sal/saldllapi.h
+++ /dev/null
@@ -1,15 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
-#ifndef INCLUDED_SALDLLAPI_H
-#define INCLUDED_SALDLLAPI_H
-
-#include "sal/types.h"
-
-#if defined(SAL_DLLIMPLEMENTATION)
-#define SAL_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
-#else
-#define SAL_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
-#endif
-
-#endif /* INCLUDED_SALDLLAPI_H */
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/inc/sal/types.h b/sal/inc/sal/types.h
index 3db8cf4..56299d1 100644
--- a/sal/inc/sal/types.h
+++ b/sal/inc/sal/types.h
@@ -300,7 +300,11 @@ typedef void * sal_Handle;
#define SAL_EXCEPTION_DLLPRIVATE
#endif
-#include <sal/saldllapi.h>
+#if defined(SAL_DLLIMPLEMENTATION)
+#define SAL_DLLPUBLIC SAL_DLLPUBLIC_EXPORT
+#else
+#define SAL_DLLPUBLIC SAL_DLLPUBLIC_IMPORT
+#endif
/** Use this as markup for functions and methods whose return value must be
checked.
diff --git a/sal/textenc/converter.hxx b/sal/textenc/converter.hxx
index fc69ee2..7e09088 100644
--- a/sal/textenc/converter.hxx
+++ b/sal/textenc/converter.hxx
@@ -29,9 +29,6 @@
#ifndef INCLUDED_SAL_TEXTENC_CONVERTER_HXX
#define INCLUDED_SAL_TEXTENC_CONVERTER_HXX
-#include "sal/config.h"
-
-#include "sal/saldllapi.h"
#include "sal/types.h"
// Internal, non-stable ABI
diff --git a/sal/textenc/convertsimple.hxx b/sal/textenc/convertsimple.hxx
index 3f207ea..505a576 100644
--- a/sal/textenc/convertsimple.hxx
+++ b/sal/textenc/convertsimple.hxx
@@ -30,9 +30,6 @@
#ifndef INCLUDED_SAL_TEXTENC_CONVERTSIMPLE_HXX
#define INCLUDED_SAL_TEXTENC_CONVERTSIMPLE_HXX
-#include "sal/config.h"
-
-#include "sal/saldllapi.h"
#include "sal/types.h"
// Internal, non-stable ABI
diff --git a/sal/textenc/handleundefinedunicodetotextchar.hxx b/sal/textenc/handleundefinedunicodetotextchar.hxx
index a3a3c32..4863150 100644
--- a/sal/textenc/handleundefinedunicodetotextchar.hxx
+++ b/sal/textenc/handleundefinedunicodetotextchar.hxx
@@ -30,9 +30,6 @@
#ifndef INCLUDED_SAL_TEXTENC_HANDLEUNDEFINEDUNICODETOTEXTCHAR_HXX
#define INCLUDED_SAL_TEXTENC_HANDLEUNDEFINEDUNICODETOTEXTCHAR_HXX
-#include "sal/config.h"
-
-#include "sal/saldllapi.h"
#include "sal/types.h"
// Internal, non-stable ABI
More information about the Libreoffice-commits
mailing list