tdf#146619 Remove unused includes from sal/osl/unx

Change-Id: Icc9cd3410cde2589ea51385c651243e11cc2f1d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155855
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
This commit is contained in:
Gabor Kelemen 2023-08-19 00:04:02 +02:00 committed by Miklos Vajna
parent 9e53afb9ca
commit 252132d975
29 changed files with 63 additions and 97 deletions

View File

@ -7,9 +7,14 @@ excludelist:
sal/osl/unx/backtrace.h: sal/osl/unx/backtrace.h:
# needed for the "shadow" backtrace API # needed for the "shadow" backtrace API
- execinfo.h - execinfo.h
sal/osl/unx/nlsupport.hxx:
# Needed on MACOSX
- #include <rtl/ustring.hxx>
sal/osl/unx/system.hxx: sal/osl/unx/system.hxx:
# needed for the define pthread_testcancel() to work # needed for the define pthread_testcancel() to work
- pthread.h - pthread.h
# needed for the INIT_GROUPS macro to work
- grp.h
sal/android/uthash.h: sal/android/uthash.h:
# needed for defines to work / somehow on Linux there is a warning about android-related file # needed for defines to work / somehow on Linux there is a warning about android-related file
- string.h - string.h
@ -34,3 +39,30 @@ excludelist:
sal/qa/rtl/textenc/rtl_textcvt.cxx: sal/qa/rtl/textenc/rtl_textcvt.cxx:
# Required in C++20 mode. # Required in C++20 mode.
- o3tl/cppunittraitshelper.hxx - o3tl/cppunittraitshelper.hxx
sal/osl/unx/file.cxx:
# Needed for macxp_resolveAlias on MACOSX
- system.hxx
sal/osl/unx/file_misc.cxx:
# Needed for macxp_resolveAlias on MACOSX
- system.hxx
sal/osl/unx/file_stat.cxx:
# Needed for macxp_resolveAlias on MACOSX
- system.hxx
sal/osl/unx/file_volume.cxx:
# Needed for macxp_resolveAlias on MACOSX
- system.hxx
# Needed for HAVE_STATFS_H cases
- osl/thread.h
sal/osl/unx/backtraceapi.cxx:
# needed for the "shadow" backtrace API
- backtrace.h
sal/osl/unx/signal.cxx:
# needed for the "shadow" backtrace API
- backtrace.h
sal/osl/unx/thread.cxx:
# needed for older glibc
- sys/syscall.h
- o3tl/safeint.hxx
sal/osl/unx/uunxapi.cxx:
# Needed for macxp_resolveAlias on MACOSX
- system.hxx

View File

@ -10,7 +10,7 @@
#ifndef INCLUDED_SAL_INC_INTERNAL_OSLRANDOM_H #ifndef INCLUDED_SAL_INC_INTERNAL_OSLRANDOM_H
#define INCLUDED_SAL_INC_INTERNAL_OSLRANDOM_H #define INCLUDED_SAL_INC_INTERNAL_OSLRANDOM_H
#include <stddef.h> #include <cstddef>
#if defined __cplusplus #if defined __cplusplus
extern "C" { extern "C" {

View File

@ -54,7 +54,6 @@ std::unique_ptr<sal::BacktraceState> sal::backtrace_get(sal_uInt32 maxDepth)
#include <vector> #include <vector>
#include <osl/process.h> #include <osl/process.h>
#include <rtl/strbuf.hxx> #include <rtl/strbuf.hxx>
#include <osl/mutex.hxx>
#include <o3tl/lru_map.hxx> #include <o3tl/lru_map.hxx>
#include "file_url.hxx" #include "file_url.hxx"

View File

@ -19,14 +19,10 @@
#include <config_features.h> #include <config_features.h>
#include <o3tl/safeint.hxx> #include <o3tl/safeint.hxx>
#include <o3tl/string_view.hxx>
#include <o3tl/typed_flags_set.hxx> #include <o3tl/typed_flags_set.hxx>
#include <sal/log.hxx> #include <sal/log.hxx>
#include <osl/diagnose.h>
#include <osl/file.hxx>
#include <osl/detail/file.h> #include <osl/detail/file.h>
#include <rtl/alloc.h> #include <rtl/byteseq.h>
#include <rtl/byteseq.hxx>
#include <rtl/string.hxx> #include <rtl/string.hxx>
#include "system.hxx" #include "system.hxx"
@ -39,14 +35,13 @@
#include <algorithm> #include <algorithm>
#include <atomic> #include <atomic>
#include <vector>
#include <cassert> #include <cassert>
#include <fcntl.h>
#include <limits> #include <limits>
#include <limits.h>
#include <dirent.h>
#include <string.h> #include <string.h>
#include <pthread.h> #include <pthread.h>
#include <sys/file.h>
#include <sys/mman.h> #include <sys/mman.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
@ -65,6 +60,8 @@
#include <osl/detail/android-bootstrap.h> #include <osl/detail/android-bootstrap.h>
#include <android/log.h> #include <android/log.h>
#include <android/asset_manager.h> #include <android/asset_manager.h>
#include <o3tl/string_view.hxx>
#include <vector>
#endif #endif
namespace { namespace {

View File

@ -17,13 +17,9 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <osl/file.hxx>
#include <osl/detail/file.h> #include <osl/detail/file.h>
#include <osl/diagnose.h> #include <osl/diagnose.h>
#include <osl/thread.h>
#include <osl/signal.h>
#include <rtl/alloc.h>
#include <rtl/string.hxx> #include <rtl/string.hxx>
#include <sal/log.hxx> #include <sal/log.hxx>
@ -36,22 +32,17 @@
#include "readwrite_helper.hxx" #include "readwrite_helper.hxx"
#include "unixerrnostring.hxx" #include "unixerrnostring.hxx"
#include <sys/types.h>
#include <errno.h> #include <errno.h>
#include <dirent.h> #include <dirent.h>
#include <fcntl.h>
#include <limits.h> #include <limits.h>
#include <stdio.h> #include <stdio.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <utime.h> #include <utime.h>
#include <sys/file.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/mman.h>
#include <algorithm> #include <algorithm>
#include <cassert>
#include <cstring>
#include <memory>
#include <new> #include <new>
#ifdef ANDROID #ifdef ANDROID

View File

@ -19,9 +19,7 @@
#include <osl/file.h> #include <osl/file.h>
#include "system.hxx"
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h>
#include <dirent.h> #include <dirent.h>
#include <errno.h> #include <errno.h>
#include <limits.h> #include <limits.h>
@ -31,6 +29,7 @@
#include <osl/diagnose.h> #include <osl/diagnose.h>
#include <osl/thread.h> #include <osl/thread.h>
#include "system.hxx"
#include "file_impl.hxx" #include "file_impl.hxx"
#include "file_error_transl.hxx" #include "file_error_transl.hxx"
#include "file_path_helper.hxx" #include "file_path_helper.hxx"

View File

@ -19,18 +19,13 @@
#include "file_url.hxx" #include "file_url.hxx"
#include "system.hxx"
#include <algorithm> #include <algorithm>
#include <cassert> #include <cassert>
#include <cstring> #include <cstring>
#include <stdexcept> #include <stdexcept>
#include <string_view> #include <string_view>
#include <type_traits>
#include <limits.h> #include <limits.h>
#include <errno.h> #include <errno.h>
#include <strings.h>
#include <unistd.h>
#include <o3tl/safeint.hxx> #include <o3tl/safeint.hxx>
#include <osl/file.hxx> #include <osl/file.hxx>
@ -46,7 +41,6 @@
#include <rtl/uri.h> #include <rtl/uri.h>
#include <rtl/uri.hxx> #include <rtl/uri.hxx>
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
#include <rtl/ustrbuf.h>
#include <rtl/ustrbuf.hxx> #include <rtl/ustrbuf.hxx>
#include <rtl/textcvt.h> #include <rtl/textcvt.h>
#include <sal/log.hxx> #include <sal/log.hxx>

View File

@ -23,7 +23,6 @@
#include <osl/diagnose.h> #include <osl/diagnose.h>
#include <osl/thread.h> #include <osl/thread.h>
#include <rtl/alloc.h>
#include "file_error_transl.hxx" #include "file_error_transl.hxx"
#include "file_url.hxx" #include "file_url.hxx"
@ -31,11 +30,8 @@
#include <errno.h> #include <errno.h>
#include <limits.h> #include <limits.h>
#include <stdio.h>
#include <string.h> #include <string.h>
#include <unistd.h> #include <unistd.h>
#include <sys/wait.h>
#include <sal/macros.h>
#ifdef HAVE_STATFS_H #ifdef HAVE_STATFS_H
#undef HAVE_STATFS_H #undef HAVE_STATFS_H
@ -53,9 +49,7 @@
#define HAVE_STATFS_H #define HAVE_STATFS_H
#elif defined(LINUX) #elif defined(LINUX)
#include <sys/statfs.h>
#include <mntent.h>
#include <sys/vfs.h>
#define HAVE_STATFS_H #define HAVE_STATFS_H
#elif defined(NETBSD) || defined(FREEBSD) || defined(OPENBSD) || defined(DRAGONFLY) #elif defined(NETBSD) || defined(FREEBSD) || defined(OPENBSD) || defined(DRAGONFLY)

View File

@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include "system.hxx"
#include <config_global.h> #include <config_global.h>
#include <osl/interlck.h> #include <osl/interlck.h>

View File

@ -23,14 +23,12 @@
#include <sal/types.h> #include <sal/types.h>
#include <osl/module.h> #include <osl/module.h>
#include <osl/thread.h> #include <osl/thread.h>
#include <osl/process.h>
#include <osl/file.h> #include <osl/file.h>
#include <rtl/string.hxx> #include <rtl/string.hxx>
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
#include <assert.h> #include <assert.h>
#include <dlfcn.h> #include <dlfcn.h>
#include <dirent.h> #include <limits.h>
#include "system.hxx"
#include "file_url.hxx" #include "file_url.hxx"
static bool getModulePathFromAddress(void * address, rtl_String ** path) static bool getModulePathFromAddress(void * address, rtl_String ** path)

View File

@ -23,7 +23,6 @@
#define _GNU_SOURCE 1 #define _GNU_SOURCE 1
#endif #endif
#endif #endif
#include "system.hxx"
#include "unixerrnostring.hxx" #include "unixerrnostring.hxx"
#include <sal/log.hxx> #include <sal/log.hxx>

View File

@ -20,14 +20,12 @@
#include <sal/config.h> #include <sal/config.h>
#include <algorithm> #include <algorithm>
#include <cassert>
#include <cstring> #include <cstring>
#include <osl/nlsupport.h> #include <osl/nlsupport.h>
#include <osl/diagnose.h> #include <osl/diagnose.h>
#include <osl/process.h> #include <osl/process.h>
#include <rtl/string.hxx>
#include <rtl/ustring.hxx>
#include <sal/log.hxx>
#include "nlsupport.hxx" #include "nlsupport.hxx"
@ -45,11 +43,11 @@
#elif defined(MACOSX) || defined(IOS) #elif defined(MACOSX) || defined(IOS)
#include <osl/module.h> #include <osl/module.h>
#include <osl/thread.h> #include <osl/thread.h>
#include <rtl/ustring.hxx>
#include <sal/log.hxx>
#include "system.hxx" #include "system.hxx"
#endif #endif
#include <string.h>
namespace { namespace {
struct Pair { struct Pair {

View File

@ -23,6 +23,7 @@
#include <sal/config.h> #include <sal/config.h>
#include <rtl/locale.h> #include <rtl/locale.h>
#include <rtl/ustring.hxx>
namespace rtl namespace rtl
{ {

View File

@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include "system.hxx"
#include <o3tl/safeint.hxx> #include <o3tl/safeint.hxx>
#include <osl/pipe.h> #include <osl/pipe.h>
#include <osl/diagnose.h> #include <osl/diagnose.h>
@ -35,7 +33,7 @@
#include <cassert> #include <cassert>
#include <cstring> #include <cstring>
#include <sys/file.h> #include <fcntl.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>

View File

@ -21,8 +21,8 @@
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
#include <cassert> #include <cassert>
#include <dirent.h> #include <fcntl.h>
#include <sys/file.h> #include <limits.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <unistd.h> #include <unistd.h>
@ -57,16 +57,11 @@
#include <osl/thread.h> #include <osl/thread.h>
#include <osl/file.h> #include <osl/file.h>
#include <osl/file.hxx> #include <osl/file.hxx>
#include <osl/signal.h>
#include <rtl/alloc.h>
#include <sal/log.hxx> #include <sal/log.hxx>
#include <grp.h>
#include "createfilehandlefromfd.hxx" #include "createfilehandlefromfd.hxx"
#include "file_url.hxx" #include "file_url.hxx"
#include "readwrite_helper.hxx" #include "readwrite_helper.hxx"
#include "sockimpl.hxx"
#include "secimpl.hxx" #include "secimpl.hxx"
#define MAX_ARGS 255 #define MAX_ARGS 255

View File

@ -33,7 +33,6 @@
#include <osl/thread.h> #include <osl/thread.h>
#include <rtl/alloc.h> #include <rtl/alloc.h>
#include <rtl/ustring.hxx> #include <rtl/ustring.hxx>
#include <rtl/strbuf.h>
#include <sal/log.hxx> #include <sal/log.hxx>
#include "file_path_helper.hxx" #include "file_path_helper.hxx"

View File

@ -24,15 +24,12 @@
#include <osl/diagnose.h> #include <osl/diagnose.h>
#include <osl/profile.h> #include <osl/profile.h>
#include <osl/process.h>
#include <osl/thread.h>
#include <rtl/alloc.h>
#include <sal/log.hxx> #include <sal/log.hxx>
#include <dirent.h> #include <fcntl.h>
#include <sys/file.h> #include <limits.h>
#include <string.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/un.h>
#include <unistd.h> #include <unistd.h>
#define LINES_INI 32 #define LINES_INI 32

View File

@ -7,11 +7,11 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. * file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/ */
#include "system.hxx"
#include <oslrandom.h> #include <oslrandom.h>
#include <assert.h> #include <assert.h>
#include <sys/file.h> #include <errno.h>
#include <fcntl.h>
#include <unistd.h> #include <unistd.h>
int osl_get_system_random_data(char* buffer, size_t desired_len) int osl_get_system_random_data(char* buffer, size_t desired_len)

View File

@ -12,13 +12,12 @@
#include <algorithm> #include <algorithm>
#include <cassert> #include <cassert>
#include <cstddef> #include <cstddef>
#include <errno.h>
#include <limits> #include <limits>
#include <unistd.h> #include <unistd.h>
#include "readwrite_helper.hxx" #include "readwrite_helper.hxx"
#include "system.hxx"
namespace { namespace {
std::size_t cap_ssize_t(std::size_t value) { std::size_t cap_ssize_t(std::size_t value) {

View File

@ -31,7 +31,6 @@
#include <config_global.h> #include <config_global.h>
#include <osl/process.h> #include <osl/process.h>
#include <sal/main.h> #include <sal/main.h>
#include <sal/types.h>
#include "saltime.hxx" #include "saltime.hxx"
#include "soffice.hxx" #include "soffice.hxx"

View File

@ -32,20 +32,14 @@
#include <postmac.h> #include <postmac.h>
#endif #endif
#include "system.hxx"
#include <o3tl/safeint.hxx> #include <o3tl/safeint.hxx>
#include <osl/security.h> #include <osl/security.h>
#include <rtl/bootstrap.hxx> #include <rtl/string.hxx>
#include <sal/log.hxx> #include <sal/log.hxx>
#include <osl/thread.h> #include <osl/thread.h>
#include <osl/file.h> #include <osl/file.h>
#if defined LINUX || defined __sun
#include <crypt.h>
#endif
#if defined HAIKU #if defined HAIKU
#include <fs_info.h> #include <fs_info.h>
#include <FindDirectory.h> #include <FindDirectory.h>
@ -55,6 +49,7 @@
#ifdef ANDROID #ifdef ANDROID
#define getpwuid_r(uid, pwd, buf, buflen, result) (*(result) = getpwuid(uid), (*(result) ? (memcpy (buf, *(result), sizeof (struct passwd)), 0) : errno)) #define getpwuid_r(uid, pwd, buf, buflen, result) (*(result) = getpwuid(uid), (*(result) ? (memcpy (buf, *(result), sizeof (struct passwd)), 0) : errno))
#include <rtl/bootstrap.hxx>
#endif #endif
static bool osl_psz_getHomeDir(oslSecurity Security, OString* pszDirectory); static bool osl_psz_getHomeDir(oslSecurity Security, OString* pszDirectory);

View File

@ -24,8 +24,6 @@
#include <config_features.h> #include <config_features.h>
#include "soffice.hxx" #include "soffice.hxx"
/* system headers */
#include "system.hxx"
#include "backtrace.h" #include "backtrace.h"
@ -35,10 +33,7 @@
#include <osl/signal.h> #include <osl/signal.h>
#include <sal/log.hxx> #include <sal/log.hxx>
#include <sal/macros.h> #include <sal/macros.h>
#include <rtl/bootstrap.h>
#include <rtl/digest.h>
#include "file_path_helper.hxx"
#define ACT_IGNORE 1 #define ACT_IGNORE 1
#define ACT_EXIT 2 #define ACT_EXIT 2
#define ACT_SYSTEM 3 #define ACT_SYSTEM 3
@ -49,7 +44,7 @@
#include <valgrind/memcheck.h> #include <valgrind/memcheck.h>
#endif #endif
#include <sys/wait.h> #include <signal.h>
#include <unistd.h> #include <unistd.h>
namespace namespace

View File

@ -24,8 +24,6 @@
#include "system.hxx" #include "system.hxx"
#include <osl/socket.h> #include <osl/socket.h>
#include <osl/mutex.h>
#include <osl/signal.h>
#include <rtl/alloc.h> #include <rtl/alloc.h>
#include <rtl/byteseq.h> #include <rtl/byteseq.h>
@ -39,10 +37,10 @@
#include <oslsocket.hxx> #include <oslsocket.hxx>
#include <arpa/inet.h> #include <arpa/inet.h>
#include <fcntl.h>
#include <netdb.h> #include <netdb.h>
#include <netinet/tcp.h> #include <netinet/tcp.h>
#include <poll.h> #include <poll.h>
#include <sys/file.h>
#include <unistd.h> #include <unistd.h>
/* defines for shutdown */ /* defines for shutdown */

View File

@ -17,17 +17,14 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <unistd.h>
#include <string.h>
#include <config_features.h>
#include "system.hxx" #include "system.hxx"
#ifdef NO_PTHREAD_RTL #ifdef NO_PTHREAD_RTL
#if defined(MACOSX) #if defined(MACOSX)
#include <config_features.h>
#include <premac.h> #include <premac.h>
#include <Foundation/Foundation.h> #include <Foundation/Foundation.h>
#include <postmac.h> #include <postmac.h>

View File

@ -20,6 +20,7 @@
#pragma once #pragma once
#include <errno.h> #include <errno.h>
#include <grp.h>
/* Make sockets of type AF_UNIX use underlying FS rights */ /* Make sockets of type AF_UNIX use underlying FS rights */
#if defined(__sun) && !defined(_XOPEN_SOURCE) #if defined(__sun) && !defined(_XOPEN_SOURCE)

View File

@ -17,13 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/time.h> #include <sys/time.h>
#include <unistd.h> #include <unistd.h>
#include "system.hxx"
#include <osl/file.h> #include <osl/file.h>
#include <osl/thread.h> #include <osl/thread.h>
#include <rtl/ustrbuf.h> #include <rtl/ustrbuf.h>

View File

@ -20,8 +20,6 @@
#include <sal/config.h> #include <sal/config.h>
#include <cassert> #include <cassert>
#include <cstddef>
#include <limits>
#include <functional> #include <functional>
#include <mutex> #include <mutex>
#include <unistd.h> #include <unistd.h>
@ -45,7 +43,6 @@
#include <osl/thread.h> #include <osl/thread.h>
#include <osl/nlsupport.h> #include <osl/nlsupport.h>
#include <rtl/textenc.h> #include <rtl/textenc.h>
#include <rtl/alloc.h>
#include <sal/log.hxx> #include <sal/log.hxx>
#include <sal/macros.h> #include <sal/macros.h>
#ifdef ANDROID #ifdef ANDROID

View File

@ -20,7 +20,6 @@
#include <sal/config.h> #include <sal/config.h>
#include "saltime.hxx" #include "saltime.hxx"
#include "system.hxx"
#include <osl/time.h> #include <osl/time.h>
#include <time.h> #include <time.h>

View File

@ -31,9 +31,9 @@
#include <osl/thread.h> #include <osl/thread.h>
#include <sal/log.hxx> #include <sal/log.hxx>
#include <sys/file.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <unistd.h> #include <unistd.h>
#include <fcntl.h>
#include <utime.h> #include <utime.h>
#ifdef ANDROID #ifdef ANDROID