diff --git a/sal/IwyuFilter_sal.yaml b/sal/IwyuFilter_sal.yaml index 0bfa0a3d07a4..0871e1c82d46 100644 --- a/sal/IwyuFilter_sal.yaml +++ b/sal/IwyuFilter_sal.yaml @@ -7,9 +7,14 @@ excludelist: sal/osl/unx/backtrace.h: # needed for the "shadow" backtrace API - execinfo.h + sal/osl/unx/nlsupport.hxx: + # Needed on MACOSX + - #include sal/osl/unx/system.hxx: # needed for the define pthread_testcancel() to work - pthread.h + # needed for the INIT_GROUPS macro to work + - grp.h sal/android/uthash.h: # needed for defines to work / somehow on Linux there is a warning about android-related file - string.h @@ -34,3 +39,30 @@ excludelist: sal/qa/rtl/textenc/rtl_textcvt.cxx: # Required in C++20 mode. - 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 diff --git a/sal/inc/oslrandom.h b/sal/inc/oslrandom.h index 8f5dfffae426..b65878433225 100644 --- a/sal/inc/oslrandom.h +++ b/sal/inc/oslrandom.h @@ -10,7 +10,7 @@ #ifndef INCLUDED_SAL_INC_INTERNAL_OSLRANDOM_H #define INCLUDED_SAL_INC_INTERNAL_OSLRANDOM_H -#include +#include #if defined __cplusplus extern "C" { diff --git a/sal/osl/unx/backtraceapi.cxx b/sal/osl/unx/backtraceapi.cxx index a4cec46ca95b..4c1f25b886ae 100644 --- a/sal/osl/unx/backtraceapi.cxx +++ b/sal/osl/unx/backtraceapi.cxx @@ -54,7 +54,6 @@ std::unique_ptr sal::backtrace_get(sal_uInt32 maxDepth) #include #include #include -#include #include #include "file_url.hxx" diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx index 4b1313586e81..a831221a3c36 100644 --- a/sal/osl/unx/file.cxx +++ b/sal/osl/unx/file.cxx @@ -19,14 +19,10 @@ #include #include -#include #include #include -#include -#include #include -#include -#include +#include #include #include "system.hxx" @@ -39,14 +35,13 @@ #include #include -#include #include +#include #include +#include -#include #include #include -#include #include #include #include @@ -65,6 +60,8 @@ #include #include #include +#include +#include #endif namespace { diff --git a/sal/osl/unx/file_misc.cxx b/sal/osl/unx/file_misc.cxx index 8e079fe44e42..ce2701f8cf1a 100644 --- a/sal/osl/unx/file_misc.cxx +++ b/sal/osl/unx/file_misc.cxx @@ -17,13 +17,9 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include #include #include -#include -#include -#include #include #include @@ -36,22 +32,17 @@ #include "readwrite_helper.hxx" #include "unixerrnostring.hxx" -#include #include #include +#include #include #include #include #include #include -#include #include -#include #include -#include -#include -#include #include #ifdef ANDROID diff --git a/sal/osl/unx/file_stat.cxx b/sal/osl/unx/file_stat.cxx index fe56386d8719..5c165132e9f3 100644 --- a/sal/osl/unx/file_stat.cxx +++ b/sal/osl/unx/file_stat.cxx @@ -19,9 +19,7 @@ #include -#include "system.hxx" #include -#include #include #include #include @@ -31,6 +29,7 @@ #include #include +#include "system.hxx" #include "file_impl.hxx" #include "file_error_transl.hxx" #include "file_path_helper.hxx" diff --git a/sal/osl/unx/file_url.cxx b/sal/osl/unx/file_url.cxx index c69670d6373a..be98df95f14e 100644 --- a/sal/osl/unx/file_url.cxx +++ b/sal/osl/unx/file_url.cxx @@ -19,18 +19,13 @@ #include "file_url.hxx" -#include "system.hxx" - #include #include #include #include #include -#include #include #include -#include -#include #include #include @@ -46,7 +41,6 @@ #include #include #include -#include #include #include #include diff --git a/sal/osl/unx/file_volume.cxx b/sal/osl/unx/file_volume.cxx index 5e661bd656c3..e20b8a27d00e 100644 --- a/sal/osl/unx/file_volume.cxx +++ b/sal/osl/unx/file_volume.cxx @@ -23,7 +23,6 @@ #include #include -#include #include "file_error_transl.hxx" #include "file_url.hxx" @@ -31,11 +30,8 @@ #include #include -#include #include #include -#include -#include #ifdef HAVE_STATFS_H #undef HAVE_STATFS_H @@ -53,9 +49,7 @@ #define HAVE_STATFS_H #elif defined(LINUX) - -#include -#include +#include #define HAVE_STATFS_H #elif defined(NETBSD) || defined(FREEBSD) || defined(OPENBSD) || defined(DRAGONFLY) diff --git a/sal/osl/unx/interlck.cxx b/sal/osl/unx/interlck.cxx index 81404cb57a7a..8bc63211b328 100644 --- a/sal/osl/unx/interlck.cxx +++ b/sal/osl/unx/interlck.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "system.hxx" - #include #include diff --git a/sal/osl/unx/module.cxx b/sal/osl/unx/module.cxx index 532633f31d28..0da54f475847 100644 --- a/sal/osl/unx/module.cxx +++ b/sal/osl/unx/module.cxx @@ -23,14 +23,12 @@ #include #include #include -#include #include #include #include #include #include -#include -#include "system.hxx" +#include #include "file_url.hxx" static bool getModulePathFromAddress(void * address, rtl_String ** path) diff --git a/sal/osl/unx/mutex.cxx b/sal/osl/unx/mutex.cxx index 1ca4958fd01d..e3786e43a1f4 100644 --- a/sal/osl/unx/mutex.cxx +++ b/sal/osl/unx/mutex.cxx @@ -23,7 +23,6 @@ #define _GNU_SOURCE 1 #endif #endif -#include "system.hxx" #include "unixerrnostring.hxx" #include diff --git a/sal/osl/unx/nlsupport.cxx b/sal/osl/unx/nlsupport.cxx index 2780a7fdd895..4cd02fe0e594 100644 --- a/sal/osl/unx/nlsupport.cxx +++ b/sal/osl/unx/nlsupport.cxx @@ -20,14 +20,12 @@ #include #include +#include #include #include #include #include -#include -#include -#include #include "nlsupport.hxx" @@ -45,11 +43,11 @@ #elif defined(MACOSX) || defined(IOS) #include #include +#include +#include #include "system.hxx" #endif -#include - namespace { struct Pair { diff --git a/sal/osl/unx/nlsupport.hxx b/sal/osl/unx/nlsupport.hxx index ba5acf23c277..9eade33d02ab 100644 --- a/sal/osl/unx/nlsupport.hxx +++ b/sal/osl/unx/nlsupport.hxx @@ -23,6 +23,7 @@ #include #include +#include namespace rtl { diff --git a/sal/osl/unx/pipe.cxx b/sal/osl/unx/pipe.cxx index b4d0f09fd3d4..9aaa83bcb79e 100644 --- a/sal/osl/unx/pipe.cxx +++ b/sal/osl/unx/pipe.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "system.hxx" - #include #include #include @@ -35,7 +33,7 @@ #include #include -#include +#include #include #include diff --git a/sal/osl/unx/process.cxx b/sal/osl/unx/process.cxx index 4e06d6369108..d54864042465 100644 --- a/sal/osl/unx/process.cxx +++ b/sal/osl/unx/process.cxx @@ -21,8 +21,8 @@ #include #include -#include -#include +#include +#include #include #include #include @@ -57,16 +57,11 @@ #include #include #include -#include -#include #include -#include - #include "createfilehandlefromfd.hxx" #include "file_url.hxx" #include "readwrite_helper.hxx" -#include "sockimpl.hxx" #include "secimpl.hxx" #define MAX_ARGS 255 diff --git a/sal/osl/unx/process_impl.cxx b/sal/osl/unx/process_impl.cxx index 576b50486119..e2d3d125b0ab 100644 --- a/sal/osl/unx/process_impl.cxx +++ b/sal/osl/unx/process_impl.cxx @@ -33,7 +33,6 @@ #include #include #include -#include #include #include "file_path_helper.hxx" diff --git a/sal/osl/unx/profile.cxx b/sal/osl/unx/profile.cxx index 881e66d5ce40..1e7512a24db4 100644 --- a/sal/osl/unx/profile.cxx +++ b/sal/osl/unx/profile.cxx @@ -24,15 +24,12 @@ #include #include -#include -#include -#include #include -#include -#include +#include +#include +#include #include -#include #include #define LINES_INI 32 diff --git a/sal/osl/unx/random.cxx b/sal/osl/unx/random.cxx index 7c76fed9498d..e8379f8f0bf7 100644 --- a/sal/osl/unx/random.cxx +++ b/sal/osl/unx/random.cxx @@ -7,11 +7,11 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#include "system.hxx" #include #include -#include +#include +#include #include int osl_get_system_random_data(char* buffer, size_t desired_len) diff --git a/sal/osl/unx/readwrite_helper.cxx b/sal/osl/unx/readwrite_helper.cxx index 48330b4bde03..f28fb16cd04f 100644 --- a/sal/osl/unx/readwrite_helper.cxx +++ b/sal/osl/unx/readwrite_helper.cxx @@ -12,13 +12,12 @@ #include #include #include +#include #include #include #include "readwrite_helper.hxx" -#include "system.hxx" - namespace { std::size_t cap_ssize_t(std::size_t value) { diff --git a/sal/osl/unx/salinit.cxx b/sal/osl/unx/salinit.cxx index c55cb2667be3..fb6922a2e36f 100644 --- a/sal/osl/unx/salinit.cxx +++ b/sal/osl/unx/salinit.cxx @@ -31,7 +31,6 @@ #include #include #include -#include #include "saltime.hxx" #include "soffice.hxx" diff --git a/sal/osl/unx/security.cxx b/sal/osl/unx/security.cxx index 9747fe92ea81..733aa0dfc6bf 100644 --- a/sal/osl/unx/security.cxx +++ b/sal/osl/unx/security.cxx @@ -32,20 +32,14 @@ #include #endif -#include "system.hxx" - #include #include -#include +#include #include #include #include -#if defined LINUX || defined __sun -#include -#endif - #if defined HAIKU #include #include @@ -55,6 +49,7 @@ #ifdef ANDROID #define getpwuid_r(uid, pwd, buf, buflen, result) (*(result) = getpwuid(uid), (*(result) ? (memcpy (buf, *(result), sizeof (struct passwd)), 0) : errno)) +#include #endif static bool osl_psz_getHomeDir(oslSecurity Security, OString* pszDirectory); diff --git a/sal/osl/unx/signal.cxx b/sal/osl/unx/signal.cxx index 8fcfbc534ec5..50c260f9d592 100644 --- a/sal/osl/unx/signal.cxx +++ b/sal/osl/unx/signal.cxx @@ -24,8 +24,6 @@ #include #include "soffice.hxx" -/* system headers */ -#include "system.hxx" #include "backtrace.h" @@ -35,10 +33,7 @@ #include #include #include -#include -#include -#include "file_path_helper.hxx" #define ACT_IGNORE 1 #define ACT_EXIT 2 #define ACT_SYSTEM 3 @@ -49,7 +44,7 @@ #include #endif -#include +#include #include namespace diff --git a/sal/osl/unx/socket.cxx b/sal/osl/unx/socket.cxx index 5573ca275afc..e875e415e709 100644 --- a/sal/osl/unx/socket.cxx +++ b/sal/osl/unx/socket.cxx @@ -24,8 +24,6 @@ #include "system.hxx" #include -#include -#include #include #include @@ -39,10 +37,10 @@ #include #include +#include #include #include #include -#include #include /* defines for shutdown */ diff --git a/sal/osl/unx/system.cxx b/sal/osl/unx/system.cxx index 19c32226df2f..f19bd7053100 100644 --- a/sal/osl/unx/system.cxx +++ b/sal/osl/unx/system.cxx @@ -17,17 +17,14 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include -#include - -#include - #include "system.hxx" #ifdef NO_PTHREAD_RTL #if defined(MACOSX) +#include + #include #include #include diff --git a/sal/osl/unx/system.hxx b/sal/osl/unx/system.hxx index 8601850a1309..5f5a16aa3671 100644 --- a/sal/osl/unx/system.hxx +++ b/sal/osl/unx/system.hxx @@ -20,6 +20,7 @@ #pragma once #include +#include /* Make sockets of type AF_UNIX use underlying FS rights */ #if defined(__sun) && !defined(_XOPEN_SOURCE) diff --git a/sal/osl/unx/tempfile.cxx b/sal/osl/unx/tempfile.cxx index dbafe2fae297..85259f1667f3 100644 --- a/sal/osl/unx/tempfile.cxx +++ b/sal/osl/unx/tempfile.cxx @@ -17,13 +17,10 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include #include -#include #include #include #include -#include "system.hxx" #include #include #include diff --git a/sal/osl/unx/thread.cxx b/sal/osl/unx/thread.cxx index 804ac6ec2a1e..b17f363511c6 100644 --- a/sal/osl/unx/thread.cxx +++ b/sal/osl/unx/thread.cxx @@ -20,8 +20,6 @@ #include #include -#include -#include #include #include #include @@ -45,7 +43,6 @@ #include #include #include -#include #include #include #ifdef ANDROID diff --git a/sal/osl/unx/time.cxx b/sal/osl/unx/time.cxx index d6a2ca33ba6c..cf5473ff24bf 100644 --- a/sal/osl/unx/time.cxx +++ b/sal/osl/unx/time.cxx @@ -20,7 +20,6 @@ #include #include "saltime.hxx" -#include "system.hxx" #include #include diff --git a/sal/osl/unx/uunxapi.cxx b/sal/osl/unx/uunxapi.cxx index fca0c179e9e7..033b1a435a77 100644 --- a/sal/osl/unx/uunxapi.cxx +++ b/sal/osl/unx/uunxapi.cxx @@ -31,9 +31,9 @@ #include #include -#include #include #include +#include #include #ifdef ANDROID