From 29a8459798d651a1bdf87ba794048d3cce466458 Mon Sep 17 00:00:00 2001 From: Ivailo Monev Date: Fri, 23 Sep 2022 15:42:09 +0300 Subject: [PATCH] generic: remove checks for system headers that should be present Signed-off-by: Ivailo Monev --- ConfigureChecks.cmake | 5 ----- config.h.cmake | 9 --------- kdecore/date/kdatetime.cpp | 5 ----- kdecore/date/ksystemtimezone.cpp | 4 ---- kdecore/date/ktimezone.cpp | 4 ---- kdecore/date/ktzfiletimezone.cpp | 4 ---- kdecore/io/kdebug.cpp | 5 ----- kdecore/io/klockfile_unix.cpp | 4 ---- kdecore/io/kmountpoint.cpp | 2 -- kdecore/io/ktempdir.cpp | 5 ----- kdecore/kernel/kglobal.cpp | 8 +++----- kdecore/kernel/kstandarddirs.cpp | 2 -- kdecore/localization/klocale_kde.cpp | 8 +------- kdeui/kernel/kapplication.cpp | 4 +--- kdeui/util/kmanagerselection.cpp | 5 ----- kinit/kinit.cpp | 4 +--- kioslave/file/file.cpp | 5 ----- kioslave/ftp/ftp.cpp | 3 --- kpty/kptydevice.cpp | 4 +--- 19 files changed, 7 insertions(+), 83 deletions(-) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index 3c21d72c..0ad93f4d 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -23,18 +23,13 @@ set(CMAKE_REQUIRED_DEFINITIONS ${_KDE4_PLATFORM_DEFINITIONS}) macro_bool_to_01(LIBINTL_FOUND ENABLE_NLS) # kdecore macro_bool_to_01(ACL_FOUND HAVE_POSIX_ACL) # kio -check_include_files(string.h HAVE_STRING_H) # various check_include_files(fstab.h HAVE_FSTAB_H) # kio, kdecore check_include_files(mntent.h HAVE_MNTENT_H) # solid, kio, kdecore -check_include_files(sys/stat.h HAVE_SYS_STAT_H) # various -check_include_files(sys/types.h HAVE_SYS_TYPES_H) # various -check_include_files(sys/select.h HAVE_SYS_SELECT_H) # various check_include_files(sys/param.h HAVE_SYS_PARAM_H) # various check_include_files("stdio.h;sys/mnttab.h" HAVE_SYS_MNTTAB_H) # kio, kdecore check_include_files(sys/mntent.h HAVE_SYS_MNTENT_H) # solid, kio, kdecore check_include_files("sys/param.h;sys/mount.h" HAVE_SYS_MOUNT_H) # kio, kdecore check_include_files(paths.h HAVE_PATHS_H) # kdecore -check_include_files(sys/time.h HAVE_SYS_TIME_H) # kioslave # TODO: separate to config-x11.h macro_bool_to_01(X11_XTest_FOUND HAVE_XTEST) # kdecore diff --git a/config.h.cmake b/config.h.cmake index f1cff03a..fa4378e7 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -6,11 +6,7 @@ /****************************/ -#cmakedefine HAVE_SYS_STAT_H 1 -#cmakedefine HAVE_SYS_TYPES_H 1 #cmakedefine HAVE_SYS_PARAM_H 1 -#cmakedefine HAVE_SYS_TIME_H 1 -#cmakedefine HAVE_SYS_SELECT_H 1 #cmakedefine HAVE_SYS_MNTTAB_H 1 #cmakedefine HAVE_SYS_MNTENT_H 1 #cmakedefine HAVE_SYS_MOUNT_H 1 @@ -27,11 +23,6 @@ #cmakedefine HAVE_GETGROUPLIST 1 #cmakedefine HAVE_TTYNAME_R 1 -#cmakedefine TIME_WITH_SYS_TIME 1 - -/* Define to 1 if you have string.h */ -#cmakedefine HAVE_STRING_H 1 - /* define if message translations are enabled */ #cmakedefine ENABLE_NLS 1 diff --git a/kdecore/date/kdatetime.cpp b/kdecore/date/kdatetime.cpp index b98f71e0..27556ee7 100644 --- a/kdecore/date/kdatetime.cpp +++ b/kdecore/date/kdatetime.cpp @@ -23,12 +23,8 @@ #include #include -#ifdef HAVE_SYS_TIME_H #include -#endif -#ifdef HAVE_TIME_H #include -#endif #include #include #include @@ -45,7 +41,6 @@ #include - static const char shortDay[][4] = { "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", diff --git a/kdecore/date/ksystemtimezone.cpp b/kdecore/date/ksystemtimezone.cpp index b7f2d110..05ffab05 100644 --- a/kdecore/date/ksystemtimezone.cpp +++ b/kdecore/date/ksystemtimezone.cpp @@ -27,12 +27,8 @@ #include #include -#ifdef HAVE_SYS_TIME_H #include -#endif -#ifdef HAVE_TIME_H #include -#endif #include #include diff --git a/kdecore/date/ktimezone.cpp b/kdecore/date/ktimezone.cpp index 94208c74..3cc68af1 100644 --- a/kdecore/date/ktimezone.cpp +++ b/kdecore/date/ktimezone.cpp @@ -24,12 +24,8 @@ #include #include // SIZEOF_TIME_T -#ifdef HAVE_SYS_TIME_H #include -#endif -#ifdef HAVE_TIME_H #include -#endif #include #include diff --git a/kdecore/date/ktzfiletimezone.cpp b/kdecore/date/ktzfiletimezone.cpp index b4d67936..ec7eb90b 100644 --- a/kdecore/date/ktzfiletimezone.cpp +++ b/kdecore/date/ktzfiletimezone.cpp @@ -22,12 +22,8 @@ #include -#ifdef HAVE_SYS_TIME_H #include -#endif -#ifdef HAVE_TIME_H #include -#endif #include #include diff --git a/kdecore/io/kdebug.cpp b/kdecore/io/kdebug.cpp index 02459576..dc7302ee 100644 --- a/kdecore/io/kdebug.cpp +++ b/kdecore/io/kdebug.cpp @@ -62,13 +62,8 @@ #include #include #include - -#ifdef HAVE_SYS_TIME_H #include -#endif -#ifdef HAVE_TIME_H #include -#endif #ifdef HAVE_BACKTRACE #include diff --git a/kdecore/io/klockfile_unix.cpp b/kdecore/io/klockfile_unix.cpp index 5c4e010e..256545be 100644 --- a/kdecore/io/klockfile_unix.cpp +++ b/kdecore/io/klockfile_unix.cpp @@ -23,12 +23,8 @@ #include #include -#ifdef HAVE_SYS_STAT_H #include -#endif -#ifdef HAVE_SYS_TIME_H #include -#endif #include #include #include diff --git a/kdecore/io/kmountpoint.cpp b/kdecore/io/kmountpoint.cpp index b31b8e70..60e2a6bc 100644 --- a/kdecore/io/kmountpoint.cpp +++ b/kdecore/io/kmountpoint.cpp @@ -46,9 +46,7 @@ static Qt::CaseSensitivity cs = Qt::CaseSensitive; // This is the *BSD branch #ifdef HAVE_SYS_MOUNT_H -#ifdef HAVE_SYS_TYPES_H #include -#endif #ifdef HAVE_SYS_PARAM_H #include #endif diff --git a/kdecore/io/ktempdir.cpp b/kdecore/io/ktempdir.cpp index 0b5896e6..18d9715a 100644 --- a/kdecore/io/ktempdir.cpp +++ b/kdecore/io/ktempdir.cpp @@ -23,11 +23,7 @@ #include #include - -#ifdef HAVE_SYS_STAT_H #include -#endif - #include #include #include @@ -48,7 +44,6 @@ #include "kde_file.h" - class KTempDir::Private { public: diff --git a/kdecore/kernel/kglobal.cpp b/kdecore/kernel/kglobal.cpp index c7505d53..8a4a4b62 100644 --- a/kdecore/kernel/kglobal.cpp +++ b/kdecore/kernel/kglobal.cpp @@ -26,15 +26,14 @@ #include "kglobal.h" #include "kglobal_p.h" -#include -#include #include -#ifdef HAVE_SYS_STAT_H #include -#endif +#include // umask +#include +#include #include #include @@ -50,7 +49,6 @@ #include #include #include "kcmdlineargs.h" -#include // umask mode_t s_umsk; diff --git a/kdecore/kernel/kstandarddirs.cpp b/kdecore/kernel/kstandarddirs.cpp index 9a61d6e3..a39d9e79 100644 --- a/kdecore/kernel/kstandarddirs.cpp +++ b/kdecore/kernel/kstandarddirs.cpp @@ -49,9 +49,7 @@ #include #include #include -#ifdef HAVE_SYS_STAT_H #include -#endif #include #include #include diff --git a/kdecore/localization/klocale_kde.cpp b/kdecore/localization/klocale_kde.cpp index 354dac25..ba2cb97f 100644 --- a/kdecore/localization/klocale_kde.cpp +++ b/kdecore/localization/klocale_kde.cpp @@ -26,13 +26,9 @@ #include #include - -#ifdef HAVE_SYS_TIME_H #include -#endif -#ifdef HAVE_TIME_H #include -#endif +#include #include #include @@ -43,8 +39,6 @@ #include #include -#include - #include "kcatalog_p.h" #include "kglobal.h" #include "kstandarddirs.h" diff --git a/kdeui/kernel/kapplication.cpp b/kdeui/kernel/kapplication.cpp index 14f88c62..45673f9c 100644 --- a/kdeui/kernel/kapplication.cpp +++ b/kdeui/kernel/kapplication.cpp @@ -66,9 +66,7 @@ #include // srand(), rand() #include #include -#ifdef HAVE_SYS_STAT_H -# include -#endif +#include #ifdef Q_WS_X11 #include diff --git a/kdeui/util/kmanagerselection.cpp b/kdeui/util/kmanagerselection.cpp index cb87101e..0123dfae 100644 --- a/kdeui/util/kmanagerselection.cpp +++ b/kdeui/util/kmanagerselection.cpp @@ -26,13 +26,8 @@ DEALINGS IN THE SOFTWARE. #include -#ifdef HAVE_SYS_TYPES_H #include -#endif - -#ifdef HAVE_SYS_TIME_H #include -#endif #include diff --git a/kinit/kinit.cpp b/kinit/kinit.cpp index a9a3f8e1..42a7ca6c 100644 --- a/kinit/kinit.cpp +++ b/kinit/kinit.cpp @@ -31,6 +31,7 @@ #include #include #include +#include // Needed on some systems. #include #include #include @@ -40,9 +41,6 @@ #include #include #include -#ifdef HAVE_SYS_SELECT_H -# include // Needed on some systems. -#endif #include #include diff --git a/kioslave/file/file.cpp b/kioslave/file/file.cpp index 1ee71805..7a9bd53e 100644 --- a/kioslave/file/file.cpp +++ b/kioslave/file/file.cpp @@ -35,10 +35,7 @@ #include #include #include -#ifdef HAVE_SYS_TIME_H #include -#endif - #include #include #include @@ -51,9 +48,7 @@ #include #include #include -#ifdef HAVE_STRING_H #include -#endif #include #include diff --git a/kioslave/ftp/ftp.cpp b/kioslave/ftp/ftp.cpp index b61631a3..4ee61301 100644 --- a/kioslave/ftp/ftp.cpp +++ b/kioslave/ftp/ftp.cpp @@ -31,11 +31,8 @@ #include "ftp.h" -#ifdef HAVE_SYS_TIME_H #include #include -#endif - #include #include #include diff --git a/kpty/kptydevice.cpp b/kpty/kptydevice.cpp index 05a2feb3..6b3cf07d 100644 --- a/kpty/kptydevice.cpp +++ b/kpty/kptydevice.cpp @@ -40,9 +40,7 @@ #ifdef HAVE_SYS_FILIO_H # include #endif -#ifdef HAVE_SYS_TIME_H -# include -#endif +#include #if defined(Q_OS_FREEBSD) || defined(Q_OS_DRAGONFLY) // "the other end's output queue size" - kinda braindead, huh?