summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-12-06 09:06:55 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-12-06 09:17:17 +0100
commitc4a8ba908cca0228336330ae72e5d7ad29a6ed2e (patch)
treebc0a1e8f4f98b757029ac9d14b9b6331e7af2e61
parent93fce951784cd561f308c5019aa0b3a178116a92 (diff)
Put stubs for removed functionality into compat.cxx
Change-Id: I634c6c699f8573113cdf0763c2cc83dcc04b0b0e
-rw-r--r--sal/Library_sal.mk2
-rw-r--r--sal/osl/all/compat.cxx (renamed from sal/osl/all/semaphor.c)39
2 files changed, 20 insertions, 21 deletions
diff --git a/sal/Library_sal.mk b/sal/Library_sal.mk
index 51823fe7bee3..d4fae981585e 100644
--- a/sal/Library_sal.mk
+++ b/sal/Library_sal.mk
@@ -97,6 +97,7 @@ $(eval $(call gb_Library_use_system_darwin_frameworks,sal,\
endif
$(eval $(call gb_Library_add_exception_objects,sal,\
+ sal/osl/all/compat \
sal/osl/all/debugbase \
sal/osl/all/loadmodulerelative \
sal/osl/all/log \
@@ -138,7 +139,6 @@ $(eval $(call gb_Library_add_exception_objects,sal,\
))
$(eval $(call gb_Library_add_cobjects,sal,\
sal/osl/all/filepath \
- sal/osl/all/semaphor \
))
ifeq ($(OS),IOS)
diff --git a/sal/osl/all/semaphor.c b/sal/osl/all/compat.cxx
index 5afb950ad280..fb8a1ec6e2d2 100644
--- a/sal/osl/all/semaphor.c
+++ b/sal/osl/all/compat.cxx
@@ -7,37 +7,36 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#include <sal/types.h>
+#include "sal/config.h"
+
+#include <cstdlib>
+
+#include "sal/types.h"
// Stubs for removed functionality, to be killed when we bump sal SONAME
-SAL_DLLPUBLIC_EXPORT void* SAL_CALL osl_createSemaphore(sal_uInt32 dummy)
-{
- (void)dummy;
- return NULL;
+extern "C" {
+
+SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL osl_acquireSemaphore(void *) {
+ for (;;) { std::abort(); } // avoid "must return a value" warnings
+}
+
+SAL_DLLPUBLIC_EXPORT void * SAL_CALL osl_createSemaphore(sal_uInt32) {
+ for (;;) { std::abort(); } // avoid "must return a value" warnings
}
-SAL_DLLPUBLIC_EXPORT void SAL_CALL osl_destroySemaphore(void* dummy)
-{
- (void)dummy;
+SAL_DLLPUBLIC_EXPORT void SAL_CALL osl_destroySemaphore(void *) {
+ std::abort();
}
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL osl_acquireSemaphore(void* dummy)
-{
- (void)dummy;
- return sal_False;
+SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL osl_releaseSemaphore(void *) {
+ for (;;) { std::abort(); } // avoid "must return a value" warnings
}
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL osl_tryToAcquireSemaphore(void* dummy)
-{
- (void)dummy;
- return sal_False;
+SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL osl_tryToAcquireSemaphore(void *) {
+ for (;;) { std::abort(); } // avoid "must return a value" warnings
}
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL osl_releaseSemaphore(void* dummy)
-{
- (void)dummy;
- return sal_False;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */