diff --git a/CMakeLists.txt b/CMakeLists.txt index ab3b7e72..8573529b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -266,9 +266,6 @@ add_feature_info(locate "Search indexing support in KFind" ) -check_include_files(sys/wait.h HAVE_SYS_WAIT_H) -check_include_files(sys/time.h HAVE_SYS_TIME_H) - include(ConfigureChecks.cmake) configure_file(config-unix.h.cmake ${CMAKE_BINARY_DIR}/config-unix.h ) configure_file(config-X11.h.cmake ${CMAKE_BINARY_DIR}/config-X11.h ) diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake index eaf21f25..29c3ee9e 100644 --- a/ConfigureChecks.cmake +++ b/ConfigureChecks.cmake @@ -15,12 +15,6 @@ set(XLIBDIR "${xrootdir}/lib/X11") set(XKBDIR "${xrootdir}/share/X11") check_function_exists(nice HAVE_NICE) - -check_include_files(string.h HAVE_STRING_H) -check_include_files(limits.h HAVE_LIMITS_H) -check_include_files(sys/time.h HAVE_SYS_TIME_H) # ksmserver, ksplashml, sftp -check_include_files(stdint.h HAVE_STDINT_H) # kcontrol/kfontinst -check_include_files(unistd.h HAVE_UNISTD_H) check_include_files(malloc.h HAVE_MALLOC_H) macro_bool_to_01(FONTCONFIG_FOUND HAVE_FONTCONFIG) # kcontrol/{fonts,kfontinst} macro_bool_to_01(FREETYPE_FOUND HAVE_FREETYPE) # kcontrol/fonts diff --git a/config-unix.h.cmake b/config-unix.h.cmake index eba2f446..4603de5b 100644 --- a/config-unix.h.cmake +++ b/config-unix.h.cmake @@ -1,17 +1,5 @@ -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_LIMITS_H 1 - /* Define to 1 if you have the `nice' function. */ #cmakedefine HAVE_NICE 1 -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_STRING_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_SYS_TIME_H 1 - -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_UNISTD_H 1 - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_MALLOC_H 1 diff --git a/drkonqi/CMakeLists.txt b/drkonqi/CMakeLists.txt index d4bedde3..7a5c7a52 100644 --- a/drkonqi/CMakeLists.txt +++ b/drkonqi/CMakeLists.txt @@ -1,7 +1,6 @@ project(drkonqi) check_function_exists("strsignal" HAVE_STRSIGNAL) -check_function_exists("uname" HAVE_UNAME) configure_file( config-drkonqi.h.cmake diff --git a/drkonqi/config-drkonqi.h.cmake b/drkonqi/config-drkonqi.h.cmake index fd26899e..a048b9ee 100644 --- a/drkonqi/config-drkonqi.h.cmake +++ b/drkonqi/config-drkonqi.h.cmake @@ -1,2 +1 @@ #cmakedefine HAVE_STRSIGNAL 1 -#cmakedefine HAVE_UNAME 1 diff --git a/drkonqi/systeminformation.cpp b/drkonqi/systeminformation.cpp index 3483ff7d..9a721e36 100644 --- a/drkonqi/systeminformation.cpp +++ b/drkonqi/systeminformation.cpp @@ -22,11 +22,9 @@ #include "systeminformation.h" -#ifdef HAVE_UNAME -# include -# include -# include -#endif +#include +#include +#include #include @@ -48,7 +46,6 @@ SystemInformation::~SystemInformation() QString SystemInformation::fetchOSDetailInformation() const { QString operatingSystem = "unspecified"; -#ifdef HAVE_UNAME struct utsname buf; if (::uname(&buf) == -1) { kDebug() << "call to uname failed" << ::strerror(errno); @@ -57,10 +54,6 @@ QString SystemInformation::fetchOSDetailInformation() const + QString::fromLocal8Bit(buf.release) + ' ' + QString::fromLocal8Bit(buf.machine); } -#else -#warning fetchOSDetailInformation() not implemented -#endif - return operatingSystem; } diff --git a/kcontrol/kfontinst/CMakeLists.txt b/kcontrol/kfontinst/CMakeLists.txt index 8e104d25..1ec75dbb 100644 --- a/kcontrol/kfontinst/CMakeLists.txt +++ b/kcontrol/kfontinst/CMakeLists.txt @@ -1,6 +1,8 @@ if (X11_Xft_FOUND) - check_include_files(locale.h HAVE_LOCALE_H) - configure_file(config-fontinst.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config-fontinst.h) + configure_file( + config-fontinst.h.cmake + ${CMAKE_CURRENT_BINARY_DIR}/config-fontinst.h + ) include_directories( ${KDE4_INCLUDES} ${FREETYPE_INCLUDE_DIRS} @@ -13,13 +15,14 @@ if (X11_Xft_FOUND) ${CMAKE_CURRENT_BINARY_DIR}/dbus ${CMAKE_CURRENT_SOURCE_DIR}/viewpart ${CMAKE_CURRENT_SOURCE_DIR}/kcmfontinst - ${CMAKE_CURRENT_BINARY_DIR}/kcmfontinst) + ${CMAKE_CURRENT_BINARY_DIR}/kcmfontinst + ) add_definitions(${QT_DEFINITIONS} ${KDE4_DEFINITIONS}) set(libkfontinstdbusiface_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/dbus/FontinstIface.cpp) set(libkfontinstview_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/viewpart/FontPreview.cpp ${CMAKE_CURRENT_SOURCE_DIR}/viewpart/PreviewSelectAction.cpp - ${CMAKE_CURRENT_SOURCE_DIR}/viewpart/CharTip.cpp ) + ${CMAKE_CURRENT_SOURCE_DIR}/viewpart/CharTip.cpp) set(libkfontinstactionlabel_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/kcmfontinst/ActionLabel.cpp) set(libkfontinstjobrunner_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/kcmfontinst/JobRunner.cpp ${libkfontinstactionlabel_SRCS} diff --git a/kcontrol/kfontinst/apps/Printer.cpp b/kcontrol/kfontinst/apps/Printer.cpp index d95579ed..7ba8fd10 100644 --- a/kcontrol/kfontinst/apps/Printer.cpp +++ b/kcontrol/kfontinst/apps/Printer.cpp @@ -25,6 +25,7 @@ #include "Printer.h" #include "FcEngine.h" #include "ActionLabel.h" + #include #include #include @@ -39,6 +40,7 @@ #include #include #include + #include #include #include @@ -50,9 +52,8 @@ #include FT_FREETYPE_H #endif -#ifdef HAVE_LOCALE_H #include -#endif + #include "CreateParent.h" // Enable the following to allow printing of non-installed fonts. Does not seem to work :-( @@ -364,9 +365,7 @@ CPrinter::~CPrinter() void CPrinter::print(const QList &items, int size) { - #ifdef HAVE_LOCALE_H char *oldLocale=setlocale(LC_NUMERIC, "C"); - #endif QPrinter printer; QPrintDialog *dialog = KdePrint::createPrintDialog(&printer, parentWidget()); @@ -388,11 +387,9 @@ void CPrinter::print(const QList &items, int size) } delete dialog; - - #ifdef HAVE_LOCALE_H + if(oldLocale) setlocale(LC_NUMERIC, oldLocale); - #endif } void CPrinter::progress(int p, const QString &label) diff --git a/kcontrol/kfontinst/config-fontinst.h.cmake b/kcontrol/kfontinst/config-fontinst.h.cmake index e1b7e979..5a8d354a 100644 --- a/kcontrol/kfontinst/config-fontinst.h.cmake +++ b/kcontrol/kfontinst/config-fontinst.h.cmake @@ -5,7 +5,4 @@ #define KFONTINST_ROOT_FONTS_DIR "@KDE4_SYSCONF_INSTALL_DIR@/fonts/" #define KFONTINST_SYSTEM_FONTS_DIR "@KDE4_SHARE_INSTALL_PREFIX@/fonts/" -/* Define to 1 if you have the header file. */ -#cmakedefine HAVE_LOCALE_H 1 - #endif diff --git a/kioslave/floppy/kio_floppy.cpp b/kioslave/floppy/kio_floppy.cpp index cda0e0f4..229c8788 100644 --- a/kioslave/floppy/kio_floppy.cpp +++ b/kioslave/floppy/kio_floppy.cpp @@ -22,12 +22,7 @@ #include "config-unix.h" -#ifdef HAVE_STRING_H #include -#else -#include -#endif - #include #include #include diff --git a/ksmserver/client.cpp b/ksmserver/client.cpp index 093d8914..e6d6cb5d 100644 --- a/ksmserver/client.cpp +++ b/ksmserver/client.cpp @@ -35,9 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include -#ifdef HAVE_SYS_TIME_H #include -#endif #include #include diff --git a/ksmserver/legacy.cpp b/ksmserver/legacy.cpp index d3bf6d6c..1dbee4f4 100644 --- a/ksmserver/legacy.cpp +++ b/ksmserver/legacy.cpp @@ -31,9 +31,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "config-unix.h" -#ifdef HAVE_SYS_TIME_H #include -#endif #include #include "server.h" diff --git a/ksmserver/server.cpp b/ksmserver/server.cpp index de6c074a..eae35a78 100644 --- a/ksmserver/server.cpp +++ b/ksmserver/server.cpp @@ -35,15 +35,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "ksmserverinterfaceadaptor.h" #include -#include // HAVE_LIMITS_H +#include #include #include #include #include #include -#ifdef HAVE_SYS_TIME_H #include -#endif #include #include #include @@ -54,10 +52,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include - -#ifdef HAVE_LIMITS_H #include -#endif #include #include diff --git a/ksmserver/shutdown.cpp b/ksmserver/shutdown.cpp index d91283c8..8f21b29a 100644 --- a/ksmserver/shutdown.cpp +++ b/ksmserver/shutdown.cpp @@ -28,18 +28,15 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************/ -#include // HAVE_SYS_TIME_H, HAVE_LIMITS_H +#include #include #include #include #include -#ifdef HAVE_SYS_TIME_H #include -#endif #include #include - #include #include #include @@ -47,10 +44,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include - -#ifdef HAVE_LIMITS_H #include -#endif #include #include @@ -65,6 +59,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include + #include "server.h" #include "global.h" #include "client.h" diff --git a/ksmserver/startup.cpp b/ksmserver/startup.cpp index 4115a361..60254187 100644 --- a/ksmserver/startup.cpp +++ b/ksmserver/startup.cpp @@ -29,18 +29,15 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ******************************************************************/ -#include "config-unix.h" // HAVE_SYS_TIME_H, HAVE_LIMITS_H +#include "config-unix.h" #include #include #include #include -#ifdef HAVE_SYS_TIME_H #include -#endif #include #include - #include #include #include @@ -48,10 +45,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include #include #include - -#ifdef HAVE_LIMITS_H #include -#endif #include #include diff --git a/ksplash/ksplashx/splash.cpp b/ksplash/ksplashx/splash.cpp index c1698622..07b3cef2 100644 --- a/ksplash/ksplashx/splash.cpp +++ b/ksplash/ksplashx/splash.cpp @@ -43,6 +43,8 @@ extern int screen_number; #include #include +#include +#include #include #include #include @@ -52,11 +54,6 @@ extern int screen_number; #include -# ifdef HAVE_SYS_TIME_H -# include -# endif -#include - struct AnimData { AnimData( int x, int y, PixmapData* frames, int num_frames, int delay, int repeat ); diff --git a/kwin/main.cpp b/kwin/main.cpp index 0d2a66e8..5775b7d5 100644 --- a/kwin/main.cpp +++ b/kwin/main.cpp @@ -26,10 +26,7 @@ along with this program. If not, see . #include #include #include - -#ifdef HAVE_UNISTD_H #include -#endif // HAVE_UNISTD_H #ifdef HAVE_MALLOC_H #include @@ -465,11 +462,7 @@ int main(int argc, char * argv[]) // due to fragmentation especially if we use the raster graphicssystem. On the // otherside if the threshold is too low, free() starts to permanently ask the kernel // about shrinking the heap. -#ifdef HAVE_UNISTD_H const int pagesize = sysconf(_SC_PAGESIZE); -#else - const int pagesize = 4*1024; -#endif // HAVE_UNISTD_H mallopt(M_TRIM_THRESHOLD, 5*pagesize); #endif // M_TRIM_THRESHOLD diff --git a/plasma/applets/folderview/ConfigureChecks.cmake b/plasma/applets/folderview/ConfigureChecks.cmake deleted file mode 100644 index 4057c757..00000000 --- a/plasma/applets/folderview/ConfigureChecks.cmake +++ /dev/null @@ -1,2 +0,0 @@ -macro_bool_to_01(KDE4WORKSPACE_FOUND HAVE_KWORKSPACE) -