summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-04-04 08:51:04 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-04-04 10:05:57 +0200
commitb0200601d41aad7e8b177249bd71aca1c4b233d6 (patch)
treebb5a604679746600944a80eb61323fffac3e6344 /sal
parent883844f21af50f2a395fddc6fe86fdced6832c14 (diff)
Clean up unreferenced functions
Change-Id: Id9cb4dbeb6b3313974b881efd6a7c43cb5e314ce
Diffstat (limited to 'sal')
-rw-r--r--sal/inc/getexecutablefile.hxx44
-rw-r--r--sal/osl/unx/file.cxx6
-rw-r--r--sal/osl/unx/file_path_helper.cxx21
-rw-r--r--sal/osl/unx/nlsupport.c4
-rw-r--r--sal/osl/unx/nlsupport.h44
-rw-r--r--sal/osl/unx/osxlocale.cxx4
-rw-r--r--sal/osl/unx/process_impl.cxx18
-rw-r--r--sal/osl/unx/salinit.cxx5
-rw-r--r--sal/osl/unx/saltime.h37
-rw-r--r--sal/osl/unx/socket.c5
-rw-r--r--sal/osl/unx/time.c3
-rw-r--r--sal/osl/w32/process.cxx1
-rw-r--r--sal/rtl/bootstrap.cxx5
13 files changed, 143 insertions, 54 deletions
diff --git a/sal/inc/getexecutablefile.hxx b/sal/inc/getexecutablefile.hxx
new file mode 100644
index 000000000000..9ebf872d97aa
--- /dev/null
+++ b/sal/inc/getexecutablefile.hxx
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SAL_INC_GETEXECUTABLEFILE_HXX
+#define INCLUDED_SAL_INC_GETEXECUTABLEFILE_HXX
+
+#include <sal/config.h>
+
+#include <osl/process.h>
+#include <rtl/ustring.h>
+#include <sal/types.h>
+
+/***************************************
+ osl_bootstrap_getExecutableFile_Impl().
+
+ @internal
+ @see rtl_bootstrap
+ @see #i37371#
+
+ **************************************/
+
+extern "C" oslProcessError SAL_CALL osl_bootstrap_getExecutableFile_Impl (
+ rtl_uString ** ppFileURL
+) SAL_THROW_EXTERN_C();
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx
index 3efa1a09040b..792345da0882 100644
--- a/sal/osl/unx/file.cxx
+++ b/sal/osl/unx/file.cxx
@@ -19,6 +19,7 @@
#include <config_features.h>
+#include "boost/noncopyable.hpp"
#include "osl/file.hxx"
#include "osl/detail/file.h"
@@ -147,14 +148,11 @@ struct FileHandle_Impl
/** Buffer cache / allocator.
*/
- class Allocator
+ class Allocator: private boost::noncopyable
{
rtl_cache_type * m_cache;
size_t m_bufsiz;
- Allocator (Allocator const &);
- Allocator & operator= (Allocator const &);
-
public:
static Allocator & get();
diff --git a/sal/osl/unx/file_path_helper.cxx b/sal/osl/unx/file_path_helper.cxx
index 71c3c3206d16..6c8dab15c5b0 100644
--- a/sal/osl/unx/file_path_helper.cxx
+++ b/sal/osl/unx/file_path_helper.cxx
@@ -21,6 +21,7 @@
#include "file_path_helper.hxx"
#include "uunxapi.hxx"
+#include <boost/noncopyable.hpp>
#include <osl/diagnose.h>
#include <rtl/ustring.hxx>
@@ -154,7 +155,7 @@ sal_Bool SAL_CALL osl_systemPathIsLocalOrParentDirectoryEntry(
the specified character
**********************************************/
-class path_list_iterator
+class path_list_iterator: private boost::noncopyable
{
public:
@@ -214,24 +215,6 @@ private:
const sal_Unicode m_separator;
const sal_Unicode* m_path_segment_begin;
const sal_Unicode* m_path_segment_end;
-
-// prevent copy and assignment
-private:
- /******************************************
- copy constructor
- remember: do not simply copy m_path_begin
- and m_path_end because they point to
- the memory of other.m_path_list!
- *****************************************/
- path_list_iterator(const path_list_iterator& other);
-
- /******************************************
- assignment operator
- remember: do not simply copy m_path_begin
- and m_path_end because they point to
- the memory of other.m_path_list!
- *****************************************/
- path_list_iterator& operator=(const path_list_iterator& other);
};
sal_Bool SAL_CALL osl_searchPath(
diff --git a/sal/osl/unx/nlsupport.c b/sal/osl/unx/nlsupport.c
index 943aa368b813..29eef0af0da1 100644
--- a/sal/osl/unx/nlsupport.c
+++ b/sal/osl/unx/nlsupport.c
@@ -21,6 +21,8 @@
#include <osl/diagnose.h>
#include <osl/process.h>
+#include "nlsupport.h"
+
#if defined(LINUX) || defined(SOLARIS) || defined(NETBSD) || \
defined(FREEBSD) || defined(MACOSX) || defined(IOS) || defined(OPENBSD) || \
defined(DRAGONFLY)
@@ -840,8 +842,6 @@ rtl_TextEncoding osl_getTextEncodingFromLocale( rtl_Locale * pLocale )
return the current process locale
*****************************************************************************/
-int macosx_getLocale(char *locale, sal_uInt32 bufferLen);
-
void _imp_getProcessLocale( rtl_Locale ** ppLocale )
{
static char *locale = NULL;
diff --git a/sal/osl/unx/nlsupport.h b/sal/osl/unx/nlsupport.h
new file mode 100644
index 000000000000..6e243859fe7c
--- /dev/null
+++ b/sal/osl/unx/nlsupport.h
@@ -0,0 +1,44 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SAL_OSL_UNX_NLSUPPORT_H
+#define INCLUDED_SAL_OSL_UNX_NLSUPPORT_H
+
+#include <sal/config.h>
+
+#include <rtl/locale.h>
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+void _imp_getProcessLocale( rtl_Locale ** );
+int _imp_setProcessLocale( rtl_Locale * );
+
+#if defined IOS || defined MACOSX
+int macosx_getLocale(char *locale, sal_uInt32 bufferLen);
+#endif
+
+#if defined __cplusplus
+}
+#endif
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/osl/unx/osxlocale.cxx b/sal/osl/unx/osxlocale.cxx
index 761897097aab..a64238ec6767 100644
--- a/sal/osl/unx/osxlocale.cxx
+++ b/sal/osl/unx/osxlocale.cxx
@@ -27,6 +27,8 @@
#include <CoreFoundation/CoreFoundation.h>
#include <postmac.h>
+#include <nlsupport.h>
+
namespace
{
template <typename T>
@@ -61,7 +63,6 @@ namespace
/** Grab current locale from system.
*/
-extern "C" {
int macosx_getLocale(char *locale, sal_uInt32 bufferLen)
{
CFStringRef sref = getProcessLocale();
@@ -93,6 +94,5 @@ int macosx_getLocale(char *locale, sal_uInt32 bufferLen)
return noErr;
}
-}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/osl/unx/process_impl.cxx b/sal/osl/unx/process_impl.cxx
index ed79616641e7..d28f46d44138 100644
--- a/sal/osl/unx/process_impl.cxx
+++ b/sal/osl/unx/process_impl.cxx
@@ -34,24 +34,13 @@
#include "file_path_helper.h"
#include "uunxapi.h"
+#include "getexecutablefile.hxx"
+#include "nlsupport.h"
#ifdef ANDROID
#include <osl/detail/android-bootstrap.h>
#endif
-/***************************************
- osl_bootstrap_getExecutableFile_Impl().
-
- @internal
- @see rtl_bootstrap
- @see #i37371#
-
- **************************************/
-
-extern "C" oslProcessError SAL_CALL osl_bootstrap_getExecutableFile_Impl (
- rtl_uString ** ppFileURL
-) SAL_THROW_EXTERN_C();
-
#if defined(MACOSX) || defined(IOS)
#include <mach-o/dyld.h>
@@ -458,9 +447,6 @@ static struct ProcessLocale_Impl g_process_locale =
0
};
-extern "C" void _imp_getProcessLocale( rtl_Locale ** );
-extern "C" int _imp_setProcessLocale( rtl_Locale * );
-
/**********************************************
osl_getProcessLocale().
*********************************************/
diff --git a/sal/osl/unx/salinit.cxx b/sal/osl/unx/salinit.cxx
index 07c0955a36fd..832fa8b39e57 100644
--- a/sal/osl/unx/salinit.cxx
+++ b/sal/osl/unx/salinit.cxx
@@ -32,6 +32,8 @@
#include "sal/main.h"
#include "sal/types.h"
+#include <saltime.h>
+
#if HAVE_SYSLOG_H
#include <string.h>
#include <syslog.h>
@@ -41,9 +43,6 @@ extern bool sal_use_syslog;
extern "C" {
-//From time.c
-void sal_initGlobalTimer();
-
void sal_detail_initialize(int argc, char ** argv) {
#if defined MACOSX && !HAVE_FEATURE_MACOSX_SANDBOX
// On OS X when not sandboxed, soffice can restart itself via exec (see
diff --git a/sal/osl/unx/saltime.h b/sal/osl/unx/saltime.h
new file mode 100644
index 000000000000..001944f53904
--- /dev/null
+++ b/sal/osl/unx/saltime.h
@@ -0,0 +1,37 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef INCLUDED_SAL_OSL_UNX_SALTIME_H
+#define INCLUDED_SAL_OSL_UNX_SALTIME_H
+
+#include <sal/config.h>
+
+#if defined __cplusplus
+extern "C" {
+#endif
+
+void sal_initGlobalTimer();
+
+#if defined __cplusplus
+}
+#endif
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sal/osl/unx/socket.c b/sal/osl/unx/socket.c
index acb42ff7cfe4..170a59422cd7 100644
--- a/sal/osl/unx/socket.c
+++ b/sal/osl/unx/socket.c
@@ -402,11 +402,6 @@ static oslSocketError osl_SocketErrorFromNative(int nativeType)
oslSocketAddr SAL_CALL osl_psz_createInetSocketAddr (
const sal_Char* pszDottedAddr, sal_Int32 Port);
-oslSocketAddr SAL_CALL osl_psz_createIpxSocketAddr (
- const sal_Char NetNumber[4],
- const sal_Char NodeNumber[6],
- sal_uInt32 SocketNumber);
-
oslHostAddr SAL_CALL osl_psz_createHostAddr (
const sal_Char *pszHostname, const oslSocketAddr Addr);
diff --git a/sal/osl/unx/time.c b/sal/osl/unx/time.c
index 15a3e43843b8..e80fd41aaab6 100644
--- a/sal/osl/unx/time.c
+++ b/sal/osl/unx/time.c
@@ -17,6 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include "saltime.h"
#include "system.h"
#include <osl/diagnose.h>
diff --git a/sal/osl/w32/process.cxx b/sal/osl/w32/process.cxx
index 830e41180c85..3dd0e77d57fc 100644
--- a/sal/osl/w32/process.cxx
+++ b/sal/osl/w32/process.cxx
@@ -34,6 +34,7 @@
#include <osl/mutex.h>
#include <osl/thread.h>
+#include "getexecutablefile.hxx"
#include "procimpl.h"
#include "sockimpl.h"
#include "file_url.h"
diff --git a/sal/rtl/bootstrap.cxx b/sal/rtl/bootstrap.cxx
index a6f57022e147..8e92f13ade60 100644
--- a/sal/rtl/bootstrap.cxx
+++ b/sal/rtl/bootstrap.cxx
@@ -43,6 +43,8 @@
#include <boost/unordered_map.hpp>
#include <list>
+#include "getexecutablefile.hxx"
+
#ifdef ANDROID
#include <osl/detail/android-bootstrap.h>
#endif
@@ -215,9 +217,6 @@ static bool getFromCommandLineArgs(
return found;
}
-extern "C" oslProcessError SAL_CALL osl_bootstrap_getExecutableFile_Impl (
- rtl_uString ** ppFileURL) SAL_THROW_EXTERN_C();
-
inline void getExecutableFile_Impl (rtl_uString ** ppFileURL)
{
osl_bootstrap_getExecutableFile_Impl (ppFileURL);