Kaydet (Commit) 164b6ce7 authored tarafından Arnaud Versini's avatar Arnaud Versini

General cleanup in sal module for all and unix.

Remove useless comments and header, and de duplicate a small declaration.

Change-Id: I0d4475cbbd61ea964f8e586cf0e1f68eb91c4948
Reviewed-on: https://gerrit.libreoffice.org/6016Reviewed-by: 's avatarArnaud Versini <arnaud.versini@libreoffice.org>
Tested-by: 's avatarArnaud Versini <arnaud.versini@libreoffice.org>
üst 9fb9b057
...@@ -66,7 +66,7 @@ inline bool isSubStr( char const* pStr, rtl::OString const& subStr ) ...@@ -66,7 +66,7 @@ inline bool isSubStr( char const* pStr, rtl::OString const& subStr )
return rtl_str_indexOfStr( pStr, subStr.getStr() ) >= 0; return rtl_str_indexOfStr( pStr, subStr.getStr() ) >= 0;
} }
struct DebugBaseMutex : ::rtl::Static<osl::Mutex, DebugBaseMutex> {}; struct DebugBaseMutex : rtl::Static<osl::Mutex, DebugBaseMutex> {};
} // anon namespace } // anon namespace
......
...@@ -25,7 +25,6 @@ ...@@ -25,7 +25,6 @@
#include "sal/log.hxx" #include "sal/log.hxx"
#include "osl/module.h" #include "osl/module.h"
#include "osl/module.hxx" #include "osl/module.hxx"
#include "osl/thread.h"
#include "rtl/malformeduriexception.hxx" #include "rtl/malformeduriexception.hxx"
#include "rtl/uri.hxx" #include "rtl/uri.hxx"
#include "rtl/ustring.h" #include "rtl/ustring.h"
...@@ -40,22 +39,22 @@ oslModule SAL_CALL osl_loadModuleRelative( ...@@ -40,22 +39,22 @@ oslModule SAL_CALL osl_loadModuleRelative(
oslGenericFunction const baseModule, rtl_uString * const relativePath, oslGenericFunction const baseModule, rtl_uString * const relativePath,
sal_Int32 const mode) sal_Int32 const mode)
{ {
::rtl::OUString base; rtl::OUString base;
if (!::osl::Module::getUrlFromAddress(baseModule, base)) { if (!osl::Module::getUrlFromAddress(baseModule, base)) {
SAL_INFO("sal.osl","osl::Module::getUrlFromAddress failed"); SAL_INFO("sal.osl","osl::Module::getUrlFromAddress failed");
return NULL; return NULL;
} }
::rtl::OUString abs; rtl::OUString abs;
try { try {
abs = ::rtl::Uri::convertRelToAbs(base, relativePath); abs = rtl::Uri::convertRelToAbs(base, relativePath);
} catch (const ::rtl::MalformedUriException & e) { } catch (const rtl::MalformedUriException & e) {
(void) e; // avoid warnings (void) e; // avoid warnings
SAL_INFO("sal.osl", SAL_INFO("sal.osl",
"rtl::MalformedUriException <" << e.getMessage() << ">"); "rtl::MalformedUriException <" << e.getMessage() << ">");
//TODO: let some OSL_TRACE variant take care of text conversion? //TODO: let some OSL_TRACE variant take care of text conversion?
return NULL; return NULL;
} }
return ::osl_loadModule(abs.pData, mode); return osl_loadModule(abs.pData, mode);
} }
#endif // !DISABLE_DYNLOADING #endif // !DISABLE_DYNLOADING
......
...@@ -17,9 +17,7 @@ ...@@ -17,9 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include "rtl/ustring.hxx"
#include "osl/time.h" #include "osl/time.h"
#include <stdio.h>
/* /*
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
#if defined (SOLARIS) || defined (FREEBSD) || defined (NETBSD) || \ #if defined (SOLARIS) || defined (FREEBSD) || defined (NETBSD) || \
defined (OPENBSD) || defined (DRAGONFLY) defined (OPENBSD) || defined (DRAGONFLY) || defined (MACOSX)
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
...@@ -53,22 +53,4 @@ struct frame { ...@@ -53,22 +53,4 @@ struct frame {
#include <execinfo.h> #include <execinfo.h>
#endif #endif
#if defined (MACOSX)
#ifdef __cplusplus
extern "C" {
#endif
/* backtrace function with same behaviour as defined in GNU libc */
int backtrace( void **buffer, int max_frames );
void backtrace_symbols_fd( void **buffer, int size, int fd );
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif /* defined MACOSX */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -37,9 +37,6 @@ typedef struct _oslConditionImpl ...@@ -37,9 +37,6 @@ typedef struct _oslConditionImpl
} oslConditionImpl; } oslConditionImpl;
/*****************************************************************************/
/* osl_createCondition */
/*****************************************************************************/
oslCondition SAL_CALL osl_createCondition() oslCondition SAL_CALL osl_createCondition()
{ {
oslConditionImpl* pCond; oslConditionImpl* pCond;
...@@ -89,9 +86,6 @@ oslCondition SAL_CALL osl_createCondition() ...@@ -89,9 +86,6 @@ oslCondition SAL_CALL osl_createCondition()
return (oslCondition)pCond; return (oslCondition)pCond;
} }
/*****************************************************************************/
/* osl_destroyCondition */
/*****************************************************************************/
void SAL_CALL osl_destroyCondition(oslCondition Condition) void SAL_CALL osl_destroyCondition(oslCondition Condition)
{ {
oslConditionImpl* pCond; oslConditionImpl* pCond;
...@@ -118,9 +112,6 @@ void SAL_CALL osl_destroyCondition(oslCondition Condition) ...@@ -118,9 +112,6 @@ void SAL_CALL osl_destroyCondition(oslCondition Condition)
return; return;
} }
/*****************************************************************************/
/* osl_setCondition */
/*****************************************************************************/
sal_Bool SAL_CALL osl_setCondition(oslCondition Condition) sal_Bool SAL_CALL osl_setCondition(oslCondition Condition)
{ {
oslConditionImpl* pCond; oslConditionImpl* pCond;
...@@ -171,9 +162,6 @@ sal_Bool SAL_CALL osl_setCondition(oslCondition Condition) ...@@ -171,9 +162,6 @@ sal_Bool SAL_CALL osl_setCondition(oslCondition Condition)
} }
/*****************************************************************************/
/* osl_resetCondition */
/*****************************************************************************/
sal_Bool SAL_CALL osl_resetCondition(oslCondition Condition) sal_Bool SAL_CALL osl_resetCondition(oslCondition Condition)
{ {
oslConditionImpl* pCond; oslConditionImpl* pCond;
...@@ -212,9 +200,6 @@ sal_Bool SAL_CALL osl_resetCondition(oslCondition Condition) ...@@ -212,9 +200,6 @@ sal_Bool SAL_CALL osl_resetCondition(oslCondition Condition)
return sal_True; return sal_True;
} }
/*****************************************************************************/
/* osl_waitCondition */
/*****************************************************************************/
oslConditionResult SAL_CALL osl_waitCondition(oslCondition Condition, const TimeValue* pTimeout) oslConditionResult SAL_CALL osl_waitCondition(oslCondition Condition, const TimeValue* pTimeout)
{ {
oslConditionImpl* pCond; oslConditionImpl* pCond;
...@@ -315,9 +300,6 @@ oslConditionResult SAL_CALL osl_waitCondition(oslCondition Condition, const Time ...@@ -315,9 +300,6 @@ oslConditionResult SAL_CALL osl_waitCondition(oslCondition Condition, const Time
return Result; return Result;
} }
/*****************************************************************************/
/* osl_checkCondition */
/*****************************************************************************/
sal_Bool SAL_CALL osl_checkCondition(oslCondition Condition) sal_Bool SAL_CALL osl_checkCondition(oslCondition Condition)
{ {
sal_Bool State; sal_Bool State;
......
...@@ -60,9 +60,7 @@ static void osl_diagnose_backtrace_Impl ( ...@@ -60,9 +60,7 @@ static void osl_diagnose_backtrace_Impl (
((f != 0) ? (*(f))((s)) : (void)fprintf(stderr, "%s", (s))) ((f != 0) ? (*(f))((s)) : (void)fprintf(stderr, "%s", (s)))
#if defined (LINUX) || defined (SOLARIS) #if defined (LINUX) || defined (SOLARIS)
/************************************************************************/
/* osl_diagnose_frame_Impl */
/************************************************************************/
static void osl_diagnose_frame_Impl ( static void osl_diagnose_frame_Impl (
oslDebugMessageFunc f, oslDebugMessageFunc f,
int depth, int depth,
...@@ -102,9 +100,6 @@ static void osl_diagnose_frame_Impl ( ...@@ -102,9 +100,6 @@ static void osl_diagnose_frame_Impl (
} }
#endif #endif
/************************************************************************/
/* osl_diagnose_backtrace_Impl */
/************************************************************************/
#if defined(LINUX) #if defined(LINUX)
#include <execinfo.h> #include <execinfo.h>
...@@ -126,7 +121,6 @@ static void osl_diagnose_backtrace_Impl (oslDebugMessageFunc f) ...@@ -126,7 +121,6 @@ static void osl_diagnose_backtrace_Impl (oslDebugMessageFunc f)
#elif defined(SOLARIS) #elif defined(SOLARIS)
#include <pthread.h>
#include <setjmp.h> #include <setjmp.h>
#include <sys/frame.h> #include <sys/frame.h>
...@@ -190,10 +184,6 @@ static void osl_diagnose_backtrace_Impl (oslDebugMessageFunc f) ...@@ -190,10 +184,6 @@ static void osl_diagnose_backtrace_Impl (oslDebugMessageFunc f)
#endif /* (LINUX || SOLARIS) */ #endif /* (LINUX || SOLARIS) */
/************************************************************************/
/* osl_assertFailedLine */
/************************************************************************/
namespace { namespace {
// getenv is not thread safe, so minimize use of result: // getenv is not thread safe, so minimize use of result:
...@@ -255,17 +245,11 @@ sal_Bool SAL_CALL osl_assertFailedLine ( ...@@ -255,17 +245,11 @@ sal_Bool SAL_CALL osl_assertFailedLine (
return doAbort; return doAbort;
} }
/************************************************************************/
/* osl_breakDebug */
/************************************************************************/
void SAL_CALL osl_breakDebug() void SAL_CALL osl_breakDebug()
{ {
abort(); abort();
} }
/************************************************************************/
/* osl_reportError */
/************************************************************************/
sal_Int32 SAL_CALL osl_reportError ( sal_Int32 SAL_CALL osl_reportError (
sal_uInt32 nType, sal_uInt32 nType,
const sal_Char* pszMessage) const sal_Char* pszMessage)
...@@ -275,9 +259,6 @@ sal_Int32 SAL_CALL osl_reportError ( ...@@ -275,9 +259,6 @@ sal_Int32 SAL_CALL osl_reportError (
return 0; return 0;
} }
/************************************************************************/
/* osl_setDebugMessageFunc */
/************************************************************************/
oslDebugMessageFunc SAL_CALL osl_setDebugMessageFunc ( oslDebugMessageFunc SAL_CALL osl_setDebugMessageFunc (
oslDebugMessageFunc pNewFunc) oslDebugMessageFunc pNewFunc)
{ {
...@@ -286,9 +267,6 @@ oslDebugMessageFunc SAL_CALL osl_setDebugMessageFunc ( ...@@ -286,9 +267,6 @@ oslDebugMessageFunc SAL_CALL osl_setDebugMessageFunc (
return pOldFunc; return pOldFunc;
} }
/************************************************************************/
/* osl_setDetailedDebugMessageFunc */
/************************************************************************/
pfunc_osl_printDetailedDebugMessage SAL_CALL osl_setDetailedDebugMessageFunc ( pfunc_osl_printDetailedDebugMessage SAL_CALL osl_setDetailedDebugMessageFunc (
pfunc_osl_printDetailedDebugMessage pNewFunc) pfunc_osl_printDetailedDebugMessage pNewFunc)
{ {
......
...@@ -183,12 +183,6 @@ struct FileHandle_Impl ...@@ -183,12 +183,6 @@ struct FileHandle_Impl
}; };
}; };
/*******************************************************************
*
* FileHandle_Impl implementation
*
******************************************************************/
FileHandle_Impl::Allocator & FileHandle_Impl::Allocator &
FileHandle_Impl::Allocator::get() FileHandle_Impl::Allocator::get()
{ {
...@@ -747,9 +741,6 @@ oslFileHandle osl::detail::createFileHandleFromFD( int fd ) ...@@ -747,9 +741,6 @@ oslFileHandle osl::detail::createFileHandleFromFD( int fd )
return (oslFileHandle)(pImpl); return (oslFileHandle)(pImpl);
} }
/*******************************************************************
* osl_file_adjustLockFlags
******************************************************************/
static int osl_file_adjustLockFlags (const char * path, int flags) static int osl_file_adjustLockFlags (const char * path, int flags)
{ {
#ifdef MACOSX #ifdef MACOSX
...@@ -780,9 +771,6 @@ static int osl_file_adjustLockFlags (const char * path, int flags) ...@@ -780,9 +771,6 @@ static int osl_file_adjustLockFlags (const char * path, int flags)
return flags; return flags;
} }
/****************************************************************************
* osl_file_queryLocking
***************************************************************************/
static bool osl_file_queryLocking (sal_uInt32 uFlags) static bool osl_file_queryLocking (sal_uInt32 uFlags)
{ {
#if !defined HAVE_O_EXLOCK #if !defined HAVE_O_EXLOCK
...@@ -832,9 +820,6 @@ SAL_CALL osl_openMemoryAsFile( void *address, size_t size, oslFileHandle *pHandl ...@@ -832,9 +820,6 @@ SAL_CALL osl_openMemoryAsFile( void *address, size_t size, oslFileHandle *pHandl
#endif #endif
/****************************************************************************
* osl_openFile
***************************************************************************/
#ifdef HAVE_O_EXLOCK #ifdef HAVE_O_EXLOCK
#define OPEN_WRITE_FLAGS ( O_RDWR | O_EXLOCK | O_NONBLOCK ) #define OPEN_WRITE_FLAGS ( O_RDWR | O_EXLOCK | O_NONBLOCK )
#define OPEN_CREATE_FLAGS ( O_CREAT | O_RDWR | O_EXLOCK | O_NONBLOCK ) #define OPEN_CREATE_FLAGS ( O_CREAT | O_RDWR | O_EXLOCK | O_NONBLOCK )
...@@ -1042,9 +1027,6 @@ SAL_CALL osl_openFile( rtl_uString* ustrFileURL, oslFileHandle* pHandle, sal_uIn ...@@ -1042,9 +1027,6 @@ SAL_CALL osl_openFile( rtl_uString* ustrFileURL, oslFileHandle* pHandle, sal_uIn
return osl_openFilePath (buffer, pHandle, uFlags); return osl_openFilePath (buffer, pHandle, uFlags);
} }
/****************************************************************************/
/* osl_closeFile */
/****************************************************************************/
oslFileError oslFileError
SAL_CALL osl_closeFile( oslFileHandle Handle ) SAL_CALL osl_closeFile( oslFileHandle Handle )
{ {
...@@ -1084,9 +1066,6 @@ SAL_CALL osl_closeFile( oslFileHandle Handle ) ...@@ -1084,9 +1066,6 @@ SAL_CALL osl_closeFile( oslFileHandle Handle )
return (result); return (result);
} }
/************************************************
* osl_syncFile
***********************************************/
oslFileError oslFileError
SAL_CALL osl_syncFile(oslFileHandle Handle) SAL_CALL osl_syncFile(oslFileHandle Handle)
{ {
...@@ -1110,9 +1089,6 @@ SAL_CALL osl_syncFile(oslFileHandle Handle) ...@@ -1110,9 +1089,6 @@ SAL_CALL osl_syncFile(oslFileHandle Handle)
return osl_File_E_None; return osl_File_E_None;
} }
/************************************************
* osl_fileGetOSHandle
***********************************************/
oslFileError oslFileError
SAL_CALL osl_getFileOSHandle( SAL_CALL osl_getFileOSHandle(
oslFileHandle Handle, oslFileHandle Handle,
...@@ -1128,9 +1104,6 @@ SAL_CALL osl_getFileOSHandle( ...@@ -1128,9 +1104,6 @@ SAL_CALL osl_getFileOSHandle(
return osl_File_E_None; return osl_File_E_None;
} }
/*******************************************
osl_mapFile
********************************************/
oslFileError oslFileError
SAL_CALL osl_mapFile ( SAL_CALL osl_mapFile (
oslFileHandle Handle, oslFileHandle Handle,
...@@ -1244,9 +1217,6 @@ unmapFile (void* pAddr, sal_uInt64 uLength) ...@@ -1244,9 +1217,6 @@ unmapFile (void* pAddr, sal_uInt64 uLength)
// folder osl_mapFile just returns a pointer to the file inside the // folder osl_mapFile just returns a pointer to the file inside the
// already mmapped .apk archive. // already mmapped .apk archive.
/*******************************************
osl_unmapFile
********************************************/
oslFileError oslFileError
SAL_CALL osl_unmapFile (void* pAddr, sal_uInt64 uLength) SAL_CALL osl_unmapFile (void* pAddr, sal_uInt64 uLength)
{ {
...@@ -1255,9 +1225,6 @@ SAL_CALL osl_unmapFile (void* pAddr, sal_uInt64 uLength) ...@@ -1255,9 +1225,6 @@ SAL_CALL osl_unmapFile (void* pAddr, sal_uInt64 uLength)
#endif #endif
/*******************************************
osl_unmapMappedFile
********************************************/
oslFileError oslFileError
SAL_CALL osl_unmapMappedFile (oslFileHandle Handle, void* pAddr, sal_uInt64 uLength) SAL_CALL osl_unmapMappedFile (oslFileHandle Handle, void* pAddr, sal_uInt64 uLength)
{ {
...@@ -1274,9 +1241,6 @@ SAL_CALL osl_unmapMappedFile (oslFileHandle Handle, void* pAddr, sal_uInt64 uLen ...@@ -1274,9 +1241,6 @@ SAL_CALL osl_unmapMappedFile (oslFileHandle Handle, void* pAddr, sal_uInt64 uLen
return osl_File_E_None; return osl_File_E_None;
} }
/*******************************************
osl_readLine
********************************************/
oslFileError oslFileError
SAL_CALL osl_readLine ( SAL_CALL osl_readLine (
oslFileHandle Handle, oslFileHandle Handle,
...@@ -1297,9 +1261,6 @@ SAL_CALL osl_readLine ( ...@@ -1297,9 +1261,6 @@ SAL_CALL osl_readLine (
return (result); return (result);
} }
/*******************************************
osl_readFile
********************************************/
oslFileError oslFileError
SAL_CALL osl_readFile ( SAL_CALL osl_readFile (
oslFileHandle Handle, oslFileHandle Handle,
...@@ -1326,9 +1287,6 @@ SAL_CALL osl_readFile ( ...@@ -1326,9 +1287,6 @@ SAL_CALL osl_readFile (
return (result); return (result);
} }
/*******************************************
osl_writeFile
********************************************/
oslFileError oslFileError
SAL_CALL osl_writeFile ( SAL_CALL osl_writeFile (
oslFileHandle Handle, oslFileHandle Handle,
...@@ -1357,9 +1315,6 @@ SAL_CALL osl_writeFile ( ...@@ -1357,9 +1315,6 @@ SAL_CALL osl_writeFile (
return (result); return (result);
} }
/*******************************************
osl_readFileAt
********************************************/
oslFileError oslFileError
SAL_CALL osl_readFileAt ( SAL_CALL osl_readFileAt (
oslFileHandle Handle, oslFileHandle Handle,
...@@ -1390,9 +1345,6 @@ SAL_CALL osl_readFileAt ( ...@@ -1390,9 +1345,6 @@ SAL_CALL osl_readFileAt (
return pImpl->readFileAt (nOffset, pBuffer, nBytesRequested, pBytesRead); return pImpl->readFileAt (nOffset, pBuffer, nBytesRequested, pBytesRead);
} }
/*******************************************
osl_writeFileAt
********************************************/
oslFileError oslFileError
SAL_CALL osl_writeFileAt ( SAL_CALL osl_writeFileAt (
oslFileHandle Handle, oslFileHandle Handle,
...@@ -1425,9 +1377,6 @@ SAL_CALL osl_writeFileAt ( ...@@ -1425,9 +1377,6 @@ SAL_CALL osl_writeFileAt (
return pImpl->writeFileAt (nOffset, pBuffer, nBytesToWrite, pBytesWritten); return pImpl->writeFileAt (nOffset, pBuffer, nBytesToWrite, pBytesWritten);
} }
/****************************************************************************/
/* osl_isEndOfFile */
/****************************************************************************/
oslFileError oslFileError
SAL_CALL osl_isEndOfFile( oslFileHandle Handle, sal_Bool *pIsEOF ) SAL_CALL osl_isEndOfFile( oslFileHandle Handle, sal_Bool *pIsEOF )
{ {
...@@ -1441,9 +1390,6 @@ SAL_CALL osl_isEndOfFile( oslFileHandle Handle, sal_Bool *pIsEOF ) ...@@ -1441,9 +1390,6 @@ SAL_CALL osl_isEndOfFile( oslFileHandle Handle, sal_Bool *pIsEOF )
return osl_File_E_None; return osl_File_E_None;
} }
/************************************************
* osl_getFilePos
***********************************************/
oslFileError oslFileError
SAL_CALL osl_getFilePos( oslFileHandle Handle, sal_uInt64* pPos ) SAL_CALL osl_getFilePos( oslFileHandle Handle, sal_uInt64* pPos )
{ {
...@@ -1457,9 +1403,6 @@ SAL_CALL osl_getFilePos( oslFileHandle Handle, sal_uInt64* pPos ) ...@@ -1457,9 +1403,6 @@ SAL_CALL osl_getFilePos( oslFileHandle Handle, sal_uInt64* pPos )
return osl_File_E_None; return osl_File_E_None;
} }
/*******************************************
osl_setFilePos
********************************************/
oslFileError oslFileError
SAL_CALL osl_setFilePos (oslFileHandle Handle, sal_uInt32 uHow, sal_Int64 uOffset) SAL_CALL osl_setFilePos (oslFileHandle Handle, sal_uInt32 uHow, sal_Int64 uOffset)
{ {
...@@ -1504,9 +1447,6 @@ SAL_CALL osl_setFilePos (oslFileHandle Handle, sal_uInt32 uHow, sal_Int64 uOffse ...@@ -1504,9 +1447,6 @@ SAL_CALL osl_setFilePos (oslFileHandle Handle, sal_uInt32 uHow, sal_Int64 uOffse
return pImpl->setPos (nPos + nOffset); return pImpl->setPos (nPos + nOffset);
} }
/****************************************************************************
* osl_getFileSize
****************************************************************************/
oslFileError oslFileError
SAL_CALL osl_getFileSize( oslFileHandle Handle, sal_uInt64* pSize ) SAL_CALL osl_getFileSize( oslFileHandle Handle, sal_uInt64* pSize )
{ {
...@@ -1520,9 +1460,6 @@ SAL_CALL osl_getFileSize( oslFileHandle Handle, sal_uInt64* pSize ) ...@@ -1520,9 +1460,6 @@ SAL_CALL osl_getFileSize( oslFileHandle Handle, sal_uInt64* pSize )
return osl_File_E_None; return osl_File_E_None;
} }
/************************************************
* osl_setFileSize
***********************************************/
oslFileError oslFileError
SAL_CALL osl_setFileSize( oslFileHandle Handle, sal_uInt64 uSize ) SAL_CALL osl_setFileSize( oslFileHandle Handle, sal_uInt64 uSize )
{ {
......
...@@ -21,10 +21,6 @@ ...@@ -21,10 +21,6 @@
#include "file_error_transl.h" #include "file_error_transl.h"
#include <osl/diagnose.h> #include <osl/diagnose.h>
/********************************************
* oslTranslateFileError
*******************************************/
oslFileError oslTranslateFileError(sal_Bool bIsError, int Errno) oslFileError oslTranslateFileError(sal_Bool bIsError, int Errno)
{ {
oslFileError osl_error = osl_File_E_invalidError; oslFileError osl_error = osl_File_E_invalidError;
......
...@@ -363,10 +363,6 @@ namespace ...@@ -363,10 +363,6 @@ namespace
return (pStr + rtl_ustr_getLength(pStr)); return (pStr + rtl_ustr_getLength(pStr));
} }
/*********************************************
********************************************/
sal_Unicode* ustrchrcat(const sal_Unicode chr, sal_Unicode* d) sal_Unicode* ustrchrcat(const sal_Unicode chr, sal_Unicode* d)
{ {
sal_Unicode* p = ustrtoend(d); sal_Unicode* p = ustrtoend(d);
...@@ -375,10 +371,6 @@ namespace ...@@ -375,10 +371,6 @@ namespace
return d; return d;
} }
/******************************************************
*
******************************************************/
bool _islastchr(sal_Unicode* pStr, sal_Unicode Chr) bool _islastchr(sal_Unicode* pStr, sal_Unicode Chr)
{ {
sal_Unicode* p = ustrtoend(pStr); sal_Unicode* p = ustrtoend(pStr);
...@@ -424,10 +416,6 @@ namespace ...@@ -424,10 +416,6 @@ namespace
return aPath; return aPath;
} }
/******************************************************
*
******************************************************/
oslFileError _osl_resolvepath( oslFileError _osl_resolvepath(
/*inout*/ sal_Unicode* path, /*inout*/ sal_Unicode* path,
/*inout*/ bool* failed) /*inout*/ bool* failed)
...@@ -677,10 +665,6 @@ namespace ...@@ -677,10 +665,6 @@ namespace
return bfound; return bfound;
} }
/*********************************************
********************************************/
bool find_in_searchPath(const rtl::OUString& file_path, rtl_uString* search_path, rtl::OUString& result) bool find_in_searchPath(const rtl::OUString& file_path, rtl_uString* search_path, rtl::OUString& result)
{ {
return (search_path && osl::searchPath(file_path, rtl::OUString(search_path), result)); return (search_path && osl::searchPath(file_path, rtl::OUString(search_path), result));
......
...@@ -32,9 +32,6 @@ ...@@ -32,9 +32,6 @@
extern int osl_isSingleCPU; extern int osl_isSingleCPU;
/*****************************************************************************/
/* osl_incrementInterlockedCount */
/*****************************************************************************/
oslInterlockedCount SAL_CALL osl_incrementInterlockedCount(oslInterlockedCount* pCount) oslInterlockedCount SAL_CALL osl_incrementInterlockedCount(oslInterlockedCount* pCount)
{ {
// Fast case for old, slow, single CPU Intel machines for whom // Fast case for old, slow, single CPU Intel machines for whom
...@@ -110,9 +107,6 @@ oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInterlockedCount* ...@@ -110,9 +107,6 @@ oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInterlockedCount*
static pthread_mutex_t InterLock = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t InterLock = PTHREAD_MUTEX_INITIALIZER;
/*****************************************************************************/
/* osl_incrementInterlockedCount */
/*****************************************************************************/
oslInterlockedCount SAL_CALL osl_incrementInterlockedCount(oslInterlockedCount* pCount) oslInterlockedCount SAL_CALL osl_incrementInterlockedCount(oslInterlockedCount* pCount)
{ {
oslInterlockedCount Count; oslInterlockedCount Count;
...@@ -124,9 +118,6 @@ oslInterlockedCount SAL_CALL osl_incrementInterlockedCount(oslInterlockedCount* ...@@ -124,9 +118,6 @@ oslInterlockedCount SAL_CALL osl_incrementInterlockedCount(oslInterlockedCount*
return (Count); return (Count);
} }
/*****************************************************************************/
/* osl_decrementInterlockedCount */
/*****************************************************************************/
oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInterlockedCount* pCount) oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInterlockedCount* pCount)
{ {
oslInterlockedCount Count; oslInterlockedCount Count;
......
...@@ -72,9 +72,6 @@ oslMutex SAL_CALL osl_createMutex() ...@@ -72,9 +72,6 @@ oslMutex SAL_CALL osl_createMutex()
return pMutex; return pMutex;
} }
/*****************************************************************************/
/* osl_destroyMutex */
/*****************************************************************************/
void SAL_CALL osl_destroyMutex(oslMutexImpl *pMutex) void SAL_CALL osl_destroyMutex(oslMutexImpl *pMutex)
{ {
OSL_ASSERT(pMutex); OSL_ASSERT(pMutex);
...@@ -96,9 +93,6 @@ void SAL_CALL osl_destroyMutex(oslMutexImpl *pMutex) ...@@ -96,9 +93,6 @@ void SAL_CALL osl_destroyMutex(oslMutexImpl *pMutex)
return; return;
} }
/*****************************************************************************/
/* osl_acquireMutex */
/*****************************************************************************/
sal_Bool SAL_CALL osl_acquireMutex(oslMutexImpl *pMutex) sal_Bool SAL_CALL osl_acquireMutex(oslMutexImpl *pMutex)
{ {
OSL_ASSERT(pMutex); OSL_ASSERT(pMutex);
...@@ -121,9 +115,6 @@ sal_Bool SAL_CALL osl_acquireMutex(oslMutexImpl *pMutex) ...@@ -121,9 +115,6 @@ sal_Bool SAL_CALL osl_acquireMutex(oslMutexImpl *pMutex)
return sal_False; return sal_False;
} }
/*****************************************************************************/
/* osl_tryToAcquireMutex */
/*****************************************************************************/
sal_Bool SAL_CALL osl_tryToAcquireMutex(oslMutexImpl *pMutex) sal_Bool SAL_CALL osl_tryToAcquireMutex(oslMutexImpl *pMutex)
{ {
OSL_ASSERT(pMutex); OSL_ASSERT(pMutex);
...@@ -142,9 +133,6 @@ sal_Bool SAL_CALL osl_tryToAcquireMutex(oslMutexImpl *pMutex) ...@@ -142,9 +133,6 @@ sal_Bool SAL_CALL osl_tryToAcquireMutex(oslMutexImpl *pMutex)
return sal_False; return sal_False;
} }
/*****************************************************************************/
/* osl_releaseMutex */
/*****************************************************************************/
sal_Bool SAL_CALL osl_releaseMutex(oslMutexImpl *pMutex) sal_Bool SAL_CALL osl_releaseMutex(oslMutexImpl *pMutex)
{ {
OSL_ASSERT(pMutex); OSL_ASSERT(pMutex);
...@@ -167,9 +155,6 @@ sal_Bool SAL_CALL osl_releaseMutex(oslMutexImpl *pMutex) ...@@ -167,9 +155,6 @@ sal_Bool SAL_CALL osl_releaseMutex(oslMutexImpl *pMutex)
return sal_False; return sal_False;
} }
/*****************************************************************************/
/* osl_getGlobalMutex */
/*****************************************************************************/
static oslMutexImpl globalMutexImpl; static oslMutexImpl globalMutexImpl;
......
...@@ -39,10 +39,6 @@ sal_Bool SAL_CALL osl_psz_getUserIdent(oslSecurity Security, sal_Char *pszIdent, ...@@ -39,10 +39,6 @@ sal_Bool SAL_CALL osl_psz_getUserIdent(oslSecurity Security, sal_Char *pszIdent,
oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions Options, oslSecurity Security); oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions Options, oslSecurity Security);
/*****************************************************************************/
/* enum oslPipeError */
/*****************************************************************************/
static struct static struct
{ {
int errcode; int errcode;
...@@ -97,10 +93,6 @@ static oslPipeError osl_PipeErrorFromNative(int nativeType) ...@@ -97,10 +93,6 @@ static oslPipeError osl_PipeErrorFromNative(int nativeType)
#define ERROR_FROM_NATIVE(y) osl_PipeErrorFromNative(y) #define ERROR_FROM_NATIVE(y) osl_PipeErrorFromNative(y)
/*****************************************************************************/
/* osl_create/destroy-PipeImpl */
/*****************************************************************************/
oslPipe __osl_createPipeImpl() oslPipe __osl_createPipeImpl()
{ {
oslPipe pPipeImpl; oslPipe pPipeImpl;
...@@ -122,9 +114,6 @@ void __osl_destroyPipeImpl(oslPipe pImpl) ...@@ -122,9 +114,6 @@ void __osl_destroyPipeImpl(oslPipe pImpl)
} }
/*****************************************************************************/
/* osl_createPipe */
/*****************************************************************************/
oslPipe SAL_CALL osl_createPipe(rtl_uString *ustrPipeName, oslPipeOptions Options, oslSecurity Security) oslPipe SAL_CALL osl_createPipe(rtl_uString *ustrPipeName, oslPipeOptions Options, oslSecurity Security)
{ {
oslPipe pPipe=0; oslPipe pPipe=0;
...@@ -434,9 +423,6 @@ void SAL_CALL osl_closePipe( oslPipe pPipe ) ...@@ -434,9 +423,6 @@ void SAL_CALL osl_closePipe( oslPipe pPipe )
} }
/*****************************************************************************/
/* osl_acceptPipe */
/*****************************************************************************/
oslPipe SAL_CALL osl_acceptPipe(oslPipe pPipe) oslPipe SAL_CALL osl_acceptPipe(oslPipe pPipe)
{ {
int s, flags; int s, flags;
...@@ -502,9 +488,6 @@ oslPipe SAL_CALL osl_acceptPipe(oslPipe pPipe) ...@@ -502,9 +488,6 @@ oslPipe SAL_CALL osl_acceptPipe(oslPipe pPipe)
return pAcceptedPipe; return pAcceptedPipe;
} }
/*****************************************************************************/
/* osl_receivePipe */
/*****************************************************************************/
sal_Int32 SAL_CALL osl_receivePipe(oslPipe pPipe, sal_Int32 SAL_CALL osl_receivePipe(oslPipe pPipe,
void* pBuffer, void* pBuffer,
sal_Int32 BytesToRead) sal_Int32 BytesToRead)
...@@ -532,10 +515,6 @@ sal_Int32 SAL_CALL osl_receivePipe(oslPipe pPipe, ...@@ -532,10 +515,6 @@ sal_Int32 SAL_CALL osl_receivePipe(oslPipe pPipe,
return nRet; return nRet;
} }
/*****************************************************************************/
/* osl_sendPipe */
/*****************************************************************************/
sal_Int32 SAL_CALL osl_sendPipe(oslPipe pPipe, sal_Int32 SAL_CALL osl_sendPipe(oslPipe pPipe,
const void* pBuffer, const void* pBuffer,
sal_Int32 BytesToSend) sal_Int32 BytesToSend)
...@@ -564,10 +543,6 @@ sal_Int32 SAL_CALL osl_sendPipe(oslPipe pPipe, ...@@ -564,10 +543,6 @@ sal_Int32 SAL_CALL osl_sendPipe(oslPipe pPipe,
return nRet; return nRet;
} }
/*****************************************************************************/
/* osl_getLastPipeError */
/*****************************************************************************/
oslPipeError SAL_CALL osl_getLastPipeError(oslPipe pPipe) oslPipeError SAL_CALL osl_getLastPipeError(oslPipe pPipe)
{ {
(void) pPipe; /* unused */ (void) pPipe; /* unused */
......
...@@ -336,10 +336,6 @@ static sal_Bool DeInitSignal() ...@@ -336,10 +336,6 @@ static sal_Bool DeInitSignal()
#if defined (SAL_ENABLE_CRASH_REPORT) && defined(INCLUDE_BACKTRACE) #if defined (SAL_ENABLE_CRASH_REPORT) && defined(INCLUDE_BACKTRACE)
/*****************************************************************************/
/* Generate MD5 checksum */
/*****************************************************************************/
static sal_uInt32 calc_md5_checksum( const char *filename, sal_uInt8 *pChecksum, sal_uInt32 nChecksumLen ) static sal_uInt32 calc_md5_checksum( const char *filename, sal_uInt8 *pChecksum, sal_uInt32 nChecksumLen )
{ {
sal_uInt32 nBytesProcessed = 0; sal_uInt32 nBytesProcessed = 0;
...@@ -937,9 +933,6 @@ static void DUMPCURRENTALLOCS() ...@@ -937,9 +933,6 @@ static void DUMPCURRENTALLOCS()
} }
#endif #endif
/*****************************************************************************/
/* SignalHandlerFunction */
/*****************************************************************************/
void SignalHandlerFunction(int Signal) void SignalHandlerFunction(int Signal)
{ {
oslSignalInfo Info; oslSignalInfo Info;
...@@ -1020,9 +1013,6 @@ void SignalHandlerFunction(int Signal) ...@@ -1020,9 +1013,6 @@ void SignalHandlerFunction(int Signal)
} }
} }
/*****************************************************************************/
/* osl_addSignalHandler */
/*****************************************************************************/
oslSignalHandler SAL_CALL osl_addSignalHandler(oslSignalHandlerFunction Handler, void* pData) oslSignalHandler SAL_CALL osl_addSignalHandler(oslSignalHandlerFunction Handler, void* pData)
{ {
oslSignalHandlerImpl* pHandler; oslSignalHandlerImpl* pHandler;
...@@ -1056,9 +1046,6 @@ oslSignalHandler SAL_CALL osl_addSignalHandler(oslSignalHandlerFunction Handler, ...@@ -1056,9 +1046,6 @@ oslSignalHandler SAL_CALL osl_addSignalHandler(oslSignalHandlerFunction Handler,
return (NULL); return (NULL);
} }
/*****************************************************************************/
/* osl_removeSignalHandler */
/*****************************************************************************/
sal_Bool SAL_CALL osl_removeSignalHandler(oslSignalHandler Handler) sal_Bool SAL_CALL osl_removeSignalHandler(oslSignalHandler Handler)
{ {
oslSignalHandlerImpl *pHandler, *pPrevious = NULL; oslSignalHandlerImpl *pHandler, *pPrevious = NULL;
...@@ -1100,9 +1087,6 @@ sal_Bool SAL_CALL osl_removeSignalHandler(oslSignalHandler Handler) ...@@ -1100,9 +1087,6 @@ sal_Bool SAL_CALL osl_removeSignalHandler(oslSignalHandler Handler)
return (sal_False); return (sal_False);
} }
/*****************************************************************************/
/* osl_raiseSignal */
/*****************************************************************************/
oslSignalAction SAL_CALL osl_raiseSignal(sal_Int32 UserSignal, void* UserData) oslSignalAction SAL_CALL osl_raiseSignal(sal_Int32 UserSignal, void* UserData)
{ {
oslSignalInfo Info; oslSignalInfo Info;
...@@ -1124,9 +1108,6 @@ oslSignalAction SAL_CALL osl_raiseSignal(sal_Int32 UserSignal, void* UserData) ...@@ -1124,9 +1108,6 @@ oslSignalAction SAL_CALL osl_raiseSignal(sal_Int32 UserSignal, void* UserData)
return (Action); return (Action);
} }
/*****************************************************************************/
/* osl_setErrorReporting */
/*****************************************************************************/
sal_Bool SAL_CALL osl_setErrorReporting( sal_Bool bEnable ) sal_Bool SAL_CALL osl_setErrorReporting( sal_Bool bEnable )
{ {
sal_Bool bOld = bErrorReportingEnabled; sal_Bool bOld = bErrorReportingEnabled;
......
This diff is collapsed.
...@@ -269,10 +269,6 @@ static oslFileError osl_create_temp_file_impl_( ...@@ -269,10 +269,6 @@ static oslFileError osl_create_temp_file_impl_(
return osl_error; return osl_error;
} }
/*****************************************************************
* osl_createTempFile
*****************************************************************/
oslFileError SAL_CALL osl_createTempFile( oslFileError SAL_CALL osl_createTempFile(
rtl_uString* pustrDirectoryURL, rtl_uString* pustrDirectoryURL,
oslFileHandle* pHandle, oslFileHandle* pHandle,
......
...@@ -135,18 +135,12 @@ static sal_uInt16 insertThreadId (pthread_t hThread); ...@@ -135,18 +135,12 @@ static sal_uInt16 insertThreadId (pthread_t hThread);
static sal_uInt16 lookupThreadId (pthread_t hThread); static sal_uInt16 lookupThreadId (pthread_t hThread);
static void removeThreadId (pthread_t hThread); static void removeThreadId (pthread_t hThread);
/*****************************************************************************/
/* osl_thread_init_Impl */
/*****************************************************************************/
static void osl_thread_init_Impl (void) static void osl_thread_init_Impl (void)
{ {
osl_thread_priority_init_Impl(); osl_thread_priority_init_Impl();
osl_thread_textencoding_init_Impl(); osl_thread_textencoding_init_Impl();
} }
/*****************************************************************************/
/* osl_thread_construct_Impl */
/*****************************************************************************/
Thread_Impl* osl_thread_construct_Impl (void) Thread_Impl* osl_thread_construct_Impl (void)
{ {
Thread_Impl* pImpl = malloc (sizeof(Thread_Impl)); Thread_Impl* pImpl = malloc (sizeof(Thread_Impl));
...@@ -160,9 +154,6 @@ Thread_Impl* osl_thread_construct_Impl (void) ...@@ -160,9 +154,6 @@ Thread_Impl* osl_thread_construct_Impl (void)
return (pImpl); return (pImpl);
} }
/*****************************************************************************/
/* osl_thread_destruct_Impl */
/*****************************************************************************/
static void osl_thread_destruct_Impl (Thread_Impl ** ppImpl) static void osl_thread_destruct_Impl (Thread_Impl ** ppImpl)
{ {
OSL_ASSERT(ppImpl); OSL_ASSERT(ppImpl);
...@@ -176,9 +167,6 @@ static void osl_thread_destruct_Impl (Thread_Impl ** ppImpl) ...@@ -176,9 +167,6 @@ static void osl_thread_destruct_Impl (Thread_Impl ** ppImpl)
} }
} }
/*****************************************************************************/
/* osl_thread_cleanup_Impl */
/*****************************************************************************/
static void osl_thread_cleanup_Impl (Thread_Impl * pImpl) static void osl_thread_cleanup_Impl (Thread_Impl * pImpl)
{ {
pthread_t thread; pthread_t thread;
...@@ -208,9 +196,6 @@ static void osl_thread_cleanup_Impl (Thread_Impl * pImpl) ...@@ -208,9 +196,6 @@ static void osl_thread_cleanup_Impl (Thread_Impl * pImpl)
} }
} }
/*****************************************************************************/
/* osl_thread_start_Impl */
/*****************************************************************************/
static void* osl_thread_start_Impl (void* pData) static void* osl_thread_start_Impl (void* pData)
{ {
int terminate; int terminate;
...@@ -260,9 +245,6 @@ static void* osl_thread_start_Impl (void* pData) ...@@ -260,9 +245,6 @@ static void* osl_thread_start_Impl (void* pData)
return (0); return (0);
} }
/*****************************************************************************/
/* osl_thread_create_Impl */
/*****************************************************************************/
static oslThread osl_thread_create_Impl ( static oslThread osl_thread_create_Impl (
oslWorkerFunction pWorker, oslWorkerFunction pWorker,
void* pThreadData, void* pThreadData,
...@@ -329,9 +311,6 @@ static oslThread osl_thread_create_Impl ( ...@@ -329,9 +311,6 @@ static oslThread osl_thread_create_Impl (
return ((oslThread)(pImpl)); return ((oslThread)(pImpl));
} }
/*****************************************************************************/
/* osl_createThread */
/*****************************************************************************/
oslThread osl_createThread ( oslThread osl_createThread (
oslWorkerFunction pWorker, oslWorkerFunction pWorker,
void * pThreadData) void * pThreadData)
...@@ -342,9 +321,6 @@ oslThread osl_createThread ( ...@@ -342,9 +321,6 @@ oslThread osl_createThread (
THREADIMPL_FLAGS_ATTACHED); THREADIMPL_FLAGS_ATTACHED);
} }
/*****************************************************************************/
/* osl_createSuspendedThread */
/*****************************************************************************/
oslThread osl_createSuspendedThread ( oslThread osl_createSuspendedThread (
oslWorkerFunction pWorker, oslWorkerFunction pWorker,
void * pThreadData) void * pThreadData)
...@@ -356,9 +332,6 @@ oslThread osl_createSuspendedThread ( ...@@ -356,9 +332,6 @@ oslThread osl_createSuspendedThread (
THREADIMPL_FLAGS_SUSPENDED ); THREADIMPL_FLAGS_SUSPENDED );
} }
/*****************************************************************************/
/* osl_destroyThread */
/*****************************************************************************/
void SAL_CALL osl_destroyThread(oslThread Thread) void SAL_CALL osl_destroyThread(oslThread Thread)
{ {
if (Thread != NULL) { if (Thread != NULL) {
...@@ -374,9 +347,6 @@ void SAL_CALL osl_destroyThread(oslThread Thread) ...@@ -374,9 +347,6 @@ void SAL_CALL osl_destroyThread(oslThread Thread)
} }
} }
/*****************************************************************************/
/* osl_resumeThread */
/*****************************************************************************/
void SAL_CALL osl_resumeThread(oslThread Thread) void SAL_CALL osl_resumeThread(oslThread Thread)
{ {
Thread_Impl* pImpl= (Thread_Impl*)Thread; Thread_Impl* pImpl= (Thread_Impl*)Thread;
...@@ -397,9 +367,6 @@ void SAL_CALL osl_resumeThread(oslThread Thread) ...@@ -397,9 +367,6 @@ void SAL_CALL osl_resumeThread(oslThread Thread)
pthread_mutex_unlock (&(pImpl->m_Lock)); pthread_mutex_unlock (&(pImpl->m_Lock));
} }
/*****************************************************************************/
/* osl_suspendThread */
/*****************************************************************************/
void SAL_CALL osl_suspendThread(oslThread Thread) void SAL_CALL osl_suspendThread(oslThread Thread)
{ {
Thread_Impl* pImpl= (Thread_Impl*)Thread; Thread_Impl* pImpl= (Thread_Impl*)Thread;
...@@ -425,9 +392,6 @@ void SAL_CALL osl_suspendThread(oslThread Thread) ...@@ -425,9 +392,6 @@ void SAL_CALL osl_suspendThread(oslThread Thread)
pthread_mutex_unlock (&(pImpl->m_Lock)); pthread_mutex_unlock (&(pImpl->m_Lock));
} }
/*****************************************************************************/
/* osl_isThreadRunning */
/*****************************************************************************/
sal_Bool SAL_CALL osl_isThreadRunning(const oslThread Thread) sal_Bool SAL_CALL osl_isThreadRunning(const oslThread Thread)
{ {
sal_Bool active; sal_Bool active;
...@@ -443,9 +407,6 @@ sal_Bool SAL_CALL osl_isThreadRunning(const oslThread Thread) ...@@ -443,9 +407,6 @@ sal_Bool SAL_CALL osl_isThreadRunning(const oslThread Thread)
return (active); return (active);
} }
/*****************************************************************************/
/* osl_joinWithThread */
/*****************************************************************************/
void SAL_CALL osl_joinWithThread(oslThread Thread) void SAL_CALL osl_joinWithThread(oslThread Thread)
{ {
pthread_t thread; pthread_t thread;
...@@ -476,9 +437,6 @@ void SAL_CALL osl_joinWithThread(oslThread Thread) ...@@ -476,9 +437,6 @@ void SAL_CALL osl_joinWithThread(oslThread Thread)
} }
} }
/*****************************************************************************/
/* osl_terminateThread */
/*****************************************************************************/
void SAL_CALL osl_terminateThread(oslThread Thread) void SAL_CALL osl_terminateThread(oslThread Thread)
{ {
Thread_Impl* pImpl= (Thread_Impl*)Thread; Thread_Impl* pImpl= (Thread_Impl*)Thread;
...@@ -501,9 +459,6 @@ void SAL_CALL osl_terminateThread(oslThread Thread) ...@@ -501,9 +459,6 @@ void SAL_CALL osl_terminateThread(oslThread Thread)
pthread_mutex_unlock (&(pImpl->m_Lock)); pthread_mutex_unlock (&(pImpl->m_Lock));
} }
/*****************************************************************************/
/* osl_scheduleThread */
/*****************************************************************************/
sal_Bool SAL_CALL osl_scheduleThread(oslThread Thread) sal_Bool SAL_CALL osl_scheduleThread(oslThread Thread)
{ {
int terminate; int terminate;
...@@ -532,9 +487,6 @@ sal_Bool SAL_CALL osl_scheduleThread(oslThread Thread) ...@@ -532,9 +487,6 @@ sal_Bool SAL_CALL osl_scheduleThread(oslThread Thread)
return (terminate == 0); return (terminate == 0);
} }
/*****************************************************************************/
/* osl_waitThread */
/*****************************************************************************/
void SAL_CALL osl_waitThread(const TimeValue* pDelay) void SAL_CALL osl_waitThread(const TimeValue* pDelay)
{ {
if (pDelay) if (pDelay)
...@@ -875,9 +827,6 @@ void SAL_CALL osl_setThreadPriority ( ...@@ -875,9 +827,6 @@ void SAL_CALL osl_setThreadPriority (
#endif /* NO_PTHREAD_PRIORITY */ #endif /* NO_PTHREAD_PRIORITY */
} }
/*****************************************************************************/
/* osl_getThreadPriority */
/*****************************************************************************/
oslThreadPriority SAL_CALL osl_getThreadPriority(const oslThread Thread) oslThreadPriority SAL_CALL osl_getThreadPriority(const oslThread Thread)
{ {
#ifndef NO_PTHREAD_PRIORITY #ifndef NO_PTHREAD_PRIORITY
...@@ -944,9 +893,6 @@ typedef struct _wrapper_pthread_key ...@@ -944,9 +893,6 @@ typedef struct _wrapper_pthread_key
oslThreadKeyCallbackFunction pfnCallback; oslThreadKeyCallbackFunction pfnCallback;
} wrapper_pthread_key; } wrapper_pthread_key;
/*****************************************************************************/
/* osl_createThreadKey */
/*****************************************************************************/
oslThreadKey SAL_CALL osl_createThreadKey( oslThreadKeyCallbackFunction pCallback ) oslThreadKey SAL_CALL osl_createThreadKey( oslThreadKeyCallbackFunction pCallback )
{ {
wrapper_pthread_key *pKey = (wrapper_pthread_key*)rtl_allocateMemory(sizeof(wrapper_pthread_key)); wrapper_pthread_key *pKey = (wrapper_pthread_key*)rtl_allocateMemory(sizeof(wrapper_pthread_key));
...@@ -965,9 +911,6 @@ oslThreadKey SAL_CALL osl_createThreadKey( oslThreadKeyCallbackFunction pCallbac ...@@ -965,9 +911,6 @@ oslThreadKey SAL_CALL osl_createThreadKey( oslThreadKeyCallbackFunction pCallbac
return ((oslThreadKey)pKey); return ((oslThreadKey)pKey);
} }
/*****************************************************************************/
/* osl_destroyThreadKey */
/*****************************************************************************/
void SAL_CALL osl_destroyThreadKey(oslThreadKey Key) void SAL_CALL osl_destroyThreadKey(oslThreadKey Key)
{ {
wrapper_pthread_key *pKey = (wrapper_pthread_key*)Key; wrapper_pthread_key *pKey = (wrapper_pthread_key*)Key;
...@@ -978,18 +921,12 @@ void SAL_CALL osl_destroyThreadKey(oslThreadKey Key) ...@@ -978,18 +921,12 @@ void SAL_CALL osl_destroyThreadKey(oslThreadKey Key)
} }
} }
/*****************************************************************************/
/* osl_getThreadKeyData */
/*****************************************************************************/
void* SAL_CALL osl_getThreadKeyData(oslThreadKey Key) void* SAL_CALL osl_getThreadKeyData(oslThreadKey Key)
{ {
wrapper_pthread_key *pKey = (wrapper_pthread_key*)Key; wrapper_pthread_key *pKey = (wrapper_pthread_key*)Key;
return pKey ? pthread_getspecific(pKey->m_key) : NULL; return pKey ? pthread_getspecific(pKey->m_key) : NULL;
} }
/*****************************************************************************/
/* osl_setThreadKeyData */
/*****************************************************************************/
sal_Bool SAL_CALL osl_setThreadKeyData(oslThreadKey Key, void *pData) sal_Bool SAL_CALL osl_setThreadKeyData(oslThreadKey Key, void *pData)
{ {
sal_Bool bRet; sal_Bool bRet;
...@@ -1040,9 +977,6 @@ static void osl_thread_textencoding_init_Impl (void) ...@@ -1040,9 +977,6 @@ static void osl_thread_textencoding_init_Impl (void)
g_thread.m_textencoding.m_default = defaultEncoding; g_thread.m_textencoding.m_default = defaultEncoding;
} }
/*****************************************************************************/
/* osl_getThreadTextEncoding */
/*****************************************************************************/
rtl_TextEncoding SAL_CALL osl_getThreadTextEncoding() rtl_TextEncoding SAL_CALL osl_getThreadTextEncoding()
{ {
rtl_TextEncoding threadEncoding; rtl_TextEncoding threadEncoding;
...@@ -1059,9 +993,6 @@ rtl_TextEncoding SAL_CALL osl_getThreadTextEncoding() ...@@ -1059,9 +993,6 @@ rtl_TextEncoding SAL_CALL osl_getThreadTextEncoding()
return threadEncoding; return threadEncoding;
} }
/*****************************************************************************/
/* osl_setThreadTextEncoding */
/*****************************************************************************/
rtl_TextEncoding osl_setThreadTextEncoding(rtl_TextEncoding Encoding) rtl_TextEncoding osl_setThreadTextEncoding(rtl_TextEncoding Encoding)
{ {
rtl_TextEncoding oldThreadEncoding = osl_getThreadTextEncoding(); rtl_TextEncoding oldThreadEncoding = osl_getThreadTextEncoding();
......
...@@ -53,10 +53,6 @@ typedef struct timeval osl_time_t; ...@@ -53,10 +53,6 @@ typedef struct timeval osl_time_t;
static osl_time_t startTime; static osl_time_t startTime;
/*--------------------------------------------------
* osl_getSystemTime
*-------------------------------------------------*/
sal_Bool SAL_CALL osl_getSystemTime(TimeValue* tv) sal_Bool SAL_CALL osl_getSystemTime(TimeValue* tv)
{ {
#ifdef __MACH__ #ifdef __MACH__
...@@ -94,10 +90,6 @@ sal_Bool SAL_CALL osl_getSystemTime(TimeValue* tv) ...@@ -94,10 +90,6 @@ sal_Bool SAL_CALL osl_getSystemTime(TimeValue* tv)
} }
/*--------------------------------------------------
* osl_getDateTimeFromTimeValue
*-------------------------------------------------*/
sal_Bool SAL_CALL osl_getDateTimeFromTimeValue( const TimeValue* pTimeVal, oslDateTime* pDateTime ) sal_Bool SAL_CALL osl_getDateTimeFromTimeValue( const TimeValue* pTimeVal, oslDateTime* pDateTime )
{ {
struct tm *pSystemTime; struct tm *pSystemTime;
...@@ -128,10 +120,6 @@ sal_Bool SAL_CALL osl_getDateTimeFromTimeValue( const TimeValue* pTimeVal, oslDa ...@@ -128,10 +120,6 @@ sal_Bool SAL_CALL osl_getDateTimeFromTimeValue( const TimeValue* pTimeVal, oslDa
return sal_False; return sal_False;
} }
/*--------------------------------------------------
* osl_getTimeValueFromDateTime
*--------------------------------------------------*/
sal_Bool SAL_CALL osl_getTimeValueFromDateTime( const oslDateTime* pDateTime, TimeValue* pTimeVal ) sal_Bool SAL_CALL osl_getTimeValueFromDateTime( const oslDateTime* pDateTime, TimeValue* pTimeVal )
{ {
struct tm aTime; struct tm aTime;
...@@ -199,10 +187,6 @@ sal_Bool SAL_CALL osl_getTimeValueFromDateTime( const oslDateTime* pDateTime, Ti ...@@ -199,10 +187,6 @@ sal_Bool SAL_CALL osl_getTimeValueFromDateTime( const oslDateTime* pDateTime, Ti
} }
/*--------------------------------------------------
* osl_getLocalTimeFromSystemTime
*--------------------------------------------------*/
sal_Bool SAL_CALL osl_getLocalTimeFromSystemTime( const TimeValue* pSystemTimeVal, TimeValue* pLocalTimeVal ) sal_Bool SAL_CALL osl_getLocalTimeFromSystemTime( const TimeValue* pSystemTimeVal, TimeValue* pLocalTimeVal )
{ {
struct tm *pLocalTime; struct tm *pLocalTime;
...@@ -236,10 +220,6 @@ sal_Bool SAL_CALL osl_getLocalTimeFromSystemTime( const TimeValue* pSystemTimeVa ...@@ -236,10 +220,6 @@ sal_Bool SAL_CALL osl_getLocalTimeFromSystemTime( const TimeValue* pSystemTimeVa
return sal_False; return sal_False;
} }
/*--------------------------------------------------
* osl_getSystemTimeFromLocalTime
*--------------------------------------------------*/
sal_Bool SAL_CALL osl_getSystemTimeFromLocalTime( const TimeValue* pLocalTimeVal, TimeValue* pSystemTimeVal ) sal_Bool SAL_CALL osl_getSystemTimeFromLocalTime( const TimeValue* pLocalTimeVal, TimeValue* pSystemTimeVal )
{ {
struct tm *pLocalTime; struct tm *pLocalTime;
......
...@@ -34,18 +34,10 @@ ...@@ -34,18 +34,10 @@
#include "osl/diagnose.h" #include "osl/diagnose.h"
/*****************************************************************************/
/* Static Module Functions */
/*****************************************************************************/
static int osl_getHWAddr(const char *ifname, char* hard_addr); static int osl_getHWAddr(const char *ifname, char* hard_addr);
static int osl_checkAddr(const char* addr); static int osl_checkAddr(const char* addr);
/*****************************************************************************/
/* osl_getEthernetAddress */
/*****************************************************************************/
sal_Bool SAL_CALL osl_getEthernetAddress( sal_uInt8 * pAddr ) sal_Bool SAL_CALL osl_getEthernetAddress( sal_uInt8 * pAddr )
{ {
#ifdef SOLARIS #ifdef SOLARIS
...@@ -111,10 +103,6 @@ sal_Bool SAL_CALL osl_getEthernetAddress( sal_uInt8 * pAddr ) ...@@ -111,10 +103,6 @@ sal_Bool SAL_CALL osl_getEthernetAddress( sal_uInt8 * pAddr )
} }
/*****************************************************************************/
/* osl_getHWAddr */
/*****************************************************************************/
static int osl_getHWAddr(const char *ifname, char* hard_addr) static int osl_getHWAddr(const char *ifname, char* hard_addr)
{ {
int ret=0; int ret=0;
...@@ -197,10 +185,6 @@ static int osl_getHWAddr(const char *ifname, char* hard_addr) ...@@ -197,10 +185,6 @@ static int osl_getHWAddr(const char *ifname, char* hard_addr)
} }
/*****************************************************************************/
/* osl_checkAddr */
/*****************************************************************************/
static int osl_checkAddr(const char* addr) static int osl_checkAddr(const char* addr)
{ {
if (addr[0]==0 && addr[1]==0 && if (addr[0]==0 && addr[1]==0 &&
...@@ -219,10 +203,6 @@ static int osl_checkAddr(const char* addr) ...@@ -219,10 +203,6 @@ static int osl_checkAddr(const char* addr)
#include <sys/types.h> #include <sys/types.h>
#include <sys/processor.h> #include <sys/processor.h>
/*****************************************************************************/
/* osl_InitSparcV9 */
/*****************************************************************************/
void osl_InterlockedCountSetV9(sal_Bool bV9); void osl_InterlockedCountSetV9(sal_Bool bV9);
/* /*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment