1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8  */
9 
10 #include <sal/config.h>
11 
12 #include <cstdlib>
13 
14 #include <osl/module.h>
15 #include <osl/pipe.h>
16 #include <osl/socket.h>
17 #include <osl/time.h>
18 #include <sal/types.h>
19 
20 // Stubs for removed functionality, to be killed when we bump sal SONAME
21 
22 extern "C" {
23 
osl_acquireSemaphore(void *)24 SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL osl_acquireSemaphore(void *) {
25     for (;;) { std::abort(); } // avoid "must return a value" warnings
26 }
27 
osl_areCommandArgsSet()28 SAL_DLLPUBLIC_EXPORT int SAL_CALL osl_areCommandArgsSet() {
29     for (;;) { std::abort(); } // avoid "must return a value" warnings
30 }
31 
osl_assertFailedLine(char const *,sal_Int32,char const *)32 SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL osl_assertFailedLine(
33     char const *, sal_Int32, char const *)
34 {
35     for (;;) { std::abort(); } // avoid "must return a value" warnings
36 }
37 
osl_breakDebug()38 SAL_DLLPUBLIC_EXPORT void SAL_CALL osl_breakDebug() {
39     std::abort();
40 }
41 
osl_createSemaphore(sal_uInt32)42 SAL_DLLPUBLIC_EXPORT void * SAL_CALL osl_createSemaphore(sal_uInt32) {
43     for (;;) { std::abort(); } // avoid "must return a value" warnings
44 }
45 
osl_destroySemaphore(void *)46 SAL_DLLPUBLIC_EXPORT void SAL_CALL osl_destroySemaphore(void *) {
47     std::abort();
48 }
49 
osl_getEthernetAddress(sal_uInt8 *)50 SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL osl_getEthernetAddress(sal_uInt8 *) {
51     for (;;) { std::abort(); } // avoid "must return a value" warnings
52 }
53 
osl_receiveResourcePipe(oslPipe)54 SAL_DLLPUBLIC_EXPORT oslSocket SAL_CALL osl_receiveResourcePipe(oslPipe) {
55     for (;;) { std::abort(); } // avoid "must return a value" warnings
56 }
57 
osl_releaseSemaphore(void *)58 SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL osl_releaseSemaphore(void *) {
59     for (;;) { std::abort(); } // avoid "must return a value" warnings
60 }
61 
osl_reportError(sal_uInt32,char const *)62 SAL_DLLPUBLIC_EXPORT sal_Int32 SAL_CALL osl_reportError(
63     sal_uInt32, char const *)
64 {
65     for (;;) { std::abort(); } // avoid "must return a value" warnings
66 }
67 
osl_sendResourcePipe(oslPipe,oslSocket)68 SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL osl_sendResourcePipe(oslPipe, oslSocket)
69 {
70     for (;;) { std::abort(); } // avoid "must return a value" warnings
71 }
72 
73 namespace {
74 typedef void (* pfunc_osl_printDebugMessage)(char const *);
75 }
76 SAL_DLLPUBLIC_EXPORT pfunc_osl_printDebugMessage SAL_CALL
osl_setDebugMessageFunc(pfunc_osl_printDebugMessage)77 osl_setDebugMessageFunc(pfunc_osl_printDebugMessage) {
78     for (;;) { std::abort(); } // avoid "must return a value" warnings
79 }
80 
81 namespace {
82 typedef void (* pfunc_osl_printDetailedDebugMessage)(
83     char const *, sal_Int32, char const *);
84 }
85 SAL_DLLPUBLIC_EXPORT pfunc_osl_printDetailedDebugMessage SAL_CALL
osl_setDetailedDebugMessageFunc(pfunc_osl_printDetailedDebugMessage)86 osl_setDetailedDebugMessageFunc(pfunc_osl_printDetailedDebugMessage) {
87     for (;;) { std::abort(); } // avoid "must return a value" warnings
88 }
89 
osl_trace(char const *,...)90 SAL_DLLPUBLIC_EXPORT void SAL_CALL osl_trace(char const *, ...) {
91     std::abort();
92 }
93 
osl_tryToAcquireSemaphore(void *)94 SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL osl_tryToAcquireSemaphore(void *) {
95     for (;;) { std::abort(); } // avoid "must return a value" warnings
96 }
97 
rtl_addUnloadingListener(void (SAL_CALL *)(void *),void *)98 SAL_DLLPUBLIC_EXPORT sal_Int32 SAL_CALL rtl_addUnloadingListener(
99     void (SAL_CALL *)(void *), void *)
100 {
101     for (;;) { std::abort(); } // avoid "must return a value" warnings
102 }
103 
rtl_compareMemory(void const *,void const *,sal_Size)104 SAL_DLLPUBLIC_EXPORT sal_Int32 SAL_CALL rtl_compareMemory(
105     void const *, void const *, sal_Size)
106 {
107     for (;;) { std::abort(); } // avoid "must return a value" warnings
108 }
109 
rtl_copyMemory(void *,void const *,sal_Size)110 SAL_DLLPUBLIC_EXPORT void SAL_CALL rtl_copyMemory(
111     void *, void const *, sal_Size)
112 {
113     std::abort();
114 }
115 
rtl_fillMemory(void *,sal_Size,sal_uInt8)116 SAL_DLLPUBLIC_EXPORT void SAL_CALL rtl_fillMemory(void *, sal_Size, sal_uInt8) {
117     std::abort();
118 }
119 
rtl_findInMemory(void const *,sal_uInt8,sal_Size)120 SAL_DLLPUBLIC_EXPORT void * SAL_CALL rtl_findInMemory(
121     void const *, sal_uInt8, sal_Size)
122 {
123     for (;;) { std::abort(); } // avoid "must return a value" warnings
124 }
125 
rtl_moveMemory(void *,void const *,sal_Size)126 SAL_DLLPUBLIC_EXPORT void SAL_CALL rtl_moveMemory(
127     void *, void const *, sal_Size)
128 {
129     std::abort();
130 }
131 
rtl_registerModuleForUnloading(oslModule)132 SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL rtl_registerModuleForUnloading(oslModule)
133 {
134     for (;;) { std::abort(); } // avoid "must return a value" warnings
135 }
136 
rtl_removeUnloadingListener(sal_Int32)137 SAL_DLLPUBLIC_EXPORT void SAL_CALL rtl_removeUnloadingListener(sal_Int32) {
138     std::abort();
139 }
140 
rtl_unloadUnusedModules(TimeValue *)141 SAL_DLLPUBLIC_EXPORT void SAL_CALL rtl_unloadUnusedModules(TimeValue *) {
142     std::abort();
143 }
144 
rtl_unregisterModuleForUnloading(oslModule)145 SAL_DLLPUBLIC_EXPORT void SAL_CALL rtl_unregisterModuleForUnloading(oslModule) {
146     std::abort();
147 }
148 
rtl_zeroMemory(void *,sal_Size)149 SAL_DLLPUBLIC_EXPORT void SAL_CALL rtl_zeroMemory(void *, sal_Size) {
150     std::abort();
151 }
152 
rtl_logfile_trace(const sal_Char *,...)153 SAL_DLLPUBLIC_EXPORT void SAL_CALL rtl_logfile_trace( const sal_Char*, ... ) {
154     std::abort();
155 }
156 
rtl_logfile_longTrace(char const *,...)157 SAL_DLLPUBLIC_EXPORT void SAL_CALL rtl_logfile_longTrace(char const *, ...) {
158     std::abort();
159 }
160 
rtl_logfile_hasLogFile()161 SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL rtl_logfile_hasLogFile() {
162     for (;;) { std::abort(); } // avoid "must return a value" warnings
163 }
164 
165 }
166 
167 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
168