mirror of
https://bitbucket.org/smil3y/kde-workspace.git
synced 2025-02-23 02:12:51 +00:00
generic: remove checks for system headers that should be present
Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
parent
7bb060f0cf
commit
e1c102d439
18 changed files with 20 additions and 90 deletions
|
@ -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 )
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -1,17 +1,5 @@
|
|||
/* Define to 1 if you have the <limits.h> 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 <string.h> header file. */
|
||||
#cmakedefine HAVE_STRING_H 1
|
||||
|
||||
/* Define to 1 if you have the <sys/time.h> header file. */
|
||||
#cmakedefine HAVE_SYS_TIME_H 1
|
||||
|
||||
/* Define to 1 if you have the <unistd.h> header file. */
|
||||
#cmakedefine HAVE_UNISTD_H 1
|
||||
|
||||
/* Define to 1 if you have the <malloc.h> header file. */
|
||||
#cmakedefine HAVE_MALLOC_H 1
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
project(drkonqi)
|
||||
|
||||
check_function_exists("strsignal" HAVE_STRSIGNAL)
|
||||
check_function_exists("uname" HAVE_UNAME)
|
||||
|
||||
configure_file(
|
||||
config-drkonqi.h.cmake
|
||||
|
|
|
@ -1,2 +1 @@
|
|||
#cmakedefine HAVE_STRSIGNAL 1
|
||||
#cmakedefine HAVE_UNAME 1
|
||||
|
|
|
@ -22,11 +22,9 @@
|
|||
|
||||
#include "systeminformation.h"
|
||||
|
||||
#ifdef HAVE_UNAME
|
||||
# include <sys/utsname.h>
|
||||
# include <string.h>
|
||||
# include <errno.h>
|
||||
#endif
|
||||
#include <sys/utsname.h>
|
||||
#include <string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#include <QtCore/QFile>
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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}
|
||||
|
|
|
@ -25,6 +25,7 @@
|
|||
#include "Printer.h"
|
||||
#include "FcEngine.h"
|
||||
#include "ActionLabel.h"
|
||||
|
||||
#include <QtCore/QCoreApplication>
|
||||
#include <QtCore/QTextStream>
|
||||
#include <QtCore/QFile>
|
||||
|
@ -39,6 +40,7 @@
|
|||
#include <QtGui/QGridLayout>
|
||||
#include <QtGui/QProgressBar>
|
||||
#include <QtGui/qevent.h>
|
||||
|
||||
#include <KCmdLineArgs>
|
||||
#include <KAboutData>
|
||||
#include <KApplication>
|
||||
|
@ -50,9 +52,8 @@
|
|||
#include FT_FREETYPE_H
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_LOCALE_H
|
||||
#include <locale.h>
|
||||
#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<Misc::TFont> &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<Misc::TFont> &items, int size)
|
|||
}
|
||||
|
||||
delete dialog;
|
||||
|
||||
#ifdef HAVE_LOCALE_H
|
||||
|
||||
if(oldLocale)
|
||||
setlocale(LC_NUMERIC, oldLocale);
|
||||
#endif
|
||||
}
|
||||
|
||||
void CPrinter::progress(int p, const QString &label)
|
||||
|
|
|
@ -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 <locale.h> header file. */
|
||||
#cmakedefine HAVE_LOCALE_H 1
|
||||
|
||||
#endif
|
||||
|
|
|
@ -22,12 +22,7 @@
|
|||
|
||||
#include "config-unix.h"
|
||||
|
||||
#ifdef HAVE_STRING_H
|
||||
#include <string.h>
|
||||
#else
|
||||
#include <strings.h>
|
||||
#endif
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
|
|
|
@ -35,9 +35,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
|
||||
#include <stdlib.h>
|
||||
#include <unistd.h>
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#include <time.h>
|
||||
|
||||
#include <kglobal.h>
|
||||
|
|
|
@ -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 <sys/time.h>
|
||||
#endif
|
||||
#include <unistd.h>
|
||||
|
||||
#include "server.h"
|
||||
|
|
|
@ -35,15 +35,13 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#include "ksmserverinterfaceadaptor.h"
|
||||
|
||||
#include <config-workspace.h>
|
||||
#include <config-unix.h> // HAVE_LIMITS_H
|
||||
#include <config-unix.h>
|
||||
#include <config-ksmserver.h>
|
||||
#include <pwd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
#include <unistd.h>
|
||||
|
@ -54,10 +52,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#include <string.h>
|
||||
#include <assert.h>
|
||||
#include <fcntl.h>
|
||||
|
||||
#ifdef HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
#include <QFile>
|
||||
#include <QPushButton>
|
||||
|
|
|
@ -28,18 +28,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 <pwd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
|
@ -47,10 +44,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QTimer>
|
||||
|
@ -65,6 +59,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#include <KStandardDirs>
|
||||
#include <KTemporaryFile>
|
||||
#include <kworkspace/kdisplaymanager.h>
|
||||
|
||||
#include "server.h"
|
||||
#include "global.h"
|
||||
#include "client.h"
|
||||
|
|
|
@ -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 <pwd.h>
|
||||
#include <sys/types.h>
|
||||
#include <sys/param.h>
|
||||
#include <sys/stat.h>
|
||||
#ifdef HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
#include <sys/socket.h>
|
||||
#include <sys/un.h>
|
||||
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <signal.h>
|
||||
|
@ -48,10 +45,7 @@ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||
#include <errno.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
||||
#ifdef HAVE_LIMITS_H
|
||||
#include <limits.h>
|
||||
#endif
|
||||
|
||||
#include <QPushButton>
|
||||
#include <QTimer>
|
||||
|
|
|
@ -43,6 +43,8 @@ extern int screen_number;
|
|||
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
#include <unistd.h>
|
||||
#include <string.h>
|
||||
#include <assert.h>
|
||||
|
@ -52,11 +54,6 @@ extern int screen_number;
|
|||
|
||||
#include <X11/Xutil.h>
|
||||
|
||||
# ifdef HAVE_SYS_TIME_H
|
||||
# include <sys/time.h>
|
||||
# endif
|
||||
#include <time.h>
|
||||
|
||||
struct AnimData
|
||||
{
|
||||
AnimData( int x, int y, PixmapData* frames, int num_frames, int delay, int repeat );
|
||||
|
|
|
@ -26,10 +26,7 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
#include <fcntl.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef HAVE_UNISTD_H
|
||||
#include <unistd.h>
|
||||
#endif // HAVE_UNISTD_H
|
||||
|
||||
#ifdef HAVE_MALLOC_H
|
||||
#include <malloc.h>
|
||||
|
@ -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
|
||||
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
macro_bool_to_01(KDE4WORKSPACE_FOUND HAVE_KWORKSPACE)
|
||||
|
Loading…
Add table
Reference in a new issue