summaryrefslogtreecommitdiffstats
path: root/sal/inc
diff options
context:
space:
mode:
Diffstat (limited to 'sal/inc')
-rw-r--r--sal/inc/osl/thread.h12
-rw-r--r--sal/inc/osl/thread.hxx3
-rw-r--r--sal/inc/rtl/malformeduriexception.hxx4
-rw-r--r--sal/inc/rtl/math.h8
-rw-r--r--sal/inc/sal/cppunit.h45
-rw-r--r--sal/inc/sal/types.h2
6 files changed, 69 insertions, 5 deletions
diff --git a/sal/inc/osl/thread.h b/sal/inc/osl/thread.h
index 1b160f09eef9..14b4cbfd8b7e 100644
--- a/sal/inc/osl/thread.h
+++ b/sal/inc/osl/thread.h
@@ -160,6 +160,18 @@ sal_Bool SAL_CALL osl_scheduleThread(oslThread Thread);
*/
void SAL_CALL osl_yieldThread(void);
+/** Attempts to set the name of the current thread.
+
+ The name of a thread is usually evaluated for debugging purposes. Not all
+ platforms support this. On Linux, a set thread name can be observed with
+ "ps -L". On Windows with the Microsoft compiler, a thread name set while a
+ debugger is attached can be observed within the debugger.
+
+ @param name the name of the thread; must not be null; on Linux, only the
+ first 16 characters are used
+*/
+void SAL_CALL osl_setThreadName(char const * name);
+
/* Callback when data stored in a thread key is no longer needed */
typedef void (SAL_CALL *oslThreadKeyCallbackFunction)(void *);
diff --git a/sal/inc/osl/thread.hxx b/sal/inc/osl/thread.hxx
index 923c68ecd41d..2bcc82fd07eb 100644
--- a/sal/inc/osl/thread.hxx
+++ b/sal/inc/osl/thread.hxx
@@ -151,6 +151,9 @@ public:
osl_yieldThread();
}
+ static inline void setName(char const * name) throw () {
+ osl_setThreadName(name);
+ }
virtual sal_Bool SAL_CALL schedule()
{
diff --git a/sal/inc/rtl/malformeduriexception.hxx b/sal/inc/rtl/malformeduriexception.hxx
index e67e3187e5a0..a119e44f601d 100644
--- a/sal/inc/rtl/malformeduriexception.hxx
+++ b/sal/inc/rtl/malformeduriexception.hxx
@@ -54,8 +54,8 @@ public:
inline SAL_EXCEPTION_DLLPRIVATE ~MalformedUriException() {}
inline SAL_EXCEPTION_DLLPRIVATE MalformedUriException operator =(
- MalformedUriException const & other)
- { m_aMessage = other.m_aMessage; return *this; }
+ MalformedUriException const & rOther)
+ { m_aMessage = rOther.m_aMessage; return *this; }
/** Get the message.
diff --git a/sal/inc/rtl/math.h b/sal/inc/rtl/math.h
index dc51d9900ff8..26a1029095b1 100644
--- a/sal/inc/rtl/math.h
+++ b/sal/inc/rtl/math.h
@@ -320,7 +320,9 @@ void SAL_CALL rtl_math_doubleToUString(rtl_uString ** pResult,
@param pParsedEnd
If non-null, returns one past the position of the last character parsed
away. Thus if [pBegin..pEnd) only contains the numerical string to be
- parsed, *pParsedEnd == pEnd on return.
+ parsed, *pParsedEnd == pEnd on return. If no numerical (sub-)string is
+ found, *pParsedEnd == pBegin on return, even if there was leading
+ whitespace.
*/
double SAL_CALL rtl_math_stringToDouble(
sal_Char const * pBegin, sal_Char const * pEnd, sal_Char cDecSeparator,
@@ -358,7 +360,9 @@ double SAL_CALL rtl_math_stringToDouble(
@param pParsedEnd
If non-null, returns one past the position of the last character parsed
away. Thus if [pBegin..pEnd) only contains the numerical string to be
- parsed, *pParsedEnd == pEnd on return.
+ parsed, *pParsedEnd == pEnd on return. If no numerical (sub-)string is
+ found, *pParsedEnd == pBegin on return, even if there was leading
+ whitespace.
*/
double SAL_CALL rtl_math_uStringToDouble(
sal_Unicode const * pBegin, sal_Unicode const * pEnd,
diff --git a/sal/inc/sal/cppunit.h b/sal/inc/sal/cppunit.h
new file mode 100644
index 000000000000..cd6645b51aee
--- /dev/null
+++ b/sal/inc/sal/cppunit.h
@@ -0,0 +1,45 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SAL_CPPUNIT_H_
+#define _SAL_CPPUNIT_H_
+
+#include <sal/types.h>
+
+#include "preextstl.h"
+#include <cppunit/TestAssert.h>
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+#include <cppunit/plugin/TestPlugIn.h>
+#undef CPPUNIT_PLUGIN_EXPORT
+#define CPPUNIT_PLUGIN_EXPORT extern "C" SAL_DLLPUBLIC_EXPORT
+#include "postextstl.h"
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/inc/sal/types.h b/sal/inc/sal/types.h
index fdaaab18ba1e..d33e545dbac7 100644
--- a/sal/inc/sal/types.h
+++ b/sal/inc/sal/types.h
@@ -297,7 +297,7 @@ typedef void * sal_Handle;
These macros are used for inline declarations of exception classes, as in
rtl/malformeduriexception.hxx.
*/
-#if defined __GNUC__
+#if defined(__GNUC__) && ! defined(__MINGW32__)
#define SAL_EXCEPTION_DLLPUBLIC_EXPORT SAL_DLLPUBLIC_EXPORT
#define SAL_EXCEPTION_DLLPRIVATE SAL_DLLPRIVATE
#else