Commit ce7124be authored by Kevin Funk's avatar Kevin Funk

Make compile under Windows/MSVC

Test Plan:
Compiles fine under Linux
Compiles fine under Windows

Reviewers: bcooksley, dfaure, marten

Reviewed By: dfaure

Differential Revision: https://phabricator.kde.org/D6151
parent 43cb096d
......@@ -153,11 +153,16 @@ if(NOT WIN32)
add_subdirectory( network )
endif()
add_subdirectory( recentdocuments )
add_subdirectory( fish )
if (NOT WIN32)
# does not compile: fish.cpp(41): fatal error C1083: Cannot open include file: 'sys/resource.h': No such file or directory
# Used for getting the resource limit for closing all child process FDs. Could be completely replaced by fcloseall() if available for Unix or _fcloseall() for Windows, either conditionally on Q_OS_type or using a configure test.
add_subdirectory( fish )
endif()
add_subdirectory( thumbnail )
add_subdirectory( docfilter )
if (LIBSSH_FOUND)
add_subdirectory(sftp)
if (NOT WIN32 AND LIBSSH_FOUND)
# does not compile on Windows: kio_sftp.cpp(28): fatal error C1083: Cannot open include file: 'utime.h': No such file or directory
add_subdirectory(sftp)
endif ()
add_subdirectory(settings)
add_subdirectory( filenamesearch )
......
......@@ -37,7 +37,7 @@ int kdemain( int argc, char **argv )
QCoreApplication app(argc, argv);
app.setApplicationName(QLatin1String("kio_archive"));
qCDebug(KIO_ARCHIVE_LOG) << "Starting" << getpid();
qCDebug(KIO_ARCHIVE_LOG) << "Starting" << QCoreApplication::applicationPid();
if (argc != 4)
{
......
......@@ -22,7 +22,6 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <unistd.h>
#include <QFile>
#include <QDir>
......@@ -38,6 +37,10 @@
#include <kuser.h>
#include <KLocalizedString>
#ifdef Q_OS_WIN
#define S_ISDIR(m) (((m & S_IFMT) == S_IFDIR))
#endif
using namespace KIO;
ArchiveProtocolBase::ArchiveProtocolBase( const QByteArray &proto, const QByteArray &pool, const QByteArray &app ) : SlaveBase( proto, pool, app )
......
......@@ -26,6 +26,7 @@
#include <kservice.h>
#include <kservicegroup.h>
#include <time.h>
class SettingsProtocol : public KIO::SlaveBase
{
......
......@@ -25,7 +25,6 @@
#include "kio_smtp_debug.h"
#include <cerrno>
#include <cstring>
#include <unistd.h>
#include <utime.h>
#include <QtCore/QCoreApplication>
......
......@@ -28,6 +28,7 @@
#ifndef Q_OS_WIN
#include <sys/ipc.h>
#include <sys/shm.h>
#include <unistd.h> // nice()
#endif
#include <QApplication>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment